Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using moisture sensors to control programs
#7
(2024 Jan 17, 01:30 PM)cdesouza Wrote: After playing around quite a bit it seems that
  • srvals is set on signal zone_change and not on stations_changed
  • rs is set on signal stations_scheduled
  • setting rs[x] to [0, 0, 0, 0] will stop the schedule from running on station x

in which case it would seem that the following documentation is wrong as gv.srvals should be gv.rs
   "stations_scheduled      a program is started (Scheduled or "run now"), or station is manually started (check gv.srvals for stations set to run))"
Is there a way to determine if a station was triggered by schedule/Run Now or Run Once? 
The reason I ask is that while it makes sense to suppress a Schedule it might not make sense to suppress a Run Now and it does not make sense to suppress a Run Once.

The signals (blinker signals) are notifications broadcast by SIP that can be used by plugins to trigger functions but they do not trigger functions in the core sip code.

As far as determining what triggered a program the gv.pon variable should hold the program number but it does not work for Run Now or Run Once. I will look into adding those.

There are 3 special program numbers:
98 = Run-once Program
99 = Manual mode
100 = Node-red

I will try to add a way to determine if a program was started with Run Now rather than by the start time.
dan
<p><br></p>
Reply


Messages In This Thread
RE: Using moisture sensors to control programs - by dan - 2024 Jan 17, 07:15 PM

Forum Jump:


Users browsing this thread: 6 Guest(s)