OpenMarine
Onboard lights - MQTT controlled - NR Displayed - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: Node Red (https://forum.openmarine.net/forumdisplay.php?fid=15)
+--- Thread: Onboard lights - MQTT controlled - NR Displayed (/showthread.php?tid=2137)



Onboard lights - MQTT controlled - NR Displayed - Ranur - 2019-12-09

It started out as a grand plan, where I'd rather than have physical switches would use digital ones. I purchased three Shelly RGBW2's, as they are controllable through MQTT. Another sweet thing is that they can control four channels each - giving me the opportunity to control 12 light sources in total. Following my "Neaew - I'll figure it out as I go along" SOP - I am now stuck. 
Through another thread here on the forum (http://forum.openmarine.net/showthread.php?tid=2052&pid=11163#pid11163) I've come to realize that the solution to my challenge is spelled node red. 
The Shelly RGBW2 HAS a decent looking web interface which COULD be used - the problem is that it is one per Shelly, so to control my lights I'd need three pages open. Which of course is utterly unacceptable. (as seen in attachment)
What I am looking for is some kicks in the behind, some guidance, and help along the way to build a NR dashboard where I can control my ShellyRGBW2's with MQTT. Preferably I'd like a button AND a slider for each channel. I've come across this for the Shelly API: https://shelly-api-docs.shelly.cloud/#shelly-rgbw2-mqtt but I am stuck and do not know how to move on. 
This thread from The Hookup is essentially what I want to do: https://github.com/thehookup/Shelly-RGBW2 (The second part - RGBW2 to control 4 different channels of white..) but it is for Home Assistant and YAML - which is ALSO out of my league. 

So - hopefully, you guys see what I'd like to accomplish - anyone out there done anything like it already?

Thanks,
Ranur


RE: Onboard lights - MQTT controlled - NR Displayed - Ranur - 2019-12-18

So... Three weeks of the terrible, lethal man-flu but I've managed to get some work done. So this is how it is suppose to work. I can now control the Shelly's from three push buttons on my display panel, and as they are momentary switches, they can also be used to dim each Shelly. The drawback is that it controls all four channels on each RGBW2, which is why I want to make a Node red interface. 
   
THAT on the other hand turns out to be more challenging than expected, as i do not want to clutter wit a On and an OFF button. Furthermore I will have a slider for dimming for each channel. This of course will have to be in sync with the button so the button/slider knows whether the light is on or not. Challenging indeed. Anyone done this and can share a flow? 
   

Got the hang of MQTT and change nodes now - so getting somewhere - s l o w l y... ;-)


RE: Onboard lights - MQTT controlled - NR Displayed - Ranur - 2019-12-21

Honestly?! I'm so proud that I am about to burst. Thanks to pointers, forums, elbow grease etc, I have managed to get it to work. Now I can control the basics from a node red dashboard, turning each channel on the RGBW2 on and off, while dimming and checking status. Here is a link to the flow if y'all are looking for something similar: https://discourse.nodered.org/t/a-little-bit-of-a-flow-that-others-may-like/372/42?u=ranur

*dancing*


Oh and it is p r o b a b l y not the tidiest, neatest thing you've ever seen, but hey - I am a node red virgin so it'll do! :-D


RE: Onboard lights - MQTT controlled - NR Displayed - jim321 - 2019-12-21

are you using the embedded version of node red "signalk plugin"?


RE: Onboard lights - MQTT controlled - NR Displayed - Ranur - 2019-12-21

(2019-12-21, 05:10 PM)jim321 Wrote: are you using the embedded version of node red "signalk plugin"?

Yes I hav used my Ubuntu home computer where I've downloaded latest OP to get the stuff working. I had just saved the flow and was going to transfer it to my RPi where I have "old" OP, and then a realized my setup had crashed. So I just did a shift push and  reinstalled... 
*now cursing mildly*

Oh - and the was an error in the flow I uploaded, but it should be correct now.


RE: Onboard lights - MQTT controlled - NR Displayed - Ranur - 2020-02-11

Slowly getting there! Panel is now in place. The four round buttons up to the right are momentary ones used to control the Shelly's. (+ one extra.)
   

Using RGBWW lights, I can either have white,
   

Red,
   

or brothel....
   

Some tweaking left to be done, to set the same switch through MQTT, as the wiring, but for now I can live with Pentry lights coming on when I push front head.  :-D