Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Format of MQTT Schedule plugin commands?
#3
I think the mqtt_slave plugin has the functionality you need.
It is designed for controlling a remote Pi from a master Pi, both running SIP, but the code for turning stations on and off can be used for what you are trying to do.

The relevant code is at line 68 through 81 in the file mqtt_slave.py.

See gv_reference.txt in the SIP folder (line 65) for info on the format of the run schedule list. That controls when stations are turned on or off. If you set the start time for a station to gv.now (the current time) the station will be turned on. If you set the stop time to gv.now the station will be turned off. Setting the duration to infinity (gv.rs[i][1] = float('inf') the station will stay on until stop time is set to gv_now.
<p><br></p>
Reply


Messages In This Thread
Format of MQTT Schedule plugin commands? - by Ryan - 2019 Aug 10, 01:20 PM
RE: Format of MQTT Schedule plugin commands? - by dan - 2019 Aug 11, 03:25 PM

Forum Jump:


Users browsing this thread: 8 Guest(s)