Okay, this is pretty deep into the abilities of the SDK.
I am attempting to update the variable state.pausedOn in the function pauseSchedule in the following:
SmartApp: https://github.com/chuckpearce/stRepo/blob/master/gist/rain8net.js
DeviceType: https://github.com/chuckpearce/stRepo/blob/master/gist/sprinklerZone.js
(Please don’t judge that code, it is riddled with debugging information and “hacks” for prior to using my webservice call of debugging.)
However, what is happening is no state variables are being persisted. The variable is persisted within the pauseSchedule function, but after scheduling the resumePausedSchedule function the state variables are all reset to what they were prior.
I have confirmed that initialize() is not being run multiple times. So, my big question is, is this an intended behavior, a bug, or just an unintended consequences of the architecture?
If state variables can not persist between child/parent, is there a reasonable method of passing these variables in a way that they will persist?
EDIT
Server Log: https://github.com/chuckpearce/stRepo/blob/master/gist/server.log
SmartApp Log: https://github.com/chuckpearce/stRepo/blob/master/gist/smartapp.log