I would like to ask if there is a bug or am I doing something wrong in this routine:
[{"id":"e05046c10f4aed17","type":"group","z":"52913d9d3ee83890","name":"Graph - Deep Diver","style":{"label":true,"stroke":"#92d04f","fill":"#c8e7a7"},"nodes":["04eef0fecf3be776","56c7e5aee2c581a8","ef2c8d69b3a9bf4c","c44ebe35bb008be9","d060705f50f26e15","b81d613478f43c16","f368dbbf258b08de","690f8a7a7098584d","46f78aa582105ebb"],"x":294,"y":459,"w":1012,"h":202},{"id":"4639c7fae2510b5a","type":"subflow","name":"exec_BD","info":"","category":"","in":[{"x":80,"y":100,"wires":[{"id":"8cc0b55b7d0743c0"}]}],"out":[{"x":1020,"y":100,"wires":[{"id":"4135b832b386a610","port":0}]}],"env":[],"meta":{},"color":"#DDAA99","status":{"x":1020,"y":200,"wires":[{"id":"84933fc7168ae2b4","port":0}]}},{"id":"8cc0b55b7d0743c0","type":"change","z":"4639c7fae2510b5a","name":"copy flow/global to msg","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"},{"t":"set","p":"payload.ip","pt":"msg","to":"#:(persistent)::IP_vGlobalBD","tot":"global"},{"t":"set","p":"payload.porta","pt":"msg","to":"#:(persistent)::Porta_vGlobalBD","tot":"global"},{"t":"set","p":"payload.usuario","pt":"msg","to":"#:(persistent)::Usuario_vGlobalBD","tot":"global"},{"t":"set","p":"payload.senha","pt":"msg","to":"#:(persistent)::Senha_vGlobalBD","tot":"global"},{"t":"set","p":"payload.nomeBD","pt":"msg","to":"#:(persistent)::NomeBD_vGlobalBD","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":100,"wires":[["effa65099dd2a525"]]},{"id":"4135b832b386a610","type":"mysql2","z":"4639c7fae2510b5a","name":"","server":"","bind":"","topic":"","x":760,"y":100,"wires":[[]]},{"id":"effa65099dd2a525","type":"function","z":"4639c7fae2510b5a","name":"prep_MQTT_Conn","func":"\nconst ip = msg.payload.ip\nconst porta = msg.payload.porta\nconst usuario = msg.payload.usuario\nconst senha = msg.payload.senha\nconst nomeBD = msg.payload.nomeBD\n\nmsg.server = {\n \"host\": ip,\n \"port\": porta,\n \"username\": usuario,\n \"password\": senha,\n \"db\": nomeBD\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":100,"wires":[["4135b832b386a610"]]},{"id":"eb96b8b79efaea17","type":"change","z":"4639c7fae2510b5a","name":"","rules":[{"t":"set","p":"server","pt":"msg","to":"{'host': $globalContext('IP_vGlobalBD'),\t 'port': $globalContext('Porta_vGlobalBD'),\t 'username': $globalContext('Usuario_vGlobalBD'),\t 'password': $globalContext('Senha_vGlobalBD'),\t 'bd': \"TelemetriaEnervision\"\t }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":260,"wires":[[]]},{"id":"4a50ea77c5d0ed5b","type":"comment","z":"4639c7fae2510b5a","name":"Quem sabe futuro usar esse Change","info":"Não consegui fazer funcionar com o mysql2, ele diz que o nome do banco de dados não está selecionado.","x":320,"y":220,"wires":[]},{"id":"84933fc7168ae2b4","type":"status","z":"4639c7fae2510b5a","name":"","scope":null,"x":840,"y":200,"wires":[[]]},{"id":"1a924288b2bd59bd","type":"comment","z":"4639c7fae2510b5a","name":"Variaveis Globais, com as informações do BD","info":"As informações sobre a conexão ao Banco de dados estão nas variaveis globais do banco de dados.","x":350,"y":60,"wires":[]},{"id":"04eef0fecf3be776","type":"function","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"f_SQL","func":"\nmsg.topic = \"Select (UNIX_TIMESTAMP(RegistroT)*1000) as x, (-1 * ROUND(Profundidade,2)) as y from TelemetriaMergulho Where nMergulho = \" + msg.payload\n\n\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":540,"wires":[["c44ebe35bb008be9"]]},{"id":"56c7e5aee2c581a8","type":"change","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t {\t \"series\":[\"temp\"],\t \"data\":[ [$$.payload]],\t \"labels\":[\"temp\"]\t }\t]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":580,"wires":[["ef2c8d69b3a9bf4c","f368dbbf258b08de"]]},{"id":"ef2c8d69b3a9bf4c","type":"ui_chart","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","group":"f7757da2b3070a54","order":40,"width":"6","height":6,"label":"Mergulho Realizado","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"120","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1180,"y":580,"wires":[[]]},{"id":"c44ebe35bb008be9","type":"subflow:4639c7fae2510b5a","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","x":720,"y":540,"wires":[["56c7e5aee2c581a8","b81d613478f43c16"]]},{"id":"d060705f50f26e15","type":"link out","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"link out 65","mode":"link","links":["25f94d20679a89c4"],"x":1125,"y":500,"wires":[]},{"id":"b81d613478f43c16","type":"change","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t {\t \t \"data\":[ [$$.payload]]\t \t }\t]","tot":"jsonata"},{"t":"set","p":"ProfundidadeMaxima_plan","pt":"msg","to":"ProfundidadeMaxima_plan","tot":"flow"},{"t":"set","p":"ProfMax","pt":"msg","to":"ProfMax","tot":"flow"},{"t":"set","p":"EnableGraph","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":500,"wires":[["d060705f50f26e15"]]},{"id":"f368dbbf258b08de","type":"debug","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"debug 14","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1140,"y":620,"wires":[]},{"id":"690f8a7a7098584d","type":"ui_button","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","group":"f7757da2b3070a54","order":0,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":370,"y":540,"wires":[["04eef0fecf3be776"]]},{"id":"46f78aa582105ebb","type":"ui_text_input","z":"52913d9d3ee83890","g":"e05046c10f4aed17","name":"","label":"","tooltip":"","group":"f7757da2b3070a54","order":2,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"topic","sendOnBlur":true,"className":"","topicType":"msg","x":380,"y":580,"wires":[["04eef0fecf3be776"]]},{"id":"f7757da2b3070a54","type":"ui_group","name":"Group 1","tab":"4ad95848aac3cd1f","order":1,"disp":true,"width":6},{"id":"4ad95848aac3cd1f","type":"ui_tab","name":"Tab 20","icon":"dashboard","order":20}]
Data from JSON
[{"series":["temp"],"data":[[{"x":1685495365000,"y":-1.2},{"x":1685495366000,"y":-1.6},{"x":1685495366000,"y":-2},{"x":1685495367000,"y":-2.4},{"x":1685495367000,"y":-2.8},{"x":1685495368000,"y":-3.2},{"x":1685495369000,"y":-3.6},{"x":1685495369000,"y":-4},{"x":1685495370000,"y":-4.4},{"x":1685495370000,"y":-4.8},{"x":1685495371000,"y":-5.2},{"x":1685495372000,"y":-5.6},{"x":1685495372000,"y":-6},{"x":1685495373000,"y":-6.4},{"x":1685495373000,"y":-6.8},{"x":1685495374000,"y":-7.2},{"x":1685495375000,"y":-7.6},{"x":1685495375000,"y":-8},{"x":1685495376000,"y":-8.4},{"x":1685495376000,"y":-8.8},{"x":1685495377000,"y":-9.2},{"x":1685495378000,"y":-9.6},{"x":1685495378000,"y":-10},{"x":1685495379000,"y":-10.4},{"x":1685495379000,"y":-10.8},{"x":1685495380000,"y":-11.2},{"x":1685495381000,"y":-11.6},{"x":1685495381000,"y":-12},{"x":1685495382000,"y":-12.4},{"x":1685495383000,"y":-12.8},{"x":1685495383000,"y":-13.2},{"x":1685495384000,"y":-13.6},{"x":1685495384000,"y":-14},{"x":1685495385000,"y":-14.4},{"x":1685495386000,"y":-14.8},{"x":1685495386000,"y":-15.2},{"x":1685495387000,"y":-15.6},{"x":1685495387000,"y":-16},{"x":1685495388000,"y":-16.4},{"x":1685495389000,"y":-16.8},{"x":1685495389000,"y":-17.2},{"x":1685495390000,"y":-17.6},{"x":1685495390000,"y":-18},{"x":1685495391000,"y":-18.4},{"x":1685495392000,"y":-18.8},{"x":1685495392000,"y":-19.2},{"x":1685495393000,"y":-19.6},{"x":1685495393000,"y":-20},{"x":1685495394000,"y":-20.4},{"x":1685495395000,"y":-20.8},{"x":1685495395000,"y":-21.2},{"x":1685495396000,"y":-21.6},{"x":1685495396000,"y":-22},{"x":1685495397000,"y":-22.4},{"x":1685495398000,"y":-22.8},{"x":1685495398000,"y":-23.2},{"x":1685495399000,"y":-23.6},{"x":1685495400000,"y":-24},{"x":1685495400000,"y":-24.4},{"x":1685495401000,"y":-24.8},{"x":1685495401000,"y":-25.2},{"x":1685495402000,"y":-25.6},{"x":1685495425000,"y":-25.2},{"x":1685495425000,"y":-24.8},{"x":1685495426000,"y":-24.4},{"x":1685495426000,"y":-24},{"x":1685495426000,"y":-23.6},{"x":1685495427000,"y":-23.2},{"x":1685495427000,"y":-22.8},{"x":1685495428000,"y":-22.4},{"x":1685495428000,"y":-22},{"x":1685495428000,"y":-21.6},{"x":1685495429000,"y":-21.2},{"x":1685495429000,"y":-20.8},{"x":1685495430000,"y":-20.4},{"x":1685495430000,"y":-20},{"x":1685495430000,"y":-19.6},{"x":1685495431000,"y":-19.2},{"x":1685495431000,"y":-18.8},{"x":1685495432000,"y":-18.4},{"x":1685495432000,"y":-18},{"x":1685495432000,"y":-17.6},{"x":1685495433000,"y":-17.2},{"x":1685495433000,"y":-16.8},{"x":1685495434000,"y":-16.4},{"x":1685495434000,"y":-16},{"x":1685495434000,"y":-15.6},{"x":1685495435000,"y":-15.2},{"x":1685495435000,"y":-14.8},{"x":1685495436000,"y":-14.4},{"x":1685495436000,"y":-14},{"x":1685495436000,"y":-13.6},{"x":1685495437000,"y":-13.2},{"x":1685495437000,"y":-12.8},{"x":1685495438000,"y":-12.4},{"x":1685495438000,"y":-12},{"x":1685495438000,"y":-11.6},{"x":1685495439000,"y":-11.2},{"x":1685495439000,"y":-10.8},{"x":1685495440000,"y":-10.4},{"x":1685495440000,"y":-10},{"x":1685495440000,"y":-9.6},{"x":1685495441000,"y":-9.2},{"x":1685495441000,"y":-8.8},{"x":1685495442000,"y":-8.4},{"x":1685495442000,"y":-8},{"x":1685495443000,"y":-7.6},{"x":1685495443000,"y":-7.2},{"x":1685495443000,"y":-6.8},{"x":1685495444000,"y":-6.4},{"x":1685495444000,"y":-6},{"x":1685495445000,"y":-5.6},{"x":1685495445000,"y":-5.2},{"x":1685495459000,"y":-4.8},{"x":1685495460000,"y":-4.4},{"x":1685495461000,"y":-4},{"x":1685495462000,"y":-3.6},{"x":1685495463000,"y":-3.2},{"x":1685495464000,"y":-2.8},{"x":1685495465000,"y":-2.4},{"x":1685495466000,"y":-2},{"x":1685495467000,"y":-1.6},{"x":1685495468000,"y":-1.2},{"x":1685495469000,"y":-0.8},{"x":1685495470000,"y":-0.4},{"x":1685495471000,"y":0}]],"labels":["temp"]}]
The problem is the following:
Out of nowhere this graph just stops showing up. And I don't know why.
It always works the first time. then out of nowhere it does not plot the information on the graph. I don't know why.
if i enter 1 result that is empty.
If I go back and enter a result that is full it will no longer plot the data.
If I press F5 on the keyboard and reload the page then yes it works again with the full value.
Very weird... is it a bug?