Gauge node doesn't refresh with moment palette

Hello,

I have 6 timers (in milliseconds) that I receive from an S7 com and I want to diplay them on gauges on my dashboard.
It works but I got an integer value and I want to display minutes and seconds on my gauge (mm:ss). So, I used the palette "node-red-contrib-moment", the node date/time formater:
image
But when i'm using this node, my gauge doesn't refresh anymore (only when I press F5).
In the flow I can see the data changing properly with a debug node. And when I just put a value in the timer in my PLC without running it, the value appears.
Also, if I use a text node instead of a gauge it works.


I just started to use node-red so I'm stuck and don't know where it could come from.

Here is an export of my flow, I use node-red V1.2.9, node.js V15.12.0 and Dashboard 2.28.2.

[{"id":"bfad98d7.75c8a8","type":"tab","label":"Presse chauffante","disabled":false,"info":"Caujolle"},{"id":"82a3421.c9b2ec","type":"ui_text","z":"bfad98d7.75c8a8","group":"baf0bfb2.b2599","order":1,"width":0,"height":0,"name":"Etat presse 1","label":"Etat_P1","format":"{{msg.topic}}","layout":"row-spread","x":370,"y":200,"wires":[]},{"id":"1ec6ce3d.a08252","type":"ui_text","z":"bfad98d7.75c8a8","group":"b2f68e4c.916d3","order":1,"width":0,"height":0,"name":"Etat presse 2","label":"Etat_P2","format":"{{msg.topic}}","layout":"row-spread","x":370,"y":280,"wires":[]},{"id":"410d78a2.2a52e8","type":"ui_text","z":"bfad98d7.75c8a8","group":"356f993b.c849b6","order":1,"width":0,"height":0,"name":"Etat presse 3","label":"Etat_P3","format":"{{msg.topic}}","layout":"row-spread","x":370,"y":360,"wires":[]},{"id":"e432c154.9eee9","type":"ui_text","z":"bfad98d7.75c8a8","group":"3b5e709.55b189","order":1,"width":0,"height":0,"name":"Etat presse 4","label":"Etat_P4","format":"{{msg.topic}}","layout":"row-spread","x":370,"y":440,"wires":[]},{"id":"34e24724.867698","type":"ui_text","z":"bfad98d7.75c8a8","group":"8e6de171.e09a7","order":1,"width":0,"height":0,"name":"Etat presse 5","label":"Etat_P5","format":"{{msg.topic}}","layout":"row-spread","x":370,"y":520,"wires":[]},{"id":"89865eb3.23dae","type":"ui_text","z":"bfad98d7.75c8a8","group":"d8a326ab.1e2908","order":1,"width":0,"height":0,"name":"Etat presse 6","label":"Etat_P6","format":"{{msg.topic}}","layout":"row-spread","x":370,"y":600,"wires":[]},{"id":"8d82109f.f681a","type":"comment","z":"bfad98d7.75c8a8","name":"Etat de la presse","info":"","x":260,"y":160,"wires":[]},{"id":"bc5d587e.8cd368","type":"function","z":"bfad98d7.75c8a8","name":"Etat","func":"switch(parseInt(msg.payload))\n{\n    case 0:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break;\n    case 1:\n        msg.topic = \"Descente porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 2:\n        msg.topic = \"Montée moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 3:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 4:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 5:\n        msg.topic = \"Soufflage moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 6:\n        msg.topic = \"Descente moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 7:\n        msg.topic = \"Montée porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 20:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break; \n    case 99:\n        msg.topic = \"En défaut\";\n        msg.couleur=\"rgb(255, 27, 28)\";//Rouge\n        break; \n    default:\n        msg.topic = \"\";\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":230,"y":200,"wires":[["82a3421.c9b2ec","1d58dbb.2a3e724","40d8dd9.e6e7f24"]]},{"id":"40a21170.47f54","type":"comment","z":"bfad98d7.75c8a8","name":"Format","info":"Format time dans l'API : T#0MS\nFormat dans node-red : ms","x":110,"y":160,"wires":[]},{"id":"c42a4f53.4a931","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Etat poste 1","diff":true,"name":"","x":70,"y":200,"wires":[["bc5d587e.8cd368"]]},{"id":"4e9bcb86.0f70c4","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Etat poste 2","diff":true,"name":"","x":70,"y":280,"wires":[["fcc0f9e2.b6e418"]]},{"id":"b228f8a9.7115c8","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Etat poste 3","diff":true,"name":"","x":70,"y":360,"wires":[["3d34663c.020d7a"]]},{"id":"658b1d33.0b15b4","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Etat poste 4","diff":true,"name":"","x":70,"y":440,"wires":[["9cb1caba.edb958"]]},{"id":"d5c17604.f02f28","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Etat poste 5","diff":true,"name":"","x":70,"y":520,"wires":[["4a5894b.3c44c6c"]]},{"id":"86f2bc6d.ea2bd","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Etat poste 6","diff":true,"name":"","x":70,"y":600,"wires":[["d1c80093.e656d"]]},{"id":"f5c20a0.a60e3f8","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Défaut poste 1","diff":true,"name":"","x":80,"y":240,"wires":[[]]},{"id":"11a47952.e45467","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Défaut poste 2","diff":true,"name":"","x":80,"y":320,"wires":[[]]},{"id":"b17e3d5f.5b599","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Défaut poste 3","diff":true,"name":"","x":80,"y":400,"wires":[[]]},{"id":"68da9790.982d18","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Défaut poste 4","diff":true,"name":"","x":80,"y":480,"wires":[[]]},{"id":"5357fd16.931e24","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Défaut poste 5","diff":true,"name":"","x":80,"y":560,"wires":[[]]},{"id":"d6bae5da.986a28","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Défaut poste 6","diff":true,"name":"","x":80,"y":640,"wires":[[]]},{"id":"48a6f425.18d7bc","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Temps restant Poste 1","diff":true,"name":"","x":620,"y":200,"wires":[["d860d7a5.235748","d7c56490.0aaa98"]]},{"id":"38e53450.86e45c","type":"moment","z":"bfad98d7.75c8a8","d":true,"name":"","topic":"","input":"payload","inputType":"msg","inTz":"Europe/Paris","adjAmount":0,"adjType":"days","adjDir":"add","format":"mm:ss","locale":"fr-FR","output":"payload","outputType":"msg","outTz":"Europe/Paris","x":1120,"y":200,"wires":[["e9534da2.ed70d","19a893d7.c71a8c"]]},{"id":"e9534da2.ed70d","type":"ui_gauge","z":"bfad98d7.75c8a8","name":"Timer presse 1","group":"baf0bfb2.b2599","order":2,"width":"0","height":"0","gtype":"donut","title":"Temps restant","label":"Minutes","format":"{{msg.payload| number:0}}","min":0,"max":"10","colors":["#ff1b1c","#e6e600","#0cc024"],"seg1":"1","seg2":"3","x":1320,"y":200,"wires":[]},{"id":"d860d7a5.235748","type":"switch","z":"bfad98d7.75c8a8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"600000","vt":"str"},{"t":"gt","v":"600000","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":200,"wires":[["38e53450.86e45c","b94d1173.8db9b","aecbf934.7061f8"],["abeed479.e22718","a1603497.8a7df8"]]},{"id":"abeed479.e22718","type":"change","z":"bfad98d7.75c8a8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"600000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":240,"wires":[["38e53450.86e45c"]]},{"id":"63f265ca.29348c","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Temps restant Poste 2","diff":true,"name":"","x":620,"y":280,"wires":[["251903c5.4f92dc"]]},{"id":"dab360e9.ab88d","type":"moment","z":"bfad98d7.75c8a8","name":"","topic":"","input":"payload","inputType":"msg","inTz":"Europe/Paris","adjAmount":0,"adjType":"days","adjDir":"add","format":"mm:ss","locale":"fr-FR","output":"payload","outputType":"msg","outTz":"Europe/Paris","x":1120,"y":280,"wires":[["1d90554a.84899b"]]},{"id":"1d90554a.84899b","type":"ui_gauge","z":"bfad98d7.75c8a8","name":"Timer presse 2","group":"b2f68e4c.916d3","order":2,"width":"0","height":"0","gtype":"donut","title":"Temps restant","label":"Minutes","format":"{{msg.payload}}","min":0,"max":"10","colors":["#ff1b1c","#e6e600","#119822"],"seg1":"1","seg2":"3","x":1320,"y":280,"wires":[]},{"id":"251903c5.4f92dc","type":"switch","z":"bfad98d7.75c8a8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"600000","vt":"str"},{"t":"gt","v":"600000","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":280,"wires":[["dab360e9.ab88d"],["5b973512.ba94ac"]]},{"id":"5b973512.ba94ac","type":"change","z":"bfad98d7.75c8a8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"600000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":320,"wires":[["dab360e9.ab88d"]]},{"id":"6d6fccd9.268f74","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Temps restant Poste 3","diff":true,"name":"","x":620,"y":360,"wires":[["30e517d4.8a1a18"]]},{"id":"ed5e33b5.1466b","type":"moment","z":"bfad98d7.75c8a8","name":"","topic":"","input":"payload","inputType":"msg","inTz":"Europe/Paris","adjAmount":0,"adjType":"days","adjDir":"add","format":"mm:ss","locale":"fr-FR","output":"payload","outputType":"msg","outTz":"Europe/Paris","x":1120,"y":360,"wires":[["34663769.7aaa08"]]},{"id":"34663769.7aaa08","type":"ui_gauge","z":"bfad98d7.75c8a8","name":"Timer presse 3","group":"356f993b.c849b6","order":2,"width":0,"height":0,"gtype":"donut","title":"Temps restant","label":"Minutes","format":"{{msg.payload}}","min":0,"max":"10","colors":["#ff1b1c","#e6e600","#119822"],"seg1":"1","seg2":"3","x":1320,"y":360,"wires":[]},{"id":"30e517d4.8a1a18","type":"switch","z":"bfad98d7.75c8a8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"600000","vt":"str"},{"t":"gt","v":"600000","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":360,"wires":[["ed5e33b5.1466b"],["99a0a1b.28b7c6"]]},{"id":"99a0a1b.28b7c6","type":"change","z":"bfad98d7.75c8a8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"600000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":400,"wires":[["ed5e33b5.1466b"]]},{"id":"16e28a60.2433c6","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Temps restant Poste 4","diff":true,"name":"","x":620,"y":440,"wires":[["5735cf49.d8d48"]]},{"id":"39de424e.13bd1e","type":"moment","z":"bfad98d7.75c8a8","name":"","topic":"","input":"payload","inputType":"msg","inTz":"Europe/Paris","adjAmount":0,"adjType":"days","adjDir":"add","format":"mm:ss","locale":"fr-FR","output":"payload","outputType":"msg","outTz":"Europe/Paris","x":1120,"y":440,"wires":[["ca73f1ca.d3e8a"]]},{"id":"ca73f1ca.d3e8a","type":"ui_gauge","z":"bfad98d7.75c8a8","name":"Timer presse 4","group":"3b5e709.55b189","order":2,"width":0,"height":0,"gtype":"donut","title":"Temps restant","label":"Minutes","format":"{{msg.payload}}","min":0,"max":"10","colors":["#ff1b1c","#e6e600","#119822"],"seg1":"1","seg2":"3","x":1320,"y":440,"wires":[]},{"id":"5735cf49.d8d48","type":"switch","z":"bfad98d7.75c8a8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"600000","vt":"str"},{"t":"gt","v":"600000","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":440,"wires":[["39de424e.13bd1e"],["692a6fe9.6f154"]]},{"id":"692a6fe9.6f154","type":"change","z":"bfad98d7.75c8a8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"600000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":480,"wires":[["39de424e.13bd1e"]]},{"id":"ee8e85a1.33e598","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Temps restant Poste 5","diff":true,"name":"","x":620,"y":520,"wires":[["ba4e58b8.880828"]]},{"id":"e87974df.d34178","type":"moment","z":"bfad98d7.75c8a8","name":"","topic":"","input":"payload","inputType":"msg","inTz":"Europe/Paris","adjAmount":0,"adjType":"days","adjDir":"add","format":"mm:ss","locale":"fr-FR","output":"payload","outputType":"msg","outTz":"Europe/Paris","x":1120,"y":520,"wires":[["e167412.b4f5dc"]]},{"id":"e167412.b4f5dc","type":"ui_gauge","z":"bfad98d7.75c8a8","name":"Timer presse 5","group":"8e6de171.e09a7","order":2,"width":0,"height":0,"gtype":"donut","title":"Temps restant","label":"Minutes","format":"{{msg.payload}}","min":0,"max":"10","colors":["#ff1b1c","#e6e600","#119822"],"seg1":"1","seg2":"3","x":1320,"y":520,"wires":[]},{"id":"ba4e58b8.880828","type":"switch","z":"bfad98d7.75c8a8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"600000","vt":"str"},{"t":"gt","v":"600000","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":520,"wires":[["e87974df.d34178"],["b9263a1b.437328"]]},{"id":"b9263a1b.437328","type":"change","z":"bfad98d7.75c8a8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"600000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":560,"wires":[["e87974df.d34178"]]},{"id":"df968dba.1e467","type":"s7 in","z":"bfad98d7.75c8a8","endpoint":"741c4860.64e608","mode":"single","variable":"Temps restant Poste 6","diff":true,"name":"","x":620,"y":600,"wires":[["7d512000.a1f5e"]]},{"id":"57db0463.7f264c","type":"moment","z":"bfad98d7.75c8a8","name":"","topic":"","input":"payload","inputType":"msg","inTz":"Europe/Paris","adjAmount":0,"adjType":"days","adjDir":"add","format":"mm:ss","locale":"fr-FR","output":"payload","outputType":"msg","outTz":"Europe/Paris","x":1120,"y":600,"wires":[["2a85b946.666396"]]},{"id":"2a85b946.666396","type":"ui_gauge","z":"bfad98d7.75c8a8","name":"Timer presse 6","group":"d8a326ab.1e2908","order":3,"width":0,"height":0,"gtype":"donut","title":"Temps restant","label":"Minutes","format":"{{msg.payload}}","min":0,"max":"10","colors":["#ff1b1c","#e6e600","#119822"],"seg1":"1","seg2":"3","x":1320,"y":600,"wires":[]},{"id":"7d512000.a1f5e","type":"switch","z":"bfad98d7.75c8a8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"600000","vt":"str"},{"t":"gt","v":"600000","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":600,"wires":[["57db0463.7f264c"],["884aedbf.b4732"]]},{"id":"884aedbf.b4732","type":"change","z":"bfad98d7.75c8a8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"600000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":640,"wires":[["57db0463.7f264c"]]},{"id":"1d58dbb.2a3e724","type":"ui_button","z":"bfad98d7.75c8a8","d":true,"name":"","group":"d8a326ab.1e2908","order":2,"width":0,"height":0,"passthru":false,"label":"Etat : {{msg.topic}}","tooltip":"","color":"","bgcolor":"{{msg.couleur}}","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":410,"y":160,"wires":[[]]},{"id":"40d8dd9.e6e7f24","type":"ui_template","z":"bfad98d7.75c8a8","group":"d8a326ab.1e2908","name":"Couleur fond","order":4,"width":0,"height":0,"format":"<style>\n    .nr-dashboard-widget-Etat_P1{\n    background-color: {{msg.couleur}} !important ;\n}\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":370,"y":240,"wires":[[]]},{"id":"aa226570.d79ae8","type":"ui_template","z":"bfad98d7.75c8a8","group":"d8a326ab.1e2908","name":"Couleur fond","order":4,"width":0,"height":0,"format":"<style>\n    .nr-dashboard-widget-Etat_P2{\n    background-color: {{msg.couleur}} !important ;\n}\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":370,"y":320,"wires":[[]]},{"id":"c2188f4c.9c7fe","type":"ui_template","z":"bfad98d7.75c8a8","group":"d8a326ab.1e2908","name":"Couleur fond","order":4,"width":0,"height":0,"format":"<style>\n    .nr-dashboard-widget-Etat_P3{\n    background-color: {{msg.couleur}} !important ;\n}\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":370,"y":400,"wires":[[]]},{"id":"11ff283c.d26ba8","type":"ui_template","z":"bfad98d7.75c8a8","group":"d8a326ab.1e2908","name":"Couleur fond","order":4,"width":0,"height":0,"format":"<style>\n    .nr-dashboard-widget-Etat_P4{\n    background-color: {{msg.couleur}} !important ;\n}\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":370,"y":480,"wires":[[]]},{"id":"be8372db.0af54","type":"ui_template","z":"bfad98d7.75c8a8","group":"d8a326ab.1e2908","name":"Couleur fond","order":4,"width":0,"height":0,"format":"<style>\n    .nr-dashboard-widget-Etat_P5{\n    background-color: {{msg.couleur}} !important ;\n}\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":370,"y":560,"wires":[[]]},{"id":"b399f63a.185c98","type":"ui_template","z":"bfad98d7.75c8a8","group":"d8a326ab.1e2908","name":"Couleur fond","order":4,"width":0,"height":0,"format":"<style>\n    .nr-dashboard-widget-Etat_P6{\n    background-color: {{msg.couleur}} !important ;\n}\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":370,"y":640,"wires":[[]]},{"id":"fcc0f9e2.b6e418","type":"function","z":"bfad98d7.75c8a8","name":"Etat","func":"switch(parseInt(msg.payload))\n{\n    case 0:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break;\n    case 1:\n        msg.topic = \"Descente porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 2:\n        msg.topic = \"Montée moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 3:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 4:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 5:\n        msg.topic = \"Soufflage moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 6:\n        msg.topic = \"Descente moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 7:\n        msg.topic = \"Montée porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 20:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break; \n    case 99:\n        msg.topic = \"En défaut\";\n        msg.couleur=\"rgb(255, 27, 28)\";//Rouge\n        break; \n    default:\n        msg.topic = \"\";\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":230,"y":280,"wires":[["aa226570.d79ae8","1ec6ce3d.a08252"]]},{"id":"3d34663c.020d7a","type":"function","z":"bfad98d7.75c8a8","name":"Etat","func":"switch(parseInt(msg.payload))\n{\n    case 0:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break;\n    case 1:\n        msg.topic = \"Descente porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 2:\n        msg.topic = \"Montée moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 3:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 4:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 5:\n        msg.topic = \"Soufflage moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 6:\n        msg.topic = \"Descente moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 7:\n        msg.topic = \"Montée porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 20:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break; \n    case 99:\n        msg.topic = \"En défaut\";\n        msg.couleur=\"rgb(255, 27, 28)\";//Rouge\n        break; \n    default:\n        msg.topic = \"\";\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":230,"y":360,"wires":[["c2188f4c.9c7fe","410d78a2.2a52e8"]]},{"id":"9cb1caba.edb958","type":"function","z":"bfad98d7.75c8a8","name":"Etat","func":"switch(parseInt(msg.payload))\n{\n    case 0:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break;\n    case 1:\n        msg.topic = \"Descente porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 2:\n        msg.topic = \"Montée moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 3:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 4:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 5:\n        msg.topic = \"Soufflage moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 6:\n        msg.topic = \"Descente moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 7:\n        msg.topic = \"Montée porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 20:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break; \n    case 99:\n        msg.topic = \"En défaut\";\n        msg.couleur=\"rgb(255, 27, 28)\";//Rouge\n        break; \n    default:\n        msg.topic = \"\";\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":230,"y":440,"wires":[["11ff283c.d26ba8","e432c154.9eee9"]]},{"id":"4a5894b.3c44c6c","type":"function","z":"bfad98d7.75c8a8","name":"Etat","func":"switch(parseInt(msg.payload))\n{\n    case 0:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break;\n    case 1:\n        msg.topic = \"Descente porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 2:\n        msg.topic = \"Montée moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 3:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 4:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 5:\n        msg.topic = \"Soufflage moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 6:\n        msg.topic = \"Descente moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 7:\n        msg.topic = \"Montée porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 20:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break; \n    case 99:\n        msg.topic = \"En défaut\";\n        msg.couleur=\"rgb(255, 27, 28)\";//Rouge\n        break; \n    default:\n        msg.topic = \"\";\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":230,"y":520,"wires":[["be8372db.0af54","34e24724.867698"]]},{"id":"d1c80093.e656d","type":"function","z":"bfad98d7.75c8a8","name":"Etat","func":"switch(parseInt(msg.payload))\n{\n    case 0:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break;\n    case 1:\n        msg.topic = \"Descente porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 2:\n        msg.topic = \"Montée moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 3:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 4:\n        msg.topic = \"Chauffe en cours\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;\n    case 5:\n        msg.topic = \"Soufflage moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break;  \n    case 6:\n        msg.topic = \"Descente moule\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 7:\n        msg.topic = \"Montée porte\";\n        msg.couleur=\"rgb(17, 152, 34)\";//Vert\n        break; \n    case 20:\n        msg.topic = \"Attente cycle\";\n        msg.couleur=\"rgb(18, 158, 168)\";//Theme\n        break; \n    case 99:\n        msg.topic = \"En défaut\";\n        msg.couleur=\"rgb(255, 27, 28)\";//Rouge\n        break; \n    default:\n        msg.topic = \"\";\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":230,"y":600,"wires":[["b399f63a.185c98","89865eb3.23dae"]]},{"id":"d7c56490.0aaa98","type":"debug","z":"bfad98d7.75c8a8","name":"1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":770,"y":80,"wires":[]},{"id":"b94d1173.8db9b","type":"debug","z":"bfad98d7.75c8a8","name":"2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":910,"y":100,"wires":[]},{"id":"a1603497.8a7df8","type":"debug","z":"bfad98d7.75c8a8","name":"3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1050,"y":120,"wires":[]},{"id":"19a893d7.c71a8c","type":"debug","z":"bfad98d7.75c8a8","name":"4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1230,"y":120,"wires":[]},{"id":"aecbf934.7061f8","type":"function","z":"bfad98d7.75c8a8","name":"","func":"msg.payload=msg.payload/60000;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1120,"y":240,"wires":[["e9534da2.ed70d","19a893d7.c71a8c"]]},{"id":"b97bc1c0.cb899","type":"ui_template","z":"bfad98d7.75c8a8","d":true,"group":"c982fbb8.1deb38","name":"Clock Toolbar","order":2,"width":"0","height":"0","format":"<script id=\"titleScript\" type=\"text/javascript\">\n\n$(function() {\n    if($('.md-toolbar-tools').length != 0){\n        loadClock();\n    }else setTimeout(loadClock, 500)\n});\n\nfunction loadClock(){\n    $('#clock').remove();\n    var toolbar = $('.md-toolbar-tools');\n    \n    var div = $('<div/>');\n    var p = $('<p/ id=\"clock\">');\n    \n    div.append(p);\n    div[0].style.margin = '5px 5px 5px auto';\n    toolbar.append(div);\n\n    function displayTitle(lh) {\n        p.text(lh); \n    }\n    \n    function upTime() {\n        var d = new Date();\n        p.text(d.toLocaleString());\n    }\n\n    if(document.clockInterval){ \n            clearInterval(document.clockInterval);\n            document.clockInterval = null;\n    }\n        \n    document.clockInterval = setInterval(upTime,1000);\n}\n\n</script>","storeOutMessages":false,"fwdInMessages":false,"resendOnRefresh":false,"templateScope":"global","x":100,"y":20,"wires":[[]]},{"id":"baf0bfb2.b2599","type":"ui_group","z":"bfad98d7.75c8a8","name":"Presse 1","tab":"564a631a.2f096c","order":1,"disp":true,"width":"6","collapse":false},{"id":"b2f68e4c.916d3","type":"ui_group","name":"Presse 2","tab":"564a631a.2f096c","order":2,"disp":true,"width":"6","collapse":false},{"id":"356f993b.c849b6","type":"ui_group","name":"Presse 3","tab":"564a631a.2f096c","order":3,"disp":true,"width":"6","collapse":false},{"id":"3b5e709.55b189","type":"ui_group","name":"Presse 4","tab":"564a631a.2f096c","order":4,"disp":true,"width":"6","collapse":false},{"id":"8e6de171.e09a7","type":"ui_group","name":"Presse 5","tab":"564a631a.2f096c","order":5,"disp":true,"width":"6","collapse":false},{"id":"d8a326ab.1e2908","type":"ui_group","name":"Presse 6","tab":"564a631a.2f096c","order":6,"disp":true,"width":"6","collapse":false},{"id":"741c4860.64e608","type":"s7 endpoint","transport":"iso-on-tcp","address":"192.168.201.150","port":"102","rack":"0","slot":"1","localtsaphi":"01","localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-slot","adapter":"","busaddr":"2","cycletime":"1000","timeout":"2000","name":"Automate de test","vartable":[{"addr":"M0.0","name":"Tag_1_CPU"},{"addr":"DB2,X0.0","name":"Tempo"},{"addr":"DB2,REAL2","name":"real"},{"addr":"DB2,INT6","name":"int"},{"addr":"DB2,S8.255","name":"string"},{"addr":"M1.2","name":"AlwaysTrue"},{"addr":"M0.5","name":"hertz"},{"addr":"M5.0","name":"TestAlwaysTrue"},{"addr":"DB11,DWORD12","name":"Temps restant Poste 1"},{"addr":"DB11,DWORD16","name":"Temps restant Poste 2"},{"addr":"DB11,DWORD20","name":"Temps restant Poste 3"},{"addr":"DB11,DWORD24","name":"Temps restant Poste 4"},{"addr":"DB11,DWORD28","name":"Temps restant Poste 5"},{"addr":"DB11,DWORD32","name":"Temps restant Poste 6"},{"addr":"DB11,INT0","name":"Etat poste 1"},{"addr":"DB11,INT2","name":"Etat poste 2"},{"addr":"DB11,INT4","name":"Etat poste 3"},{"addr":"DB11,INT6","name":"Etat poste 4"},{"addr":"DB11,INT8","name":"Etat poste 5"},{"addr":"DB11,INT10","name":"Etat poste 6"},{"addr":"DB11,X36.0","name":"Défaut poste 1"},{"addr":"DB11,X36.1","name":"Défaut poste 2"},{"addr":"DB11,X36.2","name":"Défaut poste 3"},{"addr":"DB11,X36.3","name":"Défaut poste 4"},{"addr":"DB11,X36.4","name":"Défaut poste 5"},{"addr":"DB11,X36.5","name":"Défaut poste 6"}]},{"id":"c982fbb8.1deb38","type":"ui_group","name":"hidden_group","tab":"7c447e96.4b96a","order":1,"disp":false,"width":"6","collapse":false},{"id":"564a631a.2f096c","type":"ui_tab","name":"Presse chauffante","icon":"fa-clock-o","disabled":false,"hidden":false},{"id":"7c447e96.4b96a","type":"ui_tab","name":"Zooland Sys","icon":"home","order":1,"disabled":false,"hidden":false}]

Thank you in advance for your time.

Your flow contains many nodes which most people don't have and don't probably want to install. But I do lucky guess here about what may be wrong.
As the ui_gauge help says:

The value must be a number. And then the angular filters can be used to format it to be time.

See this simple example. The gauge shows countdown in form of mm:ss.

[{"id":"70f09246.ab6b3c","type":"function","z":"78abef.11f5941","name":"","func":"//remaining milliseconds = starting time (in milliseconds) minus current time  (in milliseconds)\nlet remaining = context.get(\"start\") - msg.payload\nif(remaining < 0){\n    context.set(\"start\", new Date().getTime()+60000)\n    return null\n}\nmsg.payload = remaining\nreturn msg;","outputs":1,"noerr":0,"initialize":"\ncontext.set(\"start\", new Date().getTime()+60000)","finalize":"","libs":[],"x":360,"y":880,"wires":[["6ac1554e.9e193c","ef12623c.0d68c"]]},{"id":"a3a5f884.af9098","type":"inject","z":"78abef.11f5941","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":880,"wires":[["70f09246.ab6b3c"]]},{"id":"6ac1554e.9e193c","type":"ui_gauge","z":"78abef.11f5941","name":"","group":"7323a614.648d78","order":4,"width":"4","height":"4","gtype":"donut","title":"Countdown","label":"sec","format":"{{value | date:\"mm:ss\"}}","min":0,"max":"60000","colors":["#ca3838","#e6e600","#3acb4a"],"seg1":"","seg2":"","x":550,"y":880,"wires":[]},{"id":"ef12623c.0d68c","type":"debug","z":"78abef.11f5941","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":820,"wires":[]},{"id":"7323a614.648d78","type":"ui_group","name":"Gauge 4","tab":"afa217d.fff04e8","order":1,"disp":true,"width":"4","collapse":false},{"id":"afa217d.fff04e8","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
2 Likes

Wow perfect ! Thank you for your time and example, I get it !

I just had to change the value format of my gauge to {{value | date:"mm:ss"}} instead of using the "date/time formatter" node. It works :smiley:

1 Like