Hello,
I am not yet very familiar with Node-Red and need your help for a project for university.
A parking server should be programmed and the number of occupied parking slots should increase or decrease by manual input. There should be a maximum of 20 regular, 15 hanicap and 10 vip slots.
I have imported this flow (https://flows.nodered.org/node/node-red-contrib-counter) and I want to output the number on the dashboard with the gauge. Behind the counter-node I have added a switch-node which either lets the gauge count up to 20 or shows occupied from 20 on.
Unfortunately nothing happens in my dashboard. Does anyone have any ideas how to implement this?
This is my flow:
[{"id":"21a2d51b.7859da","type":"inject","z":"3ea65e14.3e2f22","name":"decrement regular","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"","x":130,"y":160,"wires":[["7c56f728.920dd8"]]},{"id":"197277fd.a9eb48","type":"inject","z":"3ea65e14.3e2f22","name":"increment regular","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"","x":120,"y":120,"wires":[["516eea40.5901b4"]]},{"id":"57c982de.daaf1c","type":"inject","z":"3ea65e14.3e2f22","name":"reset","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"","x":90,"y":200,"wires":[["b93f5b7f.772258"]]},{"id":"516eea40.5901b4","type":"function","z":"3ea65e14.3e2f22","name":"msg object","func":"msg.increment = 1;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":120,"wires":[["8f77e7f1.829588"]]},{"id":"b93f5b7f.772258","type":"function","z":"3ea65e14.3e2f22","name":"msg object","func":"msg.reset = 10;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":200,"wires":[["8f77e7f1.829588"]]},{"id":"7c56f728.920dd8","type":"function","z":"3ea65e14.3e2f22","name":"msg object","func":"msg.decrement = 1;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":160,"wires":[["8f77e7f1.829588"]]},{"id":"ba82d9e.781e928","type":"debug","z":"3ea65e14.3e2f22","name":"count","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":770,"y":40,"wires":},{"id":"8f77e7f1.829588","type":"counter","z":"3ea65e14.3e2f22","name":"","init":"1","step":"1","lower":"0","upper":"20","mode":"increment","outputs":2,"x":560,"y":140,"wires":[["ba82d9e.781e928"],["4a9c5290.57742c"]]},{"id":"16abd925.d1f627","type":"inject","z":"3ea65e14.3e2f22","name":"normal msg without control parameter","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"","x":210,"y":60,"wires":[["8f77e7f1.829588"]]},{"id":"4a9c5290.57742c","type":"switch","z":"3ea65e14.3e2f22","name":"","property":"payload","propertyType":"flow","rules":[{"t":"lte","v":"20","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":710,"y":200,"wires":[["e8f96dc9.3fdb"],["af0b06f7.bd4648"]]},{"id":"af0b06f7.bd4648","type":"ui_text","z":"3ea65e14.3e2f22","group":"2c7dfe1d.b5ffc2","order":0,"width":0,"height":0,"name":"occupied","label":"Bitte warten Sie!","format":"{{msg.payload}}","layout":"row-spread","x":900,"y":240,"wires":},{"id":"876465f1.50fc98","type":"debug","z":"3ea65e14.3e2f22","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":770,"y":80,"wires":},{"id":"e8f96dc9.3fdb","type":"ui_gauge","z":"3ea65e14.3e2f22","name":"","group":"1ac9c18d.ecd92e","order":2,"width":0,"height":0,"gtype":"gage","title":"Regular","label":"","format":"{{value}}","min":0,"max":"20","colors":["#00b500","#e6e600","#ca3838"],"seg1":"10","seg2":"15","x":900,"y":180,"wires":},{"id":"53a2e5f5.45b6ac","type":"ui_gauge","z":"3ea65e14.3e2f22","name":"","group":"d22d3c54.cb229","order":2,"width":0,"height":0,"gtype":"gage","title":"VIP","label":"","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"4","seg2":"8","x":890,"y":380,"wires":},{"id":"70a84dae.3a96e4","type":"ui_gauge","z":"3ea65e14.3e2f22","name":"","group":"8e1cc9b.f93d238","order":1,"width":0,"height":0,"gtype":"gage","title":"Handicap","label":"units","format":"{{value}}","min":0,"max":"15","colors":["#00b500","#e6e600","#ca3838"],"seg1":"7","seg2":"13","x":900,"y":320,"wires":},{"id":"2c7dfe1d.b5ffc2","type":"ui_group","z":"","name":"Parkplatz voll","tab":"fb71c1a6.2359f","order":5,"disp":true,"width":"6","collapse":false},{"id":"1ac9c18d.ecd92e","type":"ui_group","z":"","name":"Regular","tab":"fb71c1a6.2359f","order":1,"disp":true,"width":"6","collapse":false},{"id":"d22d3c54.cb229","type":"ui_group","z":"","name":"VIP","tab":"fb71c1a6.2359f","order":3,"disp":true,"width":"6","collapse":false},{"id":"8e1cc9b.f93d238","type":"ui_group","z":"","name":"Handicap","tab":"fb71c1a6.2359f","order":2,"disp":true,"width":"6","collapse":false},{"id":"fb71c1a6.2359f","type":"ui_tab","z":"","name":"Einfahrt","icon":"dashboard","order":1,"disabled":false,"hidden":false}]