Light, dimming, dashboard

Hello . I am new to red-node so still alot to learn.
I am using all my z-wave on fibaro hc 2 and that is working god.
I have now set my lights up, i am using switch, slide and a guage to se how many % the light is on. so when i use the slide all is ok. But if i use the switch to turn off the light the slide is still at the same position. added some pictures and the flow. Any have some good advices.


flows.json.txt (2.0 KB)

You need to:

  • add a switch and a change node on the slider output that will output a true (or 1 perhaps) if the slider is >xx% and false (or 0) if below yy%. That output will then need to be fed back to the input of the switch. You might chose something like 0% for xx and 1% for yy for example. You will probably want to put that logic into a sub-flow so that you can reuse the same process for each light.
  • Do some similar process for the output of the switches so that if the switch goes on, you set the slider value to 100% and if it goes off, the slider value goes to 0%.

Now the difficulty is to stop the two different processes from interfering with each other. e.g. if the slider triggers the switch, you don't then want it changing the slider again. There are several ways to do that but I'll leave you to think of some ideas. :wink:

Tanks. tried that , But dident get it to work. Think i need it in with a tespoon.

I have it like this.

server-node- switch
^ - slide- changenode. Then changenode back to switch.
or like this
server-node-slide-switch. changenode. then changnode bac to switch.

Maybe like this

[{"id":"139ccf82.c9432","type":"ui_switch","z":"846d7832.3348c8","name":"","label":"switch","tooltip":"","group":"29422079.db4db","order":2,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"100","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":180,"y":1380,"wires":[["1eea49e4.cc5be6"]]},{"id":"1eea49e4.cc5be6","type":"ui_slider","z":"846d7832.3348c8","name":"","label":"slider","tooltip":"","group":"29422079.db4db","order":1,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":0,"max":"100","step":1,"x":330,"y":1380,"wires":[["54f5b2b3.b16f1c","6bac8cb8.78e7e4"]]},{"id":"54f5b2b3.b16f1c","type":"ui_gauge","z":"846d7832.3348c8","name":"","group":"29422079.db4db","order":0,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":550,"y":1380,"wires":[]},{"id":"6bac8cb8.78e7e4","type":"switch","z":"846d7832.3348c8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":170,"y":1520,"wires":[["139ccf82.c9432"],["3492729d.ffd83e"]]},{"id":"3492729d.ffd83e","type":"change","z":"846d7832.3348c8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":1520,"wires":[["139ccf82.c9432"]]},{"id":"29422079.db4db","type":"ui_group","z":"","name":"Default","tab":"4e7a1ada.29ed94","disp":true,"width":"6","collapse":false},{"id":"4e7a1ada.29ed94","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

When you try and it doesn't work, it is best to share the flow (and pictures of it) so that we can help you understand what is wrong.

thanx. Got that working. But if i use the fibaro app to turn off/on the light nodered dosent change the status. But if i use Nodered to turn off/on the fibaro app shows status changed

Hello. I am doing somthing wrong here, if i use my hc2 to turn of lights, Node red dont adjust settings after that, so if i turn off lights they are still on in node red.
upploading flow.

flows (2).json (11.4 KB)