Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using moisture sensors to control programs
#5
I'm having trouble with gv.srvals in that is not behaving as expected.

I have the following code in my plugin moisture_sensor.py

Code:
def notify_stations_scheduled(station, **kw):
    print("Station {} run started".format(station))
    print(f"srvals {gv.srvals}")


complete = signal("stations_scheduled")
complete.connect(notify_stations_scheduled)

I have set up a program to run every 1 minute for a duration of 30 seconds on station 2

In the logfile I see the following output

Code:
http://:::80/
Some Stations have been scheduled: [[0, 0, 0, 0], [1705407497, 1705407527, 30, 1], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
Station SIP run started
srvals [0, 0, 0, 0, 0, 0, 0, 0]

I would have expected the srvals list to have the value  [0, 1, 0, 0, 0, 0, 0, 0] and not  [0, 0, 0, 0, 0, 0, 0, 0] as the second station is scheduled.

Any ideas what II need to change?
Reply


Messages In This Thread
RE: Using moisture sensors to control programs - by cdesouza - 2024 Jan 16, 12:26 PM

Forum Jump:


Users browsing this thread: 14 Guest(s)