HubAction callbacks


(Alan Penner) #1

I realize that callbacks aren’t documented and as such aren’t necessarily functional, but it appears they are in use in at least some SmartThings apps in the official repo. (https://community.smartthings.com/t/sending-get-requests/41621/2)

I’ve tried to use them recently, and (as commented in that other thread), if I just do one request all seems fine. But when I have multiple requests, even if I do them one at a time, it seems the results end up back in the wrong functions.

If you look at the callbacks branch of my Hue app you can see some of this code.

def discoverBulbs() {
	log.debug("Bridge discovering bulbs.")
	def host = this.device.currentValue("networkAddress") + ":80"
	def username = this.device.currentValue("username")

        return parent.getHubAction(host, "/api/${username}/lights", "discoverBulbs_response")
}

def discoverBulbs_response(resp) {
	log.debug("Bulb discovery response.")
	def body = new groovy.json.JsonSlurper().parseText(parseLanMessage(resp.description).body)
	sendEvent(name: "bulbDiscovery", value: device.hub.id, isStateChange: true, data: [body, this.device.deviceNetworkId])
}

def discoverScenes() {
	log.debug("Bridge discovering scenes.")
	def host = this.device.currentValue("networkAddress") + ":80"
	def username = this.device.currentValue("username")

        return parent.getHubAction(host, "/api/${username}/scenes", "discoverScenes_response")
}

def discoverScenes_response(resp) {
	log.debug("Scene discovery response.")
        def body = new groovy.json.JsonSlurper().parseText(parseLanMessage(resp.description).body)
	sendEvent(name: "sceneDiscovery", value: device.hub.id, isStateChange: true, data: [body, this.device.deviceNetworkId])
}

def discoverGroups() {
	log.debug("Bridge discovering groups.")
	def host = this.device.currentValue("networkAddress") + ":80"
	def username = this.device.currentValue("username")

        return parent.getHubAction(host, "/api/${username}/groups", "discoverGroups_response")
}

def discoverGroups_response(resp) {
	log.debug("Group discovery response.")
        def body = new groovy.json.JsonSlurper().parseText(parseLanMessage(resp.description).body)
	sendEvent(name: "groupDiscovery", value: device.hub.id, isStateChange: true, data: [body, this.device.deviceNetworkId])
}

parent.getHubAction looks like this:

def getHubAction(host, url, callback) {
    return new physicalgraph.device.HubAction("GET ${url} HTTP/1.1\r\nHOST: ${host}\r\n\r\n",
            physicalgraph.device.Protocol.LAN, "${host}", [callback: callback])
}

With some debug statements in the response functions, I have determined that they definitely get called with the wrong responses. discoverBulbs_response gets called with the list of scenes from the Hue bridge, etc. Given the way this code is structured, that’s not something that should ever happen if callbacks are working properly.

As I said, I realize this isn’t documented functionality and I am not currently relying on it working. It would be very nice to have though, and if it is planned for release, this is something that should probably be looked into.


(Joshua Lyon (SharpTools.io Dashboard)) #2

Am I understanding correctly that the first block of code with the discoverXXX methods is in a device type and that is calling a method from the parent SmartApp which is returning a hubAction?

Have you tried keeping all the hubAction logic, including the callbacks, in either the SmartApp or the DTH instead of spreading it across both?

PS. Reach out to @jody about joining the developer Slack. You might be able to get some better help on this undocumented method there.


(Alan Penner) #3

Yeah, the first block of code is in a device handler and the parent SmartApp is returning the hubAction. I have not tried putting it all into one, but the parent function doesn’t actually submit the request, just creates the object. The discoverXXX method is called as a device command from the SmartApp, and so the actual HTTP request doesn’t happen until the device handler function returns the hubAction. I will try it, but I can’t see how creating the hubAction in the device instead of the parent should make any difference. The responses are still getting back to the correct device handler, just not the correct functions inside them.


(Jim Anderson) #4

Just a note that it’s not documented because I am neglecting this. It’s not documented because it’s not ready. I’ve passed this on to an engineer for consideration, but until we spend some time to harden and understand the support around this functionality we shouldn’t expect anything with this :slight_smile:


(Joshua Lyon (SharpTools.io Dashboard)) #5

I agree. I wouldn’t expect it to make a difference either, but since we are grasping at straws here, I was trying to think through some of the troubleshooting steps I might take if it was my code.


(Luke) #6

@penner42 I copied your Hue code from here and did some testing: https://github.com/penner42/Hue-Improved/tree/callbacks

Specifically, I added additional logging to the discoverScenes_response, discoverGroups_response, and discoverBulbs_response methods, and set things up from scratch 3 separate times, and the correct response went to the correct method every time. The data I logged was the name of the method, plus “${resp.json}” (you don’t need to manually parse JSON, it is automatically populated in the HubResponse if the Content-Type header is set to application/json).

Maybe there are some special testing steps you’re following that I’m not? I’m just discovering the bridge, selecting it, then navigating to the screen where I can choose from the available bulbs, scenes, and groups.


(Alan Penner) #7

Maybe it had something to do with the platform issues? I haven’t gone back to try it again, but it was definitely sending responses to the wrong functions. I think it happened more if you hit the refresh href than on the initial loads. Hit refresh enough, and all three sections (bulbs, groups, scenes) eventually ended up with all the items populating all three lists.

The debugging I had in there was basically what you did: log.debug("bulbs ${body}"), etc. Maybe it’s been fixed on the backend already, or whatever was causing it has worked itself out? Since it’s not ready/supported/documented yet, I just put that part of things on hold. I have since changed the master branch to just use one query instead of three to get all the items, because I discovered that the Hue bridge has an api request that returns them all at once.


(Luke) #8

The platform issues we’ve seen shouldn’t apply to such a problem as described.

I hit refresh as fast as I could 16 times in a row and still saw no issues.

I can’t think of another variable that could differ between us, so before I give up, my last hope is that perhaps we have different Hue Bridge firmware? The bridge I’m testing with is on version 01031131, which is the latest according to: http://www2.meethue.com/en-us/release-notes/


(Alan Penner) #9

No idea what’s going on, then. I’m on the same Hue bridge version. I just put my callbacks tree back… here’s some logging. Still happening.

d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:13 AM: debug Scene discovery response. [3:[lights:[5, 6, 7, 8, 9, 10, 11], recycle:false, name:Group 1, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 2:[lights:[3, 4, 61, 63], recycle:false, name:Alan Office, action:[bri:254, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:true, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 1:[lights:[5, 6, 7, 8, 9, 10, 11], recycle:false, name:TV Room, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 6:[lights:[17, 18, 19, 20, 22], recycle:false, name:Bedroom, action:[bri:51, effect:none, sat:144, alert:none, hue:14563, colormode:hs, on:false, ct:372, xy:[0.4616, 0.4090]], type:LightGroup], 5:[lights:[50, 51, 52, 53], recycle:false, name:Island, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:ct, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 4:[lights:[12, 13, 14, 15, 26, 27, 28, 54, 55, 57, 56], recycle:false, name:Kitchen + Hallway, action:[bri:254, effect:none, sat:144, alert:none, hue:14910, colormode:ct, on:true, ct:369, xy:[0.4596, 0.4105]], type:LightGroup]]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:12 AM: debug Bridge discovering groups.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:11 AM: debug Scene discovery response. [3:[lights:[5, 6, 7, 8, 9, 10, 11], recycle:false, name:Group 1, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 2:[lights:[3, 4, 61, 63], recycle:false, name:Alan Office, action:[bri:254, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:true, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 1:[lights:[5, 6, 7, 8, 9, 10, 11], recycle:false, name:TV Room, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 6:[lights:[17, 18, 19, 20, 22], recycle:false, name:Bedroom, action:[bri:51, effect:none, sat:144, alert:none, hue:14563, colormode:hs, on:false, ct:372, xy:[0.4616, 0.4090]], type:LightGroup], 5:[lights:[50, 51, 52, 53], recycle:false, name:Island, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:ct, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 4:[lights:[12, 13, 14, 15, 26, 27, 28, 54, 55, 57, 56], recycle:false, name:Kitchen + Hallway, action:[bri:254, effect:none, sat:144, alert:none, hue:14910, colormode:ct, on:true, ct:369, xy:[0.4596, 0.4105]], type:LightGroup]]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:11 AM: debug Group discovery response. [3:[lights:[5, 6, 7, 8, 9, 10, 11], recycle:false, name:Group 1, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 2:[lights:[3, 4, 61, 63], recycle:false, name:Alan Office, action:[bri:254, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:true, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 1:[lights:[5, 6, 7, 8, 9, 10, 11], recycle:false, name:TV Room, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 6:[lights:[17, 18, 19, 20, 22], recycle:false, name:Bedroom, action:[bri:51, effect:none, sat:144, alert:none, hue:14563, colormode:hs, on:false, ct:372, xy:[0.4616, 0.4090]], type:LightGroup], 5:[lights:[50, 51, 52, 53], recycle:false, name:Island, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:ct, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 4:[lights:[12, 13, 14, 15, 26, 27, 28, 54, 55, 57, 56], recycle:false, name:Kitchen + Hallway, action:[bri:254, effect:none, sat:144, alert:none, hue:14910, colormode:ct, on:true, ct:369, xy:[0.4596, 0.4105]], type:LightGroup]]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:10 AM: debug Bridge discovering groups.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:10 AM: debug Scene discovery response. [3:[lights:[5, 6, 7, 8, 9, 10, 11], recycle:false, name:Group 1, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 2:[lights:[3, 4, 61, 63], recycle:false, name:Alan Office, action:[bri:254, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:true, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 1:[lights:[5, 6, 7, 8, 9, 10, 11], recycle:false, name:TV Room, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 6:[lights:[17, 18, 19, 20, 22], recycle:false, name:Bedroom, action:[bri:51, effect:none, sat:144, alert:none, hue:14563, colormode:hs, on:false, ct:372, xy:[0.4616, 0.4090]], type:LightGroup], 5:[lights:[50, 51, 52, 53], recycle:false, name:Island, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:ct, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 4:[lights:[12, 13, 14, 15, 26, 27, 28, 54, 55, 57, 56], recycle:false, name:Kitchen + Hallway, action:[bri:254, effect:none, sat:144, alert:none, hue:14910, colormode:ct, on:true, ct:369, xy:[0.4596, 0.4105]], type:LightGroup]]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:09 AM: debug Bridge discovering groups.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:09 AM: debug Bridge discovering groups.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:09 AM: debug Scene discovery response. [3:[lights:[5, 6, 7, 8, 9, 10, 11], recycle:false, name:Group 1, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 2:[lights:[3, 4, 61, 63], recycle:false, name:Alan Office, action:[bri:254, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:true, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 1:[lights:[5, 6, 7, 8, 9, 10, 11], recycle:false, name:TV Room, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:hs, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 6:[lights:[17, 18, 19, 20, 22], recycle:false, name:Bedroom, action:[bri:51, effect:none, sat:144, alert:none, hue:14563, colormode:hs, on:false, ct:372, xy:[0.4616, 0.4090]], type:LightGroup], 5:[lights:[50, 51, 52, 53], recycle:false, name:Island, action:[bri:1, effect:none, sat:142, alert:none, hue:15073, colormode:ct, on:false, ct:365, xy:[0.4575, 0.4107]], type:LightGroup], 4:[lights:[12, 13, 14, 15, 26, 27, 28, 54, 55, 57, 56], recycle:false, name:Kitchen + Hallway, action:[bri:254, effect:none, sat:144, alert:none, hue:14910, colormode:ct, on:true, ct:369, xy:[0.4596, 0.4105]], type:LightGroup]]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:09 AM: debug Scene discovery response. [087f88f52-on-0:[picture:, lights:[3], recycle:true, name:Sunset on 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], a19a5ce07-off-0:[picture:, lights:[4, 5, 6, 7, 8, 9, 10], recycle:true, name:Relax - tv off 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 9ed8fd28d-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 1432337524741, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 43:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:43, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:26:03, locked:false, version:1], fddae7cbc-on-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN on 1432337533182, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 41:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:41, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:25:58, locked:false, version:1], c5eabcb63-on-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:New test on 1454013741408, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T20:42:25, locked:false, version:1], 270639d1f-on-0:[picture:, lights:[3, 4], recycle:true, name:Office Blue on 1433343819284, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 1394d6d9b-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 14152, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 87:[picture:, lights:[50, 51, 52, 53], recycle:true, name:87, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-03-12T00:25:18, locked:false, version:1], c6cabaaab-off-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:Office test 1 off 1454004383539, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T18:...[TRUNCATED]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:08 AM: debug Bridge discovering groups.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:08 AM: debug Scene discovery response. [087f88f52-on-0:[picture:, lights:[3], recycle:true, name:Sunset on 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], a19a5ce07-off-0:[picture:, lights:[4, 5, 6, 7, 8, 9, 10], recycle:true, name:Relax - tv off 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 9ed8fd28d-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 1432337524741, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 43:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:43, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:26:03, locked:false, version:1], fddae7cbc-on-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN on 1432337533182, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 41:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:41, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:25:58, locked:false, version:1], c5eabcb63-on-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:New test on 1454013741408, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T20:42:25, locked:false, version:1], 270639d1f-on-0:[picture:, lights:[3, 4], recycle:true, name:Office Blue on 1433343819284, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 1394d6d9b-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 14152, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 87:[picture:, lights:[50, 51, 52, 53], recycle:true, name:87, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-03-12T00:25:18, locked:false, version:1], c6cabaaab-off-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:Office test 1 off 1454004383539, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T18:...[TRUNCATED]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:07 AM: debug Bridge discovering scenes.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:06 AM: debug Bulb discovery response. [087f88f52-on-0:[picture:, lights:[3], recycle:true, name:Sunset on 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], a19a5ce07-off-0:[picture:, lights:[4, 5, 6, 7, 8, 9, 10], recycle:true, name:Relax - tv off 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 9ed8fd28d-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 1432337524741, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 43:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:43, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:26:03, locked:false, version:1], fddae7cbc-on-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN on 1432337533182, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 41:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:41, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:25:58, locked:false, version:1], c5eabcb63-on-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:New test on 1454013741408, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T20:42:25, locked:false, version:1], 270639d1f-on-0:[picture:, lights:[3, 4], recycle:true, name:Office Blue on 1433343819284, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 1394d6d9b-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 14152, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 87:[picture:, lights:[50, 51, 52, 53], recycle:true, name:87, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-03-12T00:25:18, locked:false, version:1], c6cabaaab-off-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:Office test 1 off 1454004383539, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T18:0...[TRUNCATED]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:05 AM: debug Bridge discovering scenes.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:05 AM: debug Bulb discovery response. [087f88f52-on-0:[picture:, lights:[3], recycle:true, name:Sunset on 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], a19a5ce07-off-0:[picture:, lights:[4, 5, 6, 7, 8, 9, 10], recycle:true, name:Relax - tv off 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 9ed8fd28d-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 1432337524741, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 43:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:43, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:26:03, locked:false, version:1], fddae7cbc-on-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN on 1432337533182, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 41:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:41, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:25:58, locked:false, version:1], c5eabcb63-on-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:New test on 1454013741408, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T20:42:25, locked:false, version:1], 270639d1f-on-0:[picture:, lights:[3, 4], recycle:true, name:Office Blue on 1433343819284, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 1394d6d9b-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 14152, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 87:[picture:, lights:[50, 51, 52, 53], recycle:true, name:87, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-03-12T00:25:18, locked:false, version:1], c6cabaaab-off-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:Office test 1 off 1454004383539, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T18:0...[TRUNCATED]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:04 AM: debug Bridge discovering scenes.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:04 AM: debug Bulb discovery response. [087f88f52-on-0:[picture:, lights:[3], recycle:true, name:Sunset on 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], a19a5ce07-off-0:[picture:, lights:[4, 5, 6, 7, 8, 9, 10], recycle:true, name:Relax - tv off 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 9ed8fd28d-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 1432337524741, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 43:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:43, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:26:03, locked:false, version:1], fddae7cbc-on-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN on 1432337533182, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 41:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:41, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:25:58, locked:false, version:1], c5eabcb63-on-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:New test on 1454013741408, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T20:42:25, locked:false, version:1], 270639d1f-on-0:[picture:, lights:[3, 4], recycle:true, name:Office Blue on 1433343819284, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 1394d6d9b-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 14152, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 87:[picture:, lights:[50, 51, 52, 53], recycle:true, name:87, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-03-12T00:25:18, locked:false, version:1], c6cabaaab-off-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:Office test 1 off 1454004383539, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T18:0...[TRUNCATED]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:03 AM: debug Bridge discovering scenes.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:02 AM: debug Bulb discovery response. [087f88f52-on-0:[picture:, lights:[3], recycle:true, name:Sunset on 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], a19a5ce07-off-0:[picture:, lights:[4, 5, 6, 7, 8, 9, 10], recycle:true, name:Relax - tv off 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 9ed8fd28d-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 1432337524741, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 43:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:43, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:26:03, locked:false, version:1], fddae7cbc-on-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN on 1432337533182, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 41:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:41, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:25:58, locked:false, version:1], c5eabcb63-on-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:New test on 1454013741408, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T20:42:25, locked:false, version:1], 270639d1f-on-0:[picture:, lights:[3, 4], recycle:true, name:Office Blue on 1433343819284, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 1394d6d9b-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 14152, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 87:[picture:, lights:[50, 51, 52, 53], recycle:true, name:87, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-03-12T00:25:18, locked:false, version:1], c6cabaaab-off-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:Office test 1 off 1454004383539, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T18:0...[TRUNCATED]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:01 AM: debug Bridge discovering scenes.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:01 AM: debug Bulb discovery response. [087f88f52-on-0:[picture:, lights:[3], recycle:true, name:Sunset on 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], a19a5ce07-off-0:[picture:, lights:[4, 5, 6, 7, 8, 9, 10], recycle:true, name:Relax - tv off 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 9ed8fd28d-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 1432337524741, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 43:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:43, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:26:03, locked:false, version:1], fddae7cbc-on-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN on 1432337533182, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 41:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:41, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:25:58, locked:false, version:1], c5eabcb63-on-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:New test on 1454013741408, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T20:42:25, locked:false, version:1], 270639d1f-on-0:[picture:, lights:[3, 4], recycle:true, name:Office Blue on 1433343819284, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 1394d6d9b-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 14152, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 87:[picture:, lights:[50, 51, 52, 53], recycle:true, name:87, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-03-12T00:25:18, locked:false, version:1], c6cabaaab-off-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:Office test 1 off 1454004383539, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T18:0...[TRUNCATED]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:25:01 AM: debug Bridge discovering scenes.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:24:58 AM: debug Bridge discovering scenes.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:24:57 AM: debug Bulb discovery response. [087f88f52-on-0:[picture:, lights:[3], recycle:true, name:Sunset on 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], a19a5ce07-off-0:[picture:, lights:[4, 5, 6, 7, 8, 9, 10], recycle:true, name:Relax - tv off 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 9ed8fd28d-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 1432337524741, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 43:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:43, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:26:03, locked:false, version:1], fddae7cbc-on-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN on 1432337533182, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 41:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:41, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:25:58, locked:false, version:1], c5eabcb63-on-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:New test on 1454013741408, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T20:42:25, locked:false, version:1], 270639d1f-on-0:[picture:, lights:[3, 4], recycle:true, name:Office Blue on 1433343819284, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 1394d6d9b-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 14152, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 87:[picture:, lights:[50, 51, 52, 53], recycle:true, name:87, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-03-12T00:25:18, locked:false, version:1], c6cabaaab-off-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:Office test 1 off 1454004383539, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T18:0...[TRUNCATED]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:24:55 AM: debug Bridge discovering scenes.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:24:55 AM: debug Bulb discovery response. [087f88f52-on-0:[picture:, lights:[3], recycle:true, name:Sunset on 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], a19a5ce07-off-0:[picture:, lights:[4, 5, 6, 7, 8, 9, 10], recycle:true, name:Relax - tv off 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 9ed8fd28d-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 1432337524741, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 43:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:43, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:26:03, locked:false, version:1], fddae7cbc-on-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN on 1432337533182, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 41:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:41, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:25:58, locked:false, version:1], c5eabcb63-on-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:New test on 1454013741408, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T20:42:25, locked:false, version:1], 270639d1f-on-0:[picture:, lights:[3, 4], recycle:true, name:Office Blue on 1433343819284, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 1394d6d9b-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 14152, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 87:[picture:, lights:[50, 51, 52, 53], recycle:true, name:87, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-03-12T00:25:18, locked:false, version:1], c6cabaaab-off-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:Office test 1 off 1454004383539, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T18:0...[TRUNCATED]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:24:53 AM: debug Bridge discovering scenes.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:24:52 AM: debug Bulb discovery response. [087f88f52-on-0:[picture:, lights:[3], recycle:true, name:Sunset on 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], a19a5ce07-off-0:[picture:, lights:[4, 5, 6, 7, 8, 9, 10], recycle:true, name:Relax - tv off 0, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 9ed8fd28d-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 1432337524741, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 43:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:43, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:26:03, locked:false, version:1], fddae7cbc-on-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN on 1432337533182, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 41:[picture:, lights:[17, 18, 19, 20, 22], recycle:true, name:41, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-01-29T20:25:58, locked:false, version:1], c5eabcb63-on-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:New test on 1454013741408, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T20:42:25, locked:false, version:1], 270639d1f-on-0:[picture:, lights:[3, 4], recycle:true, name:Office Blue on 1433343819284, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 1394d6d9b-off-0:[picture:, lights:[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 26, 27, 28], recycle:true, name:HIDDEN off 14152, owner:none, appdata:[:], lastupdated:null, locked:false, version:1], 87:[picture:, lights:[50, 51, 52, 53], recycle:true, name:87, owner:ZonoffDiplomatUser, appdata:[:], lastupdated:2016-03-12T00:25:18, locked:false, version:1], c6cabaaab-off-0:[picture:, lights:[3, 4, 61, 63], recycle:true, name:Office test 1 off 1454004383539, owner:0000000068701d97ffffffff84904312, appdata:[:], lastupdated:2016-01-28T18:0...[TRUNCATED]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:24:51 AM: debug Bridge discovering scenes.
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:24:50 AM: debug Bulb discovery response. [59:[uniqueid:00:17:88:01:00:cd:5c:8d-0b, name:LightStrips 1, state:[bri:254, effect:none, sat:254, reachable:true, alert:none, hue:47104, colormode:xy, on:false, xy:[0.1380, 0.0800]], modelid:LST001, manufacturername:Philips, swversion:66013452, type:Color light], 57:[uniqueid:00:17:88:01:00:f4:22:d0-0b, name:Kitchen 6, state:[bri:254, effect:none, sat:144, reachable:true, alert:none, hue:14910, colormode:ct, on:true, ct:369, xy:[0.4596, 0.4105]], modelid:LCT002, manufacturername:Philips, swversion:66013452, type:Extended color light], 56:[uniqueid:00:17:88:01:00:f4:1b:60-0b, name:Kitchen 3, state:[bri:254, effect:none, sat:144, reachable:true, alert:none, hue:14910, colormode:ct, on:true, ct:369, xy:[0.4596, 0.4105]], modelid:LCT002, manufacturername:Philips, swversion:66013452, type:Extended color light], 19:[uniqueid:00:17:88:01:00:d1:70:5b-0b, name:Master Bedroom 3, state:[bri:53, effect:none, sat:137, reachable:true, alert:none, hue:14563, colormode:hs, on:false, ct:365, xy:[0.4577, 0.4074]], modelid:LCT002, manufacturername:Philips, swversion:66013452, type:Extended color light], 55:[uniqueid:00:17:88:01:00:f3:52:fb-0b, name:Kitchen 4, state:[bri:254, effect:none, sat:144, reachable:true, alert:none, hue:14910, colormode:ct, on:true, ct:369, xy:[0.4596, 0.4105]], modelid:LCT002, manufacturername:Philips, swversion:66013452, type:Extended color light], 17:[uniqueid:00:17:88:01:00:ea:cb:99-0b, name:Master Bedroom 1, state:[bri:53, effect:none, sat:144, reachable:true, alert:none, hue:14199, colormode:hs, on:false, ct:375, xy:[0.4638, 0.4074]], modelid:LCT002, manufacturername:Philips, swversion:66013452, type:Extended color light], 18:[uniqueid:00:17:88:01:00:ea:42:b8-0b, name:Master Bedroom 2, state:[bri:84, effect:none, sat:0, reachable:false, alert:none, hue:0, colormode:hs, on:true, ct:0, xy:[0.0000, 0.0000]], modelid:LCT002, manufacturername:Philips, swversion:66013452, type:Extended color light], 15:[uniqueid:00:17:88:01:00:b6:d1:29-0b, name:Hallway 4, state:[bri:254, effect:no...[TRUNCATED]
d1291bb6-6a80-45b5-8f58-2e68568ee0c3  8:24:48 AM: debug Bridge discovering bulbs.

(www.rboyapps.com - Make your home your butler!) #10

@Jim,

For hubAction does callback work with Device Handlers or does one only need to use the device.deviceNetworkId method only for Device Handlers?

I’m trying to see how one can make single Device Handler communicate with multiple IP devices hence the callback.

EDIT: Yes it does, you need to set the device.deviceNetworkId to null