Hi Julien,
Juju wrote:how have I to manage the new pausedScheduleRemainingZoneDuration property ?
You'll want to update the
pluginProps["PauseScheduleRemainingZoneDuration"] value for that. I just posted an
update to the SDK (1.2.2) Example Sprinkler plugin that shows roughly how/when to set
PauseScheduleRemainingZoneDuration (pretty much the exact places
PauseScheduleZoneIndex is used). The value is just as a place the plugin can store the remaining zone duration for the activeZone when it is paused, such that it knows on resume to use that duration. Because you have
OverrideScheduleActions set to True you'll have to calculate what the remainingZoneDuration value should be manually.
Note that IndigoServer has a buglet in the python object model so that the
dev.pausedScheduleRemainingZoneDuration attribute does not mirror the
dev.pluginProps["PauseScheduleRemainingZoneDuration"] property. They should always be the same, but in the case of
OverrideScheduleActions being True the value isn't reflecting on the device instance property correctly. That will be fixed in the next release of Indigo, but in the mean time you can just access it via
dev.pluginProps[] which is what the SDK example does.
Juju wrote:what is the difference between the StopSchedule and AllZonesOff actions ?
If I remember correctly,
if
OverrideScheduleActions is
False:
•
AllZonesOff will be called whenever Indigo Server's logic determines no zones should be on (user presses stop schedule, a schedule ends, user pauses a schedule, etc.)
•
StopSchedule is never called since Indigo Server handles the higher level scheduling
else if
OverrideScheduleActions is
True:
•
StopSchedule will be called whenever user stops an actively running schedule
•
StopSchedule will also be called if user turns off the zones when no schedule is running (ex: they manually selected a zone when no schedule was running, then press stop)
I'm not 100% positive on the last one though, in that case
AllZonesOff might be dispatched instead. I'd have to just try it to see.
Juju wrote:When I update the activeZone state with an integer, the new value is stored as a string ... I don't find in my code where could be the mistake, so perhaps it's on your side
Should be an integer. I tried it with the example plugin and never saw it become a string. Let me know if you come up with steps to reproduce the problem.