1 line
57 KiB
JSON
1 line
57 KiB
JSON
[{"id":"249a4ff7d0b1d7e5","type":"tab","label":"detailed car view","disabled":false,"info":"","env":[]},{"id":"b79deaf398a38808","type":"ui_artlessgauge","z":"249a4ff7d0b1d7e5","group":"3c7d50b1062eacd4","order":2,"width":0,"height":0,"name":"Velocidade","icon":"","label":"Velocidade","unit":"KM/H","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.SPD","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#0055ff","t":"min","dot":0},{"val":30,"col":"#009919","t":"sec","dot":0},{"val":50,"col":"#cccc00","t":"sec","dot":0},{"val":80,"col":"#ffa200","t":"sec","dot":0},{"val":130,"col":"#ff0000","t":"sec","dot":0},{"val":255,"col":"#ff0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":330,"y":300,"wires":[]},{"id":"fbac54c0c8e25c91","type":"ui_artlessgauge","z":"249a4ff7d0b1d7e5","group":"3c7d50b1062eacd4","order":3,"width":8,"height":1,"name":"RPM","icon":"","label":"RPM","unit":"","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.RPM","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#0055ff","t":"min","dot":0},{"val":500,"col":"#66ff69","t":"sec","dot":0},{"val":3000,"col":"#fbff00","t":"sec","dot":0},{"val":5000,"col":"#ff9500","t":"sec","dot":0},{"val":8000,"col":"#ff0000","t":"sec","dot":0},{"val":9000,"col":"#ff0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":310,"y":260,"wires":[]},{"id":"3d3b3c45bf9fe119","type":"ui_artlessgauge","z":"249a4ff7d0b1d7e5","group":"3c7d50b1062eacd4","order":4,"width":0,"height":0,"name":"Acelerador","icon":"","label":"Acelerador","unit":"","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.PDL","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#1100ff","t":"min","dot":0},{"val":40,"col":"#00f531","t":"sec","dot":0},{"val":70,"col":"#ffc72e","t":"sec","dot":0},{"val":90,"col":"#ff0000","t":"sec","dot":0},{"val":100,"col":"#ff0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":330,"y":340,"wires":[]},{"id":"6dbe5d22b1e68232","type":"ui_table","z":"249a4ff7d0b1d7e5","group":"3c7d50b1062eacd4","name":"Histórico","order":8,"width":8,"height":3,"columns":[{"field":"timestamp","title":"Data/Hora","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"RPM","title":"rpm","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"SPD","title":"speed","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"PDL","title":"pedal","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"TRB","title":"trouble","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":1,"cts":true,"x":860,"y":240,"wires":[[]]},{"id":"f3a66a20070c5817","type":"ui_text","z":"249a4ff7d0b1d7e5","group":"3c7d50b1062eacd4","order":7,"width":8,"height":1,"name":"","label":"Histórico","format":"{{msg.payload}}","layout":"row-spread","className":"","x":860,"y":200,"wires":[]},{"id":"29e8d738f38bdb76","type":"ui_template","z":"249a4ff7d0b1d7e5","group":"43933c66e4feb46d","name":"codigo de erro","order":2,"width":8,"height":2,"format":"<h3>{{msg.payload.FRZ[0]}}</h3>\n<h4>{{msg.payload.FRZ[1]}}</h4>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":660,"y":80,"wires":[[]]},{"id":"0288f391495bb860","type":"ui_artlessgauge","z":"249a4ff7d0b1d7e5","group":"3c7d50b1062eacd4","order":5,"width":8,"height":1,"name":"Coolant","icon":"","label":"Temperatura Motor","unit":"°C","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.COL","secondary":"secondary","inline":true,"animate":true,"sectors":[{"val":80,"col":"#1100ff","t":"min","dot":0},{"val":87,"col":"#03cc00","t":"sec","dot":0},{"val":100,"col":"#e1ff00","t":"sec","dot":0},{"val":105,"col":"#ff0000","t":"sec","dot":0},{"val":150,"col":"#ff0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":320,"y":380,"wires":[]},{"id":"26ce7f67cc1302d0","type":"ui_artlessgauge","z":"249a4ff7d0b1d7e5","group":"3c7d50b1062eacd4","order":6,"width":8,"height":1,"name":"Intake","icon":"","label":"Temperatura Entrada de Ar","unit":"°C","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.INT","secondary":"secondary","inline":true,"animate":true,"sectors":[{"val":-40,"col":"#1100ff","t":"min","dot":0},{"val":40,"col":"#00ff00","t":"sec","dot":0},{"val":80,"col":"#eeff00","t":"sec","dot":0},{"val":90,"col":"#cc0000","t":"sec","dot":0},{"val":100,"col":"#cc0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":310,"y":420,"wires":[]},{"id":"3829ad35349f06dd","type":"ui_table","z":"249a4ff7d0b1d7e5","group":"43933c66e4feb46d","name":"Dados anteriores","order":8,"width":8,"height":2,"columns":[{"field":"CODE","title":"Código","width":"33px","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"DESC","title":"Descrição","width":"64px","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":670,"y":360,"wires":[]},{"id":"80acb3519ddb1f59","type":"ui_text","z":"249a4ff7d0b1d7e5","group":"43933c66e4feb46d","order":7,"width":8,"height":1,"name":"","label":"Erros Anteriores","format":"{{msg.payload}}","layout":"row-spread","className":"","x":660,"y":320,"wires":[]},{"id":"e8af5ece9afcea4b","type":"ui_button","z":"249a4ff7d0b1d7e5","name":"","group":"2f6e17de8989bbd7","order":3,"width":0,"height":0,"passthru":false,"label":"Limpar Dados","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"Tem certeza?","payloadType":"str","topic":"topic","topicType":"msg","x":340,"y":460,"wires":[["8ae9a17e6c27ad80"]]},{"id":"8ae9a17e6c27ad80","type":"ui_toast","z":"249a4ff7d0b1d7e5","position":"dialog","displayTime":"3","highlight":"","sendall":false,"outputs":1,"ok":"Sim","cancel":"Não","raw":false,"className":"","topic":"","name":"","x":530,"y":460,"wires":[["77199d94f4abf95d"]]},{"id":"f862d74ea4f767ea","type":"ui_artlessgauge","z":"249a4ff7d0b1d7e5","group":"43933c66e4feb46d","order":1,"width":0,"height":0,"name":"Velocidade","icon":"","label":"Velocidade","unit":"KM/H","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.SPD","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#0055ff","t":"min","dot":0},{"val":30,"col":"#009919","t":"sec","dot":0},{"val":50,"col":"#cccc00","t":"sec","dot":0},{"val":80,"col":"#ffa200","t":"sec","dot":0},{"val":130,"col":"#ff0000","t":"sec","dot":0},{"val":255,"col":"#ff0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":650,"y":160,"wires":[]},{"id":"14ac0d21fecb469d","type":"ui_artlessgauge","z":"249a4ff7d0b1d7e5","group":"43933c66e4feb46d","order":3,"width":8,"height":1,"name":"RPM","icon":"","label":"RPM","unit":"","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.RPM","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#0055ff","t":"min","dot":0},{"val":500,"col":"#66ff69","t":"sec","dot":0},{"val":3000,"col":"#fbff00","t":"sec","dot":0},{"val":5000,"col":"#ff9500","t":"sec","dot":0},{"val":8000,"col":"#ff0000","t":"sec","dot":0},{"val":9000,"col":"#ff0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":630,"y":120,"wires":[]},{"id":"c870a3dab604345e","type":"ui_artlessgauge","z":"249a4ff7d0b1d7e5","group":"43933c66e4feb46d","order":4,"width":0,"height":0,"name":"Acelerador","icon":"","label":"Acelerador","unit":"","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.PDL","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#1100ff","t":"min","dot":0},{"val":40,"col":"#00f531","t":"sec","dot":0},{"val":70,"col":"#ffc72e","t":"sec","dot":0},{"val":90,"col":"#ff0000","t":"sec","dot":0},{"val":100,"col":"#ff0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":650,"y":200,"wires":[]},{"id":"541fc96249e45168","type":"ui_artlessgauge","z":"249a4ff7d0b1d7e5","group":"43933c66e4feb46d","order":5,"width":8,"height":1,"name":"Coolant","icon":"","label":"Temperatura Motor","unit":"°C","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.COL","secondary":"secondary","inline":true,"animate":true,"sectors":[{"val":80,"col":"#1100ff","t":"min","dot":0},{"val":87,"col":"#03cc00","t":"sec","dot":0},{"val":100,"col":"#e1ff00","t":"sec","dot":0},{"val":105,"col":"#ff0000","t":"sec","dot":0},{"val":150,"col":"#ff0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":640,"y":240,"wires":[]},{"id":"27df7af21d275b58","type":"ui_artlessgauge","z":"249a4ff7d0b1d7e5","group":"43933c66e4feb46d","order":6,"width":8,"height":1,"name":"Intake","icon":"","label":"Temperatura Entrada de Ar","unit":"°C","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.INT","secondary":"secondary","inline":true,"animate":true,"sectors":[{"val":-40,"col":"#1100ff","t":"min","dot":0},{"val":40,"col":"#00ff00","t":"sec","dot":0},{"val":80,"col":"#eeff00","t":"sec","dot":0},{"val":90,"col":"#cc0000","t":"sec","dot":0},{"val":100,"col":"#cc0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":630,"y":280,"wires":[]},{"id":"7ded16e4c8781f69","type":"link in","z":"249a4ff7d0b1d7e5","name":"freeze frame data component","links":["5164c25b0505c4df"],"x":465,"y":120,"wires":[["14ac0d21fecb469d","f862d74ea4f767ea","c870a3dab604345e","541fc96249e45168","27df7af21d275b58","29e8d738f38bdb76"]]},{"id":"abc242fa2d577bec","type":"link in","z":"249a4ff7d0b1d7e5","name":"error table ui component","links":["107e18e2f30352fe"],"x":475,"y":360,"wires":[["3829ad35349f06dd"]]},{"id":"6afd0641f0b1bd76","type":"link in","z":"249a4ff7d0b1d7e5","name":"car history ui component","links":["4e719f79721d1d9c"],"x":765,"y":240,"wires":[["6dbe5d22b1e68232"]]},{"id":"77199d94f4abf95d","type":"link out","z":"249a4ff7d0b1d7e5","name":"delete request button","mode":"link","links":["cc60f3d0d8d4725c"],"x":655,"y":460,"wires":[]},{"id":"35482836fa6bbe10","type":"link in","z":"249a4ff7d0b1d7e5","name":"current data ui component","links":["95b2eacab91265c3"],"x":175,"y":340,"wires":[["fbac54c0c8e25c91","b79deaf398a38808","3d3b3c45bf9fe119","0288f391495bb860","26ce7f67cc1302d0","d2bd6183d8398ab1"]]},{"id":"97990e06bc59f688","type":"ui_button","z":"249a4ff7d0b1d7e5","name":"","group":"2f6e17de8989bbd7","order":1,"width":0,"height":0,"passthru":false,"label":"Voltar","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"Menu Carro","payloadType":"str","topic":"topic","topicType":"msg","x":310,"y":500,"wires":[["a3f9b4dc0c8a9465"]]},{"id":"a3f9b4dc0c8a9465","type":"ui_ui_control","z":"249a4ff7d0b1d7e5","name":"","events":"change","x":520,"y":540,"wires":[[]]},{"id":"3f44e61cb5d2e652","type":"ui_button","z":"249a4ff7d0b1d7e5","name":"","group":"2f6e17de8989bbd7","order":2,"width":0,"height":0,"passthru":false,"label":"Configurações","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"Configurações","payloadType":"str","topic":"topic","topicType":"msg","x":340,"y":540,"wires":[["a3f9b4dc0c8a9465","fd8d3aad0e17029c"]]},{"id":"fd8d3aad0e17029c","type":"link out","z":"249a4ff7d0b1d7e5","name":"changing to config tab","mode":"link","links":["09b8c60f3110cc66"],"x":475,"y":580,"wires":[]},{"id":"aff747ada3c2ebcb","type":"ui_text","z":"249a4ff7d0b1d7e5","group":"3c7d50b1062eacd4","order":1,"width":0,"height":0,"name":"timestamp","label":"Últimos dados:","format":"{{msg.payload.timestamp}}","layout":"row-spread","className":"","x":330,"y":220,"wires":[]},{"id":"d2bd6183d8398ab1","type":"function","z":"249a4ff7d0b1d7e5","name":"Convert timestamp","func":"msg.payload.timestamp = new Date(msg.payload.timestamp* 1000);\nlet ts = msg.payload.timestamp.toLocaleString();\nmsg.payload.timestamp = ts;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":150,"y":220,"wires":[["aff747ada3c2ebcb"]]},{"id":"72e629e582bb7399","type":"tab","label":"simple car view","disabled":false,"info":"","env":[]},{"id":"381683d94cf54d05","type":"ui_template","z":"72e629e582bb7399","group":"83dfbdc5d81da0f4","name":"alerta_temperatura_motor","order":5,"width":3,"height":3,"format":"<style>\n #led_temp {\n fill: {{msg.col_alert}};\n stroke-width: 1px;\n }\n</style>\n<div class=\"center led-status-car\">\n<svg id=\"led_temp\" viewBox=\"25 5 50 70\" width=\"120\" height=\"120\">\n<circle id=\"e3_circle\" cx=\"41.360800\" cy=\"40.136200\" r=\"6.443890\" transform=\"matrix(0.75935 0 0 0.80935 16.5245 9.69276)\"/>\n<rect x=\"37.147600\" y=\"16.054200\" id=\"e4_rectangle\" width=\"8.544920\" height=\"22.586300\" transform=\"matrix(0.662493 0 0 1 20.4885 0.902053)\"/>\n<circle id=\"e2_circle\" cx=\"40.685800\" cy=\"5.031910\" r=\"9.064830\" transform=\"matrix(0.338422 -0.000740455 0.000240455 0.338422 34.2273 14.7899)\"/>\n<rect x=\"50.381000\" y=\"19.319800\" id=\"e5_rectangle\" width=\"6.258410\" height=\"2.312850\"/>\n<rect x=\"50.381000\" y=\"26.666700\" id=\"e2_rectangle\" width=\"6.258410\" height=\"2.312850\" transform=\"matrix(1 0 0 1 0 -0.408159)\"/>\n<rect x=\"50.381000\" y=\"33.197300\" id=\"e3_rectangle\" width=\"6.258410\" height=\"2.312850\"/>\n<text x=\"17\" y=\"60\">TEMPERATURA</text>\n<text x=\"32\" y=\"70\">MOTOR</text>\n</svg>\n</div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":770,"y":340,"wires":[[]]},{"id":"497278fd7c775bce","type":"ui_template","z":"72e629e582bb7399","group":"83dfbdc5d81da0f4","name":"alerta_pane_motor","order":8,"width":3,"height":3,"format":"<style>\n #led_mil {\n fill: {{msg.mil_alert}} !important;\n stroke-width: 1px;\n }\n #mil_path\n {\n fill: {{msg.mil_alert}} !important;\n scale: 0.5;\n }\n</style>\n<div class=\"center led-status-car\">\n<svg id=\"led_mil\" viewBox=\"25 10 50 70\" width=\"120\" height=\"120\">\n<g xmlns=\"http://www.w3.org/2000/svg\" id=\"svg833\"><path id=\"mil_path\" style=\"fill:black\" transform=\"translate(60, 45)\" d=\"M21.33,3.23V0h27V3.24H40.73v3h1.18c2.28,0,4.56,0,6.84,0a5.44,5.44,0,0,1,5.74,5.1,8,8,0,0,0,.21,1.3,2.36,2.36,0,0,0,2.44,1.87l6.36,0a2.12,2.12,0,0,1,.32.17v6.1h3.31v-6.1a7.6,7.6,0,0,1,.8-.14c2.72,0,5.44,0,8.16,0a1,1,0,0,1,1.15.89c.58,2.49,1.27,5,1.84,7.44a15.64,15.64,0,0,1,.39,3.2c0,3.4-.11,6.8,0,10.2a32.26,32.26,0,0,1-1.45,10.38c-.31,1.12-.53,2.26-.87,3.36-.11.34-.49.84-.75.84-3,.06-6.07,0-9.24,0V44.62h-3.4c0,1.06,0,2.05,0,3A5.38,5.38,0,0,1,58.57,53c-9.56,0-19.12,0-28.68,0a6,6,0,0,1-4.2-2c-2.1-2.08-4.24-4.13-6.31-6.23a3.32,3.32,0,0,0-2.66-1.1c-1.11,0-2.24,0-3.36,0A5.37,5.37,0,0,1,8.1,38.18c0-3.4,0-6.8,0-10.29H3.76V40.42c-2.17-.3-2.55-.72-2.55-2.66,0-3.32,0-6.64,0-10,0-.41,0-1-.3-1.21-1-.77-.9-1.78-.9-2.82C0,21,0,18.25,0,15.49A3,3,0,0,1,.8,13.75c.8-.91,1.76-1.69,2.86-2.73V24.31H8.1V19.83c0-.84,0-1.68,0-2.52a5.48,5.48,0,0,1,5.3-5.56c.36,0,.72,0,1.08,0,2.23,0,2.38-.15,3.31-2.18A5.34,5.34,0,0,1,22.88,6.2c2,0,4.06,0,6.18,0v-3ZM60.48,17.85H57.69c-3.82,0-6-2-6.5-5.74-.23-2-.84-2.54-2.88-2.54H23.72c-2,0-2.34.25-3.13,2.11a5.29,5.29,0,0,1-4.68,3.4c-.71.06-1.44,0-2.16,0a2.18,2.18,0,0,0-2.3,2.37q0,10.2,0,20.39a2.13,2.13,0,0,0,2.27,2.38c1.08.06,2.16,0,3.24,0a6.07,6.07,0,0,1,4.62,1.91c2.13,2.15,4.32,4.25,6.46,6.4a3.51,3.51,0,0,0,2.66,1.1c9,0,18,0,27,0,2,0,2.76-.77,2.77-2.73V41.28H70.53v6.26c1.19,0,2.26,0,3.33,0a1,1,0,0,0,.7-.6c.63-2.83,1.75-5.55,1.65-8.55-.12-3.35-.16-6.72,0-10.07s-.79-6.48-1.6-9.64c-.08-.29-.38-.73-.6-.75-1.13-.07-2.27,0-3.54,0V24.1h-10Z\"/></g>\n<text x=\"39\" y=\"65\">PANE</text>\n<text x=\"34\" y=\"75\">MOTOR</text>\n</svg>\n</div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":750,"y":560,"wires":[[]]},{"id":"fdfcaa1ef0bb4427","type":"ui_template","z":"72e629e582bb7399","group":"83dfbdc5d81da0f4","name":"alerta_rpm","order":6,"width":3,"height":3,"format":"<style>\n #led_rpm {\n fill: {{msg.rpm_alert}};\n stroke-width: 1px;\n }\n #rpm_path\n {\n fill: {{msg.rpm_alert}} !important;\n scale: 0.15;\n }\n</style>\n<div class=\"center led-status-car\">\n<svg id=\"led_rpm\" viewBox=\"25 5 50 70\" width=\"120\" height=\"120\">\n<path id=\"rpm_path\" style=\"fill:black\" transform=\"translate(190, 65)\" xmlns=\"http://www.w3.org/2000/svg\" d=\"m107.75 22.159v21.571c-8.835 2.117-17.286 5.608-25.04 10.347l-15.234-15.234-28.632 28.634 15.26 15.26c-4.7448 7.7444-8.2443 16.186-10.371 25.016h-21.573v40.493h21.571c2.1161 8.8382 5.6076 17.289 10.347 25.043l-15.234 15.234 28.632 28.634 15.262-15.262c7.7444 4.7448 16.186 8.2443 25.016 10.371v21.573h40.493v-21.571c8.8375-2.1163 17.288-5.6078 25.041-10.347l15.236 15.236 28.632-28.634-15.26-15.26c4.745-7.745 8.2445-16.187 10.371-25.018h21.573v-40.493h-21.571c-2.1163-8.8375-5.6078-17.288-10.347-25.041l15.25-15.222-28.64-28.634-15.26 15.26c-7.745-4.745-16.187-8.2445-25.018-10.371v-21.573h-40.493zm20.247 57.537a48.303 48.303 0 0 1 48.3 48.304 48.303 48.303 0 0 1 -48.3 48.3 48.303 48.303 0 0 1 -48.303 -48.3 48.303 48.303 0 0 1 48.303 -48.304z\" fill-rule=\"evenodd\"/>\n<text x=\"28\" y=\"60\">ROTAÇÃO</text>\n<text x=\"26\" y=\"70\">EXCESSIVA</text>\n</svg>\n</div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":730,"y":240,"wires":[[]]},{"id":"1369f66da95c140c","type":"ui_template","z":"72e629e582bb7399","group":"83dfbdc5d81da0f4","name":"alerta_spd","order":7,"width":3,"height":3,"format":"<style>\n #led_spd {\n fill: {{msg.spd_alert}};\n stroke-width: 1px;\n }\n #spd_path\n {\n fill: {{msg.spd_alert}} !important;\n scale: 0.3;\n }\n</style>\n<div class=\"center led-status-car\">\n<svg id=\"led_spd\" viewBox=\"25 5 50 70\" width=\"120\" height=\"120\">\n<g><path id=\"spd_path\" style=\"fill:black\" transform=\"translate(100, 45)\" d=\"M58.15,52.98l28.6-18.22c0.2-0.15,0.48-0.12,0.65,0.06l2.76,2.94c0.17,0.18,0.18,0.47,0.02,0.66L68.51,63.6 c-3.08,3.31-6.37,3.96-9.02,3.1c-1.32-0.43-2.47-1.22-3.35-2.25c-0.88-1.02-1.49-2.27-1.74-3.61c-0.49-2.67,0.49-5.66,3.73-7.85 L58.15,52.98L58.15,52.98z M19.33,106.17c-3.05-2.87-5.8-6.05-8.21-9.48c-2.39-3.4-4.44-7.06-6.11-10.91 C3.38,82,2.12,78.02,1.26,73.88C0.44,69.86,0,65.7,0,61.44c0-8.32,1.66-16.25,4.65-23.49C7.77,30.43,12.33,23.66,18,18 c5.66-5.66,12.43-10.23,19.95-13.34C45.19,1.66,53.12,0,61.44,0c8.3,0,16.21,1.66,23.43,4.66c7.52,3.12,14.28,7.7,19.95,13.37 c5.68,5.68,10.26,12.46,13.38,19.97c3.01,7.24,4.68,15.16,4.68,23.44c0,4.05-0.4,8.01-1.16,11.85c-0.78,3.94-1.95,7.75-3.46,11.4 c-1.54,3.71-3.43,7.25-5.64,10.55c-2.23,3.34-4.78,6.45-7.6,9.3c-0.19,0.19-0.51,0.19-0.7,0l-3.07-3.06 c-0.06-0.02-0.12-0.06-0.17-0.11l-8.56-8.56c-0.19-0.19-0.19-0.51,0-0.7l4.49-4.49c0.19-0.19,0.51-0.19,0.7,0l6.61,6.61 c1.4-1.82,2.69-3.72,3.85-5.7c1.25-2.12,2.35-4.34,3.3-6.63c1.28-3.1,2.29-6.35,2.97-9.71c0.64-3.12,1-6.35,1.07-9.64h-9.11 c-0.27,0-0.5-0.22-0.5-0.5V55.7c0-0.27,0.22-0.5,0.5-0.5h8.76c-0.68-5.85-2.31-11.43-4.72-16.58c-2.49-5.31-5.82-10.15-9.82-14.37 l-5.86,5.86c-0.19,0.19-0.51,0.19-0.7,0l-4.49-4.49c-0.19-0.19-0.19-0.51,0-0.7l5.65-5.65c-4.44-3.57-9.45-6.46-14.87-8.5 C75.1,8.8,69.47,7.62,63.6,7.39v8.03c0,0.27-0.22,0.5-0.5,0.5h-6.36c-0.27,0-0.5-0.22-0.5-0.5V7.59 c-5.83,0.55-11.4,2.04-16.54,4.29c-5.31,2.33-10.17,5.49-14.42,9.3l5.87,5.87c0.19,0.19,0.19,0.51,0,0.7l-4.49,4.49 c-0.19,0.19-0.51,0.19-0.7,0l-5.8-5.8c-3.73,4.4-6.78,9.41-8.96,14.86C9.1,46.6,7.79,52.29,7.44,58.23h9.03 c0.27,0,0.5,0.22,0.5,0.5v6.36c0,0.27-0.22,0.5-0.5,0.5H7.5c0.22,2.94,0.68,5.8,1.35,8.58c0.72,3.01,1.7,5.92,2.91,8.72 c1.05,2.43,2.27,4.76,3.64,6.98c1.29,2.09,2.72,4.09,4.28,5.97l7.24-7.24c0.19-0.19,0.51-0.19,0.7,0l4.49,4.49 c0.19,0.19,0.19,0.51,0,0.7c-4.14,4.14-8.09,8.11-12.09,12.36C19.84,106.35,19.53,106.36,19.33,106.17L19.33,106.17z\"></path></g>\n\n<text x=\"20\" y=\"60\">VELOCIDADE</text>\n<text x=\"26\" y=\"70\">EXCESSIVA</text>\n</svg>\n</div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":750,"y":440,"wires":[[]]},{"id":"1232549f946e27e2","type":"ui_template","z":"72e629e582bb7399","group":"83dfbdc5d81da0f4","name":"codigo de erro","order":10,"width":12,"height":2,"format":"<h3>{{msg.payload.FRZ[0]}}</h3>\n<h4>{{msg.payload.FRZ[1]}}</h4>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":340,"y":680,"wires":[[]]},{"id":"42329a9d43d4d88d","type":"ui_text","z":"72e629e582bb7399","group":"83dfbdc5d81da0f4","order":9,"width":0,"height":0,"name":"","label":"Código de Erro","format":"{{msg.payload}}","layout":"row-spread","className":"","x":340,"y":640,"wires":[]},{"id":"7667e8eb31082b17","type":"ui_button","z":"72e629e582bb7399","name":"detalhes","group":"83dfbdc5d81da0f4","order":11,"width":0,"height":0,"passthru":false,"label":"Ver Detalhes","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"Detalhes","payloadType":"str","topic":"topic","topicType":"msg","x":320,"y":720,"wires":[["399b64db4aa110df"]]},{"id":"ffbaf10fc78f5835","type":"ui_artlessgauge","z":"72e629e582bb7399","group":"83dfbdc5d81da0f4","order":2,"width":0,"height":0,"name":"RPM","icon":"","label":"RPM","unit":"","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.RPM","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#0055ff","t":"min","dot":0},{"val":500,"col":"#66ff69","t":"sec","dot":0},{"val":3000,"col":"#fbff00","t":"sec","dot":0},{"val":5000,"col":"#ff9500","t":"sec","dot":0},{"val":8000,"col":"#ff0000","t":"sec","dot":0},{"val":9000,"col":"#ff0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":310,"y":100,"wires":[]},{"id":"161b383572c5d0f5","type":"ui_artlessgauge","z":"72e629e582bb7399","group":"83dfbdc5d81da0f4","order":3,"width":0,"height":0,"name":"Velocidade","icon":"","label":"Velocidade","unit":"KM/H","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.SPD","secondary":"secondary","inline":false,"animate":true,"sectors":[{"val":0,"col":"#0055ff","t":"min","dot":0},{"val":30,"col":"#009919","t":"sec","dot":0},{"val":50,"col":"#cccc00","t":"sec","dot":0},{"val":80,"col":"#ffa200","t":"sec","dot":0},{"val":130,"col":"#ff0000","t":"sec","dot":0},{"val":255,"col":"#ff0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":330,"y":140,"wires":[]},{"id":"41df52cb719a18cf","type":"ui_artlessgauge","z":"72e629e582bb7399","group":"83dfbdc5d81da0f4","order":4,"width":0,"height":0,"name":"Coolant","icon":"","label":"Temperatura Motor","unit":"°C","layout":"linear","decimals":"2","differential":false,"minmax":false,"colorTrack":"#555555","style":"","colorFromTheme":true,"property":"payload.COL","secondary":"secondary","inline":true,"animate":true,"sectors":[{"val":80,"col":"#1100ff","t":"min","dot":0},{"val":87,"col":"#03cc00","t":"sec","dot":0},{"val":100,"col":"#e1ff00","t":"sec","dot":0},{"val":105,"col":"#ff0000","t":"sec","dot":0},{"val":150,"col":"#ff0000","t":"max","dot":0}],"lineWidth":3,"bgcolorFromTheme":true,"diffCenter":"","x":320,"y":180,"wires":[]},{"id":"399b64db4aa110df","type":"ui_ui_control","z":"72e629e582bb7399","name":"","events":"change","x":480,"y":720,"wires":[[]]},{"id":"588bd75a649d8b02","type":"link in","z":"72e629e582bb7399","name":"freeze frame error","links":["5164c25b0505c4df"],"x":185,"y":680,"wires":[["1232549f946e27e2"]]},{"id":"bbe448e170e4d3e4","type":"link in","z":"72e629e582bb7399","name":"current data","links":["95b2eacab91265c3"],"x":115,"y":100,"wires":[["ffbaf10fc78f5835","161b383572c5d0f5","41df52cb719a18cf","9c066f890345e0c8","58b36c42dd22451d","aea15776539df8cd","b1fa2c0902ccec41"]]},{"id":"67086cb1a048d121","type":"switch","z":"72e629e582bb7399","name":"MIL","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":150,"y":600,"wires":[["9f1dc1deeb346fab"],["506c8de005876a3d"]]},{"id":"9f1dc1deeb346fab","type":"change","z":"72e629e582bb7399","name":"MIL on","rules":[{"t":"set","p":"mil_alert","pt":"msg","to":"orange","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":560,"wires":[["497278fd7c775bce"]]},{"id":"506c8de005876a3d","type":"change","z":"72e629e582bb7399","name":"MIL off","rules":[{"t":"set","p":"mil_alert","pt":"msg","to":"black","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":600,"wires":[["497278fd7c775bce"]]},{"id":"ed3765da020faa88","type":"link in","z":"72e629e582bb7399","name":"engine error ","links":["290a2f511e1b4811"],"x":105,"y":560,"wires":[["67086cb1a048d121"]]},{"id":"9c066f890345e0c8","type":"switch","z":"72e629e582bb7399","name":"rpm alert","property":"payload.RPM","propertyType":"msg","rules":[{"t":"gt","v":"rpm_threshold","vt":"global"},{"t":"lte","v":"rpm_threshold","vt":"global"}],"checkall":"true","repair":false,"outputs":2,"x":320,"y":260,"wires":[["324f14276ea2a235"],["1b2fc0e360f9c8cd"]]},{"id":"324f14276ea2a235","type":"change","z":"72e629e582bb7399","name":"rpm above max","rules":[{"t":"set","p":"rpm_alert","pt":"msg","to":"orange","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":240,"wires":[["fdfcaa1ef0bb4427"]]},{"id":"1b2fc0e360f9c8cd","type":"change","z":"72e629e582bb7399","name":"rpm ok","rules":[{"t":"set","p":"rpm_alert","pt":"msg","to":"black","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":280,"wires":[["fdfcaa1ef0bb4427"]]},{"id":"58b36c42dd22451d","type":"switch","z":"72e629e582bb7399","name":"coolant alert","property":"payload.COL","propertyType":"msg","rules":[{"t":"gt","v":"coolant_threshold","vt":"global"},{"t":"lte","v":"coolant_threshold","vt":"global"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":360,"wires":[["d81ea16881c8221d"],["b66b727061c4344f"]]},{"id":"b66b727061c4344f","type":"change","z":"72e629e582bb7399","name":"coolant ok","rules":[{"t":"set","p":"col_alert","pt":"msg","to":"black","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":380,"wires":[["381683d94cf54d05"]]},{"id":"d81ea16881c8221d","type":"change","z":"72e629e582bb7399","name":"coolant above max","rules":[{"t":"set","p":"col_alert","pt":"msg","to":"orange","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":340,"wires":[["381683d94cf54d05"]]},{"id":"aea15776539df8cd","type":"switch","z":"72e629e582bb7399","name":"speed alert","property":"payload.SPD","propertyType":"msg","rules":[{"t":"gt","v":"spd_threshold","vt":"global"},{"t":"lte","v":"spd_threshold","vt":"global"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":460,"wires":[["648edd80ec4609e5"],["453180198fe4b092"]]},{"id":"648edd80ec4609e5","type":"change","z":"72e629e582bb7399","name":"speed above max","rules":[{"t":"set","p":"spd_alert","pt":"msg","to":"orange","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":440,"wires":[["1369f66da95c140c"]]},{"id":"453180198fe4b092","type":"change","z":"72e629e582bb7399","name":"speed ok","rules":[{"t":"set","p":"spd_alert","pt":"msg","to":"black","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":480,"wires":[["1369f66da95c140c"]]},{"id":"3f60c185f0f316f1","type":"ui_text","z":"72e629e582bb7399","group":"83dfbdc5d81da0f4","order":1,"width":0,"height":0,"name":"timestamp","label":"Últimos dados:","format":"{{msg.payload.timestamp}}","layout":"row-spread","className":"","x":330,"y":60,"wires":[]},{"id":"b1fa2c0902ccec41","type":"function","z":"72e629e582bb7399","name":"Convert timestamp","func":"msg.payload.timestamp = new Date(msg.payload.timestamp* 1000);\nlet ts = msg.payload.timestamp.toLocaleString();\nmsg.payload.timestamp = ts;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":150,"y":60,"wires":[["3f60c185f0f316f1"]]},{"id":"8218571184381fe1","type":"tab","label":"car logic","disabled":false,"info":"","env":[]},{"id":"1d0479f6bc979bb1","type":"mqtt in","z":"8218571184381fe1","name":"","topic":"python/obdata","qos":"2","datatype":"auto","broker":"6992075b538d96f8","nl":true,"rap":true,"rh":0,"inputs":0,"x":150,"y":120,"wires":[["1a33aae22e09835e"]]},{"id":"1a33aae22e09835e","type":"json","z":"8218571184381fe1","name":"format rx message","property":"payload","action":"obj","pretty":false,"x":370,"y":120,"wires":[["274778b25ca84f0b","10e36d154fbc92ee","fa93d4231885566d","95b2eacab91265c3","28a1532308b7437e"]]},{"id":"e817ca7d0a68a820","type":"inject","z":"8218571184381fe1","name":"fail","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"timestamp\":1668370055,\"RPM\":3100,\"SPD\":140,\"PDL\":16.6666,\"INT\":20.0656,\"COL\":110,\"TRB\":true,\"ERR\":{\"LST\":[[\"P0104\",\"Mass or Volume Air Flow Circuit Intermittent\"],[\"B0003\",\"\"],[\"C0123\",\"\"]],\"FRZ\":[\"P0104\",\"Mass or Volume Air Flow Circuit Intermittent\"],\"RPM\":700,\"SPD\":0,\"PDL\":12.3333333,\"INT\":70,\"COL\":100}}","payloadType":"json","x":150,"y":160,"wires":[["1a33aae22e09835e"]]},{"id":"274778b25ca84f0b","type":"change","z":"8218571184381fe1","name":"engine light check","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.TRB","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":400,"wires":[["e30fdc6b1627c8cc"]]},{"id":"3e4833bd97a2ddf9","type":"file","z":"8218571184381fe1","name":"save file","filename":"arquivo-carro.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":940,"y":120,"wires":[[]]},{"id":"4ff3240a4383860e","type":"inject","z":"8218571184381fe1","name":"good","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"timestamp\":1665607045,\"RPM\":807.25,\"SPD\":2,\"PDL\":13.72549019607843,\"INT\":48,\"COL\":97,\"TRB\":false,\"ERR\":null}","payloadType":"json","x":150,"y":200,"wires":[["1a33aae22e09835e"]]},{"id":"2c39208b4dfade7f","type":"file in","z":"8218571184381fe1","name":"read prev. car data","filename":"arquivo-carro.txt","format":"lines","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":390,"y":860,"wires":[["1243ed31402252ce"]]},{"id":"1de8634d5a1db0f0","type":"json","z":"8218571184381fe1","name":"read json from file","property":"payload","action":"obj","pretty":false,"x":390,"y":940,"wires":[["11045786c2726e7f"]]},{"id":"10e36d154fbc92ee","type":"json","z":"8218571184381fe1","name":"prep to save","property":"payload","action":"str","pretty":false,"x":790,"y":120,"wires":[["3e4833bd97a2ddf9"]]},{"id":"1243ed31402252ce","type":"switch","z":"8218571184381fe1","name":"not empty check","property":"payload","propertyType":"msg","rules":[{"t":"neq","v":"","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":380,"y":900,"wires":[["1de8634d5a1db0f0"]]},{"id":"1092d949ee4050d6","type":"join","z":"8218571184381fe1","name":"join parts","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"5","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":600,"y":940,"wires":[["4e719f79721d1d9c"]]},{"id":"2f9b359d2edbfa9d","type":"change","z":"8218571184381fe1","name":"load error values","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.ERR","tot":"msg","dc":true}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":320,"wires":[["47581b3b6d664858","5164c25b0505c4df"]]},{"id":"fa93d4231885566d","type":"switch","z":"8218571184381fe1","name":"car has error?","property":"payload.ERR","propertyType":"msg","rules":[{"t":"nnull"},{"t":"null"}],"checkall":"true","repair":false,"outputs":2,"x":800,"y":320,"wires":[["2f9b359d2edbfa9d"],["02a6382425d23121"]]},{"id":"02a6382425d23121","type":"change","z":"8218571184381fe1","name":"clear error values","rules":[{"t":"set","p":"payload.ERR","pt":"msg","to":"{\"LST\":null,\"FRZ\":null,\"RPM\":null,\"SPD\":null,\"PDL\":null,\"INT\":null,\"COL\":null}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":360,"wires":[["2f9b359d2edbfa9d"]]},{"id":"47581b3b6d664858","type":"change","z":"8218571184381fe1","name":"get error code list","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.LST","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":360,"wires":[["38f0ccdac745359e"]]},{"id":"38f0ccdac745359e","type":"function","z":"8218571184381fe1","name":"order error codes to table","func":"if (msg.payload != null){\n var tmp = msg.payload;\n msg.payload = [];\n for (i = 0; i < tmp.length; i++)\n {\n msg.payload[i] = {\n \"CODE\" : tmp[i][0],\n \"DESC\" : tmp[i][1]\n };\n }\n}\nelse\n{\n msg.payload = [{\"CODE\":null,\"DESC\":null}];\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1270,"y":360,"wires":[["107e18e2f30352fe"]]},{"id":"647cdc791eedecf9","type":"switch","z":"8218571184381fe1","name":"clear file request","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Sim","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":380,"y":700,"wires":[["26151946b7fc1074"]]},{"id":"4fa12a21fdcba3c7","type":"file","z":"8218571184381fe1","name":"delete","filename":"arquivo-carro.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","encoding":"none","x":350,"y":620,"wires":[["ea9894f622a06121"]]},{"id":"26151946b7fc1074","type":"change","z":"8218571184381fe1","name":"clear file","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":660,"wires":[["4fa12a21fdcba3c7"]]},{"id":"a7b709f91159494d","type":"inject","z":"8218571184381fe1","name":"startup","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":860,"wires":[["2c39208b4dfade7f"]]},{"id":"ea9894f622a06121","type":"function","z":"8218571184381fe1","name":"reset values","func":"msg.payload = [\n {\n \"RPM\" : null,\n \"SPD\" : null,\n \"PDL\" : null,\n \"INT\" : null,\n \"COL\" : null,\n \"TRB\" : null,\n \"ERR\" : null\n }\n ];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":580,"wires":[["fa93d4231885566d","4e719f79721d1d9c","95b2eacab91265c3"]]},{"id":"e30fdc6b1627c8cc","type":"switch","z":"8218571184381fe1","name":"engine light turned on?","property":"payload","propertyType":"msg","rules":[{"t":"null"},{"t":"nnull"}],"checkall":"true","repair":false,"outputs":2,"x":1020,"y":400,"wires":[["1627e07b5c12e95c"],["290a2f511e1b4811"]]},{"id":"1627e07b5c12e95c","type":"change","z":"8218571184381fe1","name":"engine light turned off","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1240,"y":400,"wires":[["290a2f511e1b4811"]]},{"id":"c8778fc95a5f3a55","type":"watch","z":"8218571184381fe1","name":"watch prev. car data","files":"arquivo-carro.txt","recursive":"","x":390,"y":820,"wires":[["2c39208b4dfade7f"]]},{"id":"28a1532308b7437e","type":"debug","z":"8218571184381fe1","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":350,"y":80,"wires":[]},{"id":"5164c25b0505c4df","type":"link out","z":"8218571184381fe1","name":"formatted freeze frame data","mode":"link","links":["7ded16e4c8781f69","588bd75a649d8b02","78176010f4c32e32"],"x":1195,"y":320,"wires":[]},{"id":"107e18e2f30352fe","type":"link out","z":"8218571184381fe1","name":"formatted car error msg","mode":"link","links":["abc242fa2d577bec"],"x":1415,"y":360,"wires":[]},{"id":"290a2f511e1b4811","type":"link out","z":"8218571184381fe1","name":"engine light check","mode":"link","links":["4d0417acb90a1287","ed3765da020faa88"],"x":1175,"y":460,"wires":[]},{"id":"4e719f79721d1d9c","type":"link out","z":"8218571184381fe1","name":"car table prep","mode":"link","links":["6afd0641f0b1bd76"],"x":715,"y":940,"wires":[]},{"id":"cc60f3d0d8d4725c","type":"link in","z":"8218571184381fe1","name":"request clear file","links":["77199d94f4abf95d"],"x":225,"y":660,"wires":[["647cdc791eedecf9"]]},{"id":"95b2eacab91265c3","type":"link out","z":"8218571184381fe1","name":"car values","mode":"link","links":["35482836fa6bbe10","bbe448e170e4d3e4"],"x":735,"y":280,"wires":[]},{"id":"866d8bfacaea6f0c","type":"file in","z":"8218571184381fe1","name":"cfg file","filename":"config_car.cfg","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":930,"y":620,"wires":[["0c08b74485670f0a"]]},{"id":"3c493bbbc2f674b9","type":"json","z":"8218571184381fe1","name":"","property":"payload","action":"obj","pretty":false,"x":1090,"y":620,"wires":[["af4d7b6b1e62b7c3"]]},{"id":"af4d7b6b1e62b7c3","type":"change","z":"8218571184381fe1","name":"set config","rules":[{"t":"move","p":"payload.spd_threshold","pt":"msg","to":"spd_threshold","tot":"global"},{"t":"move","p":"payload.coolant_threshold","pt":"msg","to":"coolant_threshold","tot":"global"},{"t":"move","p":"payload.rpm_threshold","pt":"msg","to":"rpm_threshold","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1260,"y":620,"wires":[[]]},{"id":"fa01d7bfb8c43d0f","type":"change","z":"8218571184381fe1","name":"defaults","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"spd_threshold\":130,\"rpm_threshold\":3000,\"coolant_threshold\":105}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1100,"y":680,"wires":[["af4d7b6b1e62b7c3"]]},{"id":"0c08b74485670f0a","type":"switch","z":"8218571184381fe1","name":"check cfg file","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"null"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":3,"x":950,"y":660,"wires":[["3c493bbbc2f674b9"],["fa01d7bfb8c43d0f"],["fa01d7bfb8c43d0f"]]},{"id":"746279b21d92655e","type":"catch","z":"8218571184381fe1","name":"file read fail","scope":["866d8bfacaea6f0c"],"uncaught":false,"x":950,"y":700,"wires":[["fa01d7bfb8c43d0f"]]},{"id":"75e203eb34ed333f","type":"comment","z":"8218571184381fe1","name":"reset_historico()","info":"","x":380,"y":540,"wires":[]},{"id":"6b2ec685f65d401d","type":"comment","z":"8218571184381fe1","name":"carregar_historico()","info":"","x":390,"y":780,"wires":[]},{"id":"c4a1a29f1fc477a9","type":"comment","z":"8218571184381fe1","name":"carregar_configuracao()","info":"","x":980,"y":580,"wires":[]},{"id":"c7865daede096b0e","type":"comment","z":"8218571184381fe1","name":"receber_dados()","info":"","x":160,"y":80,"wires":[]},{"id":"9fca6e1c7a9c667c","type":"comment","z":"8218571184381fe1","name":"buscar_dados()","info":"","x":840,"y":280,"wires":[]},{"id":"01d6817bb1c69276","type":"comment","z":"8218571184381fe1","name":"salvar_configuracao()","info":"","x":980,"y":760,"wires":[]},{"id":"0b79afd0c563bdc5","type":"link in","z":"8218571184381fe1","name":"save request","links":["42e7d064c5fa77c6"],"x":895,"y":800,"wires":[["3ab3b3f91913b672"]]},{"id":"42d632e2748f4037","type":"file","z":"8218571184381fe1","name":"save cfg","filename":"config_car.cfg","appendNewline":false,"createDir":true,"overwriteFile":"true","encoding":"none","x":1100,"y":840,"wires":[[]]},{"id":"3ab3b3f91913b672","type":"function","z":"8218571184381fe1","name":"get global variables","func":"msg.payload = {\n \"spd_threshold\": global.get(\"spd_threshold\"),\n \"rpm_threshold\": global.get(\"rpm_threshold\"),\n \"coolant_threshold\": global.get(\"coolant_threshold\")\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":800,"wires":[["8f8d77c24bf121a6"]]},{"id":"8f8d77c24bf121a6","type":"json","z":"8218571184381fe1","name":"","property":"payload","action":"str","pretty":false,"x":970,"y":840,"wires":[["42d632e2748f4037"]]},{"id":"5bdfe88720725589","type":"catch","z":"8218571184381fe1","name":"file write error","scope":["42d632e2748f4037"],"uncaught":false,"x":990,"y":880,"wires":[["8db84e02f7b80bec"]]},{"id":"8db84e02f7b80bec","type":"change","z":"8218571184381fe1","name":"save error","rules":[{"t":"set","p":"payload","pt":"msg","to":"Erro ao salvar configurações!","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1100,"y":880,"wires":[["a0d45aba2b89d406"]]},{"id":"a0d45aba2b89d406","type":"ui_toast","z":"8218571184381fe1","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"className":"","topic":"","name":"UI Notif - FAIL to Save CFG","x":1040,"y":920,"wires":[]},{"id":"11045786c2726e7f","type":"function","z":"8218571184381fe1","name":"timestamp convert","func":"msg.payload.timestamp = new Date(msg.payload.timestamp * 1000);\nlet ts = msg.payload.timestamp.toLocaleString();\nmsg.payload.timestamp = ts;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":900,"wires":[["1092d949ee4050d6"]]},{"id":"136a8c4f343daf25","type":"catch","z":"8218571184381fe1","name":"fail history write","scope":["3e4833bd97a2ddf9"],"uncaught":false,"x":800,"y":160,"wires":[["b318ceec4590a609"]]},{"id":"b318ceec4590a609","type":"change","z":"8218571184381fe1","name":"save file error","rules":[{"t":"set","p":"payload","pt":"msg","to":"Erro ao gravar dados!","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":200,"wires":[["3b379f2eabeba6a7"]]},{"id":"3b379f2eabeba6a7","type":"ui_toast","z":"8218571184381fe1","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"className":"","topic":"","name":"UI Notif - Error while saving data","x":1070,"y":160,"wires":[]},{"id":"09708fc6cfab28dd","type":"ui_template","z":"8218571184381fe1","group":"2a745e6b.07df92","name":"Dashboard Theme : Modern Dark","order":2,"width":0,"height":0,"format":"<div>\n <link href=\"https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;700&display=swap\" rel=\"stylesheet\">\n <style>\n body {\n --background: #212529;\n --on-background: white;\n --surface: #2d3136;\n --on-surface: white;\n --primary: var(--nr-dashboard-widgetColor);\n --on-primary: black;\n --secondary: var(--nr-dashboard-groupTextColor);\n --accent: red;\n --radius-s: 8px;\n --font-weight-m: 300;\n --font-weight-m: 500;\n --font-weight-l: 700;\n --space-s: 8px;\n --space-m: 16px;\n --space-l: 32px;\n }\n\n body.nr-dashboard-theme {\n background-color: var(--background);\n font-family: 'Montserrat', sans-serif;\n }\n .nr-dashboard-theme ui-card-panel {\n background-color: var(--background);\n border: 0;\n }\n .nr-dashboard-theme .nr-dashboard-button .md-button {\n background-color: var(--primary);\n border-radius: var(--radius-s);\n padding: 8px !important;\n line-height: inherit;\n font-weight: var(--font-weight-l);\n color: var(--on-primary);\n }\n .nr-dashboard-theme [ui-card-size=\"2x2\"].nr-dashboard-button .md-button {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n white-space: pre-line;\n }\n \n .nr-dashboard-theme .nr-dashboard-button .md-button ui-icon {\n margin-bottom: 8px;\n }\n .nr-dashboard-theme .nr-dashboard-button .md-button:hover {\n background-color: var(--secondary);\n }\n body.nr-dashboard-theme md-content md-card {\n background-color: var(--surface);\n }\n md-card.md-default-theme, md-card {\n border-radius: var(--radius-s);\n }\n .nr-dashboard-theme .nr-dashboard-gauge-titlel {\n font-weight: var(--font-weight-l) !important; \n }\n .nr-dashboard-theme ui-card-panel p.nr-dashboard-cardtitle {\n font-weight: var(--font-weight-l); \n text-transform: capitalize;\n color: var(--on-background);\n }\n .nr-dashboard-cardpanel > p {\n margin-left: 0;\n padding-left: 16px;\n }\n body.nr-dashboard-theme md-toolbar {\n background-color: var(--surface);\n }\n .md-default-theme .md-datepicker-calendar, .md-datepicker-calendar,\n .md-default-theme .md-calendar, .md-calendar{\n background-color: var(--surface);\n color: var(--on-surface);\n }\n .md-default-theme .md-datepicker-calendar-pane, .md-datepicker-calendar-pane{\n border: 0;\n }\n .md-default-theme .md-calendar-month-label md-icon, .md-calendar-month-label md-icon, .md-default-theme .md-datepicker-input, .md-datepicker-input {\n color: var(--on-surface);\n }\n body.nr-dashboard-theme md-content md-card {\n color: var(--on-surface);\n }\n .nr-dashboard-theme .nr-dashboard-numeric .value {\n background-color: var(--surface);\n color: var(--on-surface);\n }\n .nr-dashboard-theme .nr-dashboard-dropdown md-select .md-select-value, .nr-dashboard-theme .nr-dashboard-dropdown md-select .md-select-value.md-select-placeholder {\n color: var(--on-surface);\n border-color: var(--on-surface);\n }\n .nr-dashboard-theme .nr-dashboard-dropdown .md-select-icon {\n color: var(--on-surface);\n }\n .nr-dashboard-theme .nr-dashboard-date-picker md-input-container .md-input {\n color: var(--on-surface);\n border-color: var(--on-surface);\n }\n .nr-dashboard-theme .nr-dashboard-date-picker .md-datepicker-triangle-button .md-datepicker-expand-triangle {\n border-top-color: var(--on-surface);\n }\n body.nr-dashboard-theme md-sidenav {\n background-color: var(--surface);\n }\n md-list-item._md-button-wrap > div.md-button:first-child, md-list-item .md-list-item-inner {\n background-color: var(--surface);\n }\n /*.md-toolbar-tools{\n background-image: url(\"https://itconsol.com/wp-content/uploads/2021/05/logo-itconsol.svg\");\n background-repeat: no-repeat;\n margin-left: 120px;\n margin-right: 10px;\n background-size: 125px 39px;\n background-position: 40px;\n }*/\n </style>\n</div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"global","className":"","x":220,"y":280,"wires":[[]],"icon":"node-red-dashboard/ui_colour_picker.png","info":"# Modern Dark Theme for node-red-dashboard\n\nInspired by Victor Lucachi with his [Node Red Dashboard Concept](https://dribbble.com/shots/10356530-Node-Red-Dashboard-Concept) on Dribbble. Thank you for your work.\n\n## Customize\n\n1. Go on dashboard customisation tab (At the right of Debug Console).\n2. Select the style `Dark`.\n3. Pick the color you want. Example `#66B5F8`\n\n## Buttons\n\nUse `2x2` size for buttons with icon and text on the screenshot"},{"id":"f7537559217ab1d4","type":"ui_template","z":"8218571184381fe1","group":"83dfbdc5d81da0f4","name":"car style status","order":12,"width":0,"height":0,"format":"<style>\n .led-status-car\n {\n font-size: 6pt;\n }\n .center\n {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n }\n \n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","className":"","x":160,"y":240,"wires":[[]]},{"id":"6f8787c644bd95e5","type":"inject","z":"8218571184381fe1","name":"startup","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":800,"y":620,"wires":[["866d8bfacaea6f0c"]]},{"id":"8979f63c92c22d1a","type":"comment","z":"8218571184381fe1","name":"salvar_dados()","info":"","x":800,"y":80,"wires":[]},{"id":"d66e6816e4a992f5","type":"tab","label":"configure car threshold","disabled":false,"info":"","env":[]},{"id":"b1bd4c7be6b97692","type":"ui_slider","z":"d66e6816e4a992f5","name":"","label":"Aviso de Excesso de Rotação - RPM","tooltip":"","group":"09e0956ae89c1ddc","order":1,"width":0,"height":0,"passthru":false,"outs":"end","topic":"topic","topicType":"msg","min":0,"max":"12000","step":"250","className":"","x":950,"y":340,"wires":[["f6f47d2b7dfe0f8d"]]},{"id":"9ab649b674050e22","type":"ui_slider","z":"d66e6816e4a992f5","name":"","label":"Aviso de Excesso de Temperatura (°C)","tooltip":"","group":"09e0956ae89c1ddc","order":2,"width":0,"height":0,"passthru":false,"outs":"end","topic":"topic","topicType":"msg","min":0,"max":"200","step":"5","className":"","x":970,"y":380,"wires":[["74d06077350fe130"]]},{"id":"f542bd851549d63e","type":"ui_slider","z":"d66e6816e4a992f5","name":"","label":"Aviso de Excesso de Velocidade (KM/H)","tooltip":"","group":"09e0956ae89c1ddc","order":3,"width":0,"height":0,"passthru":false,"outs":"end","topic":"topic","topicType":"msg","min":0,"max":"400","step":"5","className":"","x":960,"y":420,"wires":[["559e14631cb2b113"]]},{"id":"09b8c60f3110cc66","type":"link in","z":"d66e6816e4a992f5","name":"read config data","links":["fd8d3aad0e17029c"],"x":455,"y":380,"wires":[["5082556d93933a79","9b82ee3bb975e870","18ac7205f74de7a5"]]},{"id":"18ac7205f74de7a5","type":"change","z":"d66e6816e4a992f5","name":"spd_threshold","rules":[{"t":"set","p":"payload","pt":"msg","to":"spd_threshold","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":420,"wires":[["f542bd851549d63e"]]},{"id":"9b82ee3bb975e870","type":"change","z":"d66e6816e4a992f5","name":"coolant_threshold","rules":[{"t":"set","p":"payload","pt":"msg","to":"coolant_threshold","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":380,"wires":[["9ab649b674050e22"]]},{"id":"5082556d93933a79","type":"change","z":"d66e6816e4a992f5","name":"rpm_threshold","rules":[{"t":"set","p":"payload","pt":"msg","to":"rpm_threshold","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":340,"wires":[["b1bd4c7be6b97692"]]},{"id":"f6f47d2b7dfe0f8d","type":"change","z":"d66e6816e4a992f5","name":"change rpm_threshold","rules":[{"t":"move","p":"payload","pt":"msg","to":"rpm_threshold","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":500,"wires":[["f56837c8a9e1c2c9"]]},{"id":"74d06077350fe130","type":"change","z":"d66e6816e4a992f5","name":"change coolant_threshold","rules":[{"t":"move","p":"payload","pt":"msg","to":"coolant_threshold","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":540,"wires":[["e7d25f97688e3422"]]},{"id":"559e14631cb2b113","type":"change","z":"d66e6816e4a992f5","name":"change spd_threshold","rules":[{"t":"move","p":"payload","pt":"msg","to":"spd_threshold","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":580,"wires":[["93245b39dcc70a26"]]},{"id":"f56837c8a9e1c2c9","type":"change","z":"d66e6816e4a992f5","name":"UI Message - RPM Settings Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"Limite de RPM alterado.","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":500,"wires":[["a7fbd19f5e684c8c","42e7d064c5fa77c6"]]},{"id":"e7d25f97688e3422","type":"change","z":"d66e6816e4a992f5","name":"UI Message - Coolant Settings Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"Limite de Temperatura Alterado.","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":540,"wires":[["a7fbd19f5e684c8c","42e7d064c5fa77c6"]]},{"id":"93245b39dcc70a26","type":"change","z":"d66e6816e4a992f5","name":"UI Message - Speed Settings Change","rules":[{"t":"set","p":"payload","pt":"msg","to":"Limite de Velocidade Alterado.","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":580,"wires":[["a7fbd19f5e684c8c","42e7d064c5fa77c6"]]},{"id":"a7fbd19f5e684c8c","type":"ui_toast","z":"d66e6816e4a992f5","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"className":"","topic":"","name":"UI Notifications - Settings","x":1490,"y":280,"wires":[]},{"id":"42e7d064c5fa77c6","type":"link out","z":"d66e6816e4a992f5","name":"save new settings","mode":"link","links":["0b79afd0c563bdc5"],"x":1325,"y":540,"wires":[]},{"id":"6cedaaca1d91f3f9","type":"ui_button","z":"d66e6816e4a992f5","name":"voltar","group":"09e0956ae89c1ddc","order":4,"width":0,"height":0,"passthru":false,"label":"Voltar","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"Detalhes","payloadType":"str","topic":"topic","topicType":"msg","x":590,"y":620,"wires":[["e6f771c5c0f5c4ff"]]},{"id":"e6f771c5c0f5c4ff","type":"ui_ui_control","z":"d66e6816e4a992f5","name":"","events":"change","x":760,"y":620,"wires":[[]]},{"id":"9406153a015f1650","type":"ui_button","z":"d66e6816e4a992f5","name":"Reset","group":"09e0956ae89c1ddc","order":5,"width":0,"height":0,"passthru":false,"label":"Reset Configuração","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"true","payloadType":"bool","topic":"topic","topicType":"msg","x":490,"y":280,"wires":[["dd1861cfaff3c354"]]},{"id":"dd1861cfaff3c354","type":"change","z":"d66e6816e4a992f5","name":"defaults","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"spd_threshold\":130,\"rpm_threshold\":3000,\"coolant_threshold\":105}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":280,"wires":[["3345270b662c5b02","5082556d93933a79","9b82ee3bb975e870","18ac7205f74de7a5"]]},{"id":"3345270b662c5b02","type":"change","z":"d66e6816e4a992f5","name":"set config","rules":[{"t":"move","p":"payload.spd_threshold","pt":"msg","to":"spd_threshold","tot":"global"},{"t":"move","p":"payload.coolant_threshold","pt":"msg","to":"coolant_threshold","tot":"global"},{"t":"move","p":"payload.rpm_threshold","pt":"msg","to":"rpm_threshold","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":280,"wires":[["42e7d064c5fa77c6","026776b906112346"]]},{"id":"026776b906112346","type":"change","z":"d66e6816e4a992f5","name":"UI Message - Reset Settings","rules":[{"t":"set","p":"payload","pt":"msg","to":"Configurações Resetadas.","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1240,"y":280,"wires":[["a7fbd19f5e684c8c"]]},{"id":"3c7d50b1062eacd4","type":"ui_group","name":"Status","tab":"5792de6dd51026ca","order":2,"disp":true,"width":8,"collapse":false,"className":""},{"id":"43933c66e4feb46d","type":"ui_group","name":"Check","tab":"5792de6dd51026ca","order":2,"disp":true,"width":8,"collapse":false,"className":""},{"id":"2f6e17de8989bbd7","type":"ui_group","name":"Ações","tab":"5792de6dd51026ca","order":4,"disp":true,"width":"8","collapse":false,"className":""},{"id":"83dfbdc5d81da0f4","type":"ui_group","name":"STATUS","tab":"c69ae39536c7dc05","order":1,"disp":true,"width":"12","collapse":false,"className":""},{"id":"6992075b538d96f8","type":"mqtt-broker","name":"personal","broker":"raszeja.xyz","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"2a745e6b.07df92","type":"ui_group","name":"Default","tab":"e63bce2d.68925","order":5,"disp":true,"width":"6","collapse":true},{"id":"09e0956ae89c1ddc","type":"ui_group","name":"Ações","tab":"a3894c28d2befccb","order":1,"disp":true,"width":12,"collapse":false,"className":""},{"id":"5792de6dd51026ca","type":"ui_tab","name":"Detalhes","icon":"dashboard","order":10,"disabled":false,"hidden":true},{"id":"c69ae39536c7dc05","type":"ui_tab","name":"Menu Carro","icon":"dashboard","order":9,"disabled":false,"hidden":false},{"id":"e63bce2d.68925","type":"ui_tab","name":"Tema","icon":"dashboard","order":4,"disabled":false,"hidden":false},{"id":"a3894c28d2befccb","type":"ui_tab","name":"Configurações","icon":"dashboard","order":11,"disabled":false,"hidden":true}] |