sonoff

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
sonoff [24.07.2018 09:17] – [Making the installation permanent] Pascal Sutersonoff [08.12.2018 09:57] – [Rules Engine - node-red] Pascal Suter
Line 130: Line 130:
 In order to turn the lights on in a room, you can publish to the topic ''set/dss/apartment/zones/Garden/groups/1/lastCalledScene'' and set the value to ''5'' or ''0''. here is an example using ''mosquitto_pub'':  In order to turn the lights on in a room, you can publish to the topic ''set/dss/apartment/zones/Garden/groups/1/lastCalledScene'' and set the value to ''5'' or ''0''. here is an example using ''mosquitto_pub'': 
   mosquitto_pub -h mqtt.psuter.ch -u sonoffs -P sonoff -t set/dss/apartment/zones/Garden/groups/1/lastCalledScene -m 5   mosquitto_pub -h mqtt.psuter.ch -u sonoffs -P sonoff -t set/dss/apartment/zones/Garden/groups/1/lastCalledScene -m 5
 +
  
 ===== Rules Engine - node-red ===== ===== Rules Engine - node-red =====
Line 159: Line 160:
 and here is what it looks like:  and here is what it looks like: 
 {{ :node-red:flow.png |}} {{ :node-red:flow.png |}}
 +==== a word about retention ====
 +it seems node-red sets the retention flag of mqtt by default. I learned this when i used it together with the mqtt-dss-connector: i created a rule that turned the light in the bathroom on. if i turned it off later (not via node-red) and then restarted the mqtt-dss-bridge the light in my bathroom went on again "for no reason" .. this was because that on command was published with the retention flag set to on (or actually not set to anything in node-red). so i set it to "false" and the problem was resolved. 
 +
 ===== Making the installation permanent ===== ===== Making the installation permanent =====
 this might be different in your setup, but I would like to install the npm modules globally and then run them as non-root users through a systemd script to make sure they are auto-startet as soon as my system boots. this might be different in your setup, but I would like to install the npm modules globally and then run them as non-root users through a systemd script to make sure they are auto-startet as soon as my system boots.
  • sonoff.txt
  • Last modified: 07.09.2021 05:52
  • by Pascal Suter