I have only been playing around with the device handlers, and smart apps for a few weeks. but it appears that I can save and publish and have no exceptions/errors, but than later in the IDE it returns “groovy.lang.MissingPropertyException: No such property: requestId for class: physicalgraph.device.HubMultiAction”. I can see the value in the my log.debug. but when using it through a device commands (sonos), it breaks, sometimes, but only sometimes?
it is my theory that depending what server/cloud my app is running in that “states” might not be replicated to or something… I have also noted that when making frequent changes (I"m new to groovy, so I have to constantly save and test). that sometimes my code will disappear after getting logged or during the wee hours of 12:00am to 3:00am PST…
The odd thing is when I don’t define a variable or it’s not a string or whatever, I get no such property: for class… but this error is no such property: requestId. requestId is not what in my code! which isn’t called at all!
anyone else, notice these things, or am I just plain losing it?
my code snippet:
private action(evt) {
state.zones = null
state.theCoordinator = null
log.trace "Action()"
settings.sonos.each(){
it?.refresh()
def myPlayer = it.currentState("myPlayer")
myPlayer = "${myPlayer.value}"
def myCoordinator = it.currentState("coordinator")
if (state.zones == null) {
loadZones()
}
if (state.theCoordinator == null) {
state.zones.any() {
state.theCoordinator = it.player
}
}
log.debug "the zones: $state.zones"
log.debug "the Coordinator: $state.theCoordinator"
log.debug "ismyPlayer:$myPlayer"
state.theCoordinator = state.theCoordinator // added this just because.....
log.debug "${it.displayName} has been chosen as the coordinator: $state.theCoordinator"
sonos.groupPlayTrackAndResume("http://192.168.1.1/shares/media/beep_beep.mp3",state.theCoordinator, "20", "20")
}
}