[BETA] Hue Accessories and rooms using Hue Bridge (TAP, Motion Sensor, Dimmer Switch)

dth_sensors

(Martin Verbeek) #101

John, could you retry with new code (still 1.10) once more, i just uploaded it to git? just to be sure, remove the app again to clear up state. There were a number of other places that referred the mac address and needed to be changed. I am having some trouble getting Hue B smart active as my bridges are already discovered by lan connect.


#102

I deleted the app this morning and reinstalled it. But still no luck unfortunately. I did not delete all device handlers though since i was in a hurry to get to the office. I can try that tonight if needed.

How do you control your scenes without hue b? U write custom rules to create a single scene with webcore?


(Martin Verbeek) #103

I have a different situation…i was running a raspberry Pi running Domoticz to add some older or more exotic things to SmartThings. Later i added hue bridges to Domoticz to have all room groups, dusk sensors and some scenes from Hue propagated from Domoticz to SmartThings.

If i want to test Hue b Smart, i need to remove all of my Hue stuff from ST, that is 3 bridges and a lot of attached equipment, so i only will do that if i see no other option :slight_smile:

Could you paste some info for me as a check… The sensors are being added by a scheduled routine, that starts only when things are as expected … could you paste all the info from locations/smartapps/hue sensor (connect), including scheduled jobs? Thanks for helping out.


#104

Settings List Events
Name Type Value
z_Bridges capability.bridge Hue B Smart Bridge
z_BridgesUsernameAPI_4b1aa2 text OiCAjBzpxCO0xRUVjSXkk64-6sfyI2LmyXF7jzqt
z_Sensors enum Hue Motion, Hue Switch Dimmer
Event Subscriptions
Name Handler Filter Source
alarmSystemStatus handleAlarmStatus true Home (Location)
mode handleChangeMode true Home (Location)
status handleBridges true Hue B Smart Bridge
Application State
Name Value
devices {}
refreshCount 1
Scheduled Jobs
Handler Next Run Time Prev Run Time Status Schedule
pollTheSensors 2017-10-02 10:45:35 AM CEST PENDING 35 * * * * ? Europe/Amsterdam
notifyNewVersion 2017-10-02 7:00:00 PM CEST PENDING 0 0 19 * * ? * Europe/Amsterdam
Developer Options
Execution Location: Cloud
Enable local child app discovery: What’s this?
Job History
Handler Scheduled Time Actual Time Delay (msec) Execution (msec)
pollTheSensors 2017-10-02 10:44:35 AM CEST 2017-10-02 10:44:35.079 AM CEST 79 324
pollTheSensors 2017-10-02 10:43:35 AM CEST 2017-10-02 10:43:35.066 AM CEST 66 34
pollTheSensors 2017-10-02 10:42:35 AM CEST 2017-10-02 10:42:35.070 AM CEST 70 34
pollTheSensors 2017-10-02 10:41:35 AM CEST 2017-10-02 10:41:35.057 AM CEST 57 24
pollTheSensors 2017-10-02 10:40:35 AM CEST 2017-10-02 10:40:35.066 AM CEST 66 30
pollTheSensors 2017-10-02 10:39:35 AM CEST 2017-10-02 10:39:35.072 AM CEST 72 39
pollTheSensors 2017-10-02 10:38:35 AM CEST 2017-10-02 10:38:35.100 AM CEST 100 46
pollTheSensors 2017-10-02 10:37:35 AM CEST 2017-10-02 10:37:35.060 AM CEST 60 37
pollTheSensors 2017-10-02 10:36:35 AM CEST 2017-10-02 10:36:35.077 AM CEST 77 36
pollTheSensors 2017-10-02 10:35:35 AM CEST 2017-10-02 10:35:35.090 AM CEST 90 69
pollTheSensors 2017-10-02 10:34:35 AM CEST 2017-10-02 10:34:35.088 AM CEST 88 63
pollTheSensors 2017-10-02 10:33:35 AM CEST 2017-10-02 10:33:35.076 AM CEST 76 23


(Martin Verbeek) #105

thx! i see that polling for new sensors is being performed. I have committed code that does more extensive debugging, could you load that for me? No need to delete/reinstall app. You could press “update” in the ide on locations/smartapps/hue sensor…it will then trigger reinit…


#106

Still not working for me. I do not know if this makes a difference but im not at home right now, but the bridges at home are turned on.


(Martin Verbeek) #107

sorry was not clear enough :slight_smile: . The code has not changed in function, but i have build in more debugging, i need the app log for a period of 5-10 minutes.


#108

Hi Martin,

Ive let the program run for a while, but im afraid the log doesnt give a whole lot of information for you to work with. Anyway here it goes:

Hue Sensor (connect)

f6e49138-0535-43b5-9e6b-ede91d1db629 13:42:11: debug [handleChangeMode] Mode is Home run normal 1 minute Polling
f6e49138-0535-43b5-9e6b-ede91d1db629 13:42:11: debug Initializing
f6e49138-0535-43b5-9e6b-ede91d1db629 13:42:11: trace Updated with settings: [z_Bridges:[Hue B Smart Bridge], z_BridgesUsernameAPI_4b1aa2:OiCAjBzpxCO0xRUVjSXkk64-6sfyI2LmyXF7jzqt, z_Sensors:[Hue Motion, Hue Switch Dimmer]]
f6e49138-0535-43b5-9e6b-ede91d1db629 13:36:44: debug [handleChangeMode] Mode is Home run normal 1 minute Polling
f6e49138-0535-43b5-9e6b-ede91d1db629 13:36:44: debug Initializing
f6e49138-0535-43b5-9e6b-ede91d1db629 13:36:44: trace Updated with settings: [z_Bridges:[Hue B Smart Bridge], z_BridgesUsernameAPI_4b1aa2:OiCAjBzpxCO0xRUVjSXkk64-6sfyI2LmyXF7jzqt, z_Sensors:[Hue Motion, Hue Switch Dimmer]]

Super lan connect:

78798118-f0d6-427f-96b1-b3cad88db8dc 13:50:48: debug getChildDevices(false), children=0
78798118-f0d6-427f-96b1-b3cad88db8dc 13:50:48: debug detecting status for 99ad4882-a3a0-4f5f-9c94-ca6a3f037938 : false
78798118-f0d6-427f-96b1-b3cad88db8dc 13:50:48: trace in ssdpDiscover
78798118-f0d6-427f-96b1-b3cad88db8dc 13:35:48: debug getChildDevices(false), children=0
78798118-f0d6-427f-96b1-b3cad88db8dc 13:35:48: debug detecting status for 99ad4882-a3a0-4f5f-9c94-ca6a3f037938 : false
78798118-f0d6-427f-96b1-b3cad88db8dc 13:35:48: trace in ssdpDiscover


(Martin Verbeek) #109

going crazy! and you did paste the new code?


#110

I did not paste in any code. Just clicked update like you said in your previous message. In the evening i will delete all device handlers and the smartapp and have a fresh install. But im pretty sure all is up-to-date right now already.


(Martin Verbeek) #111

sorry, pasting new code from github is needed (i did not change the version though), some new lines in there that output more information in the log! Dutch by any chance?


#112

It still isnt working. But it does give a lot more debugging info now. en… jazeker!

668675cf-d2b7-405f-be07-7d52f118c51b 16:28:58: info [pageBridges] Hue B Smart page build 0017884b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:58: debug [pollTheSensors] Hue B Smart detected 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:58: debug [pollTheSensors] entered
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:58: debug [pageBridges] bridges present canPoll!}
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:58: debug [pageBridges] Hue B SMART detected for 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:37: info [pageBridges] Hue B Smart page build 0017884b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:37: debug [pollTheSensors] Hue B Smart detected 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:37: debug [pollTheSensors] entered
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:37: debug [pageBridges] bridges present canPoll!}
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:37: debug [pageBridges] Hue B SMART detected for 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:17: info [pageBridges] Hue B Smart page build 0017884b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:17: debug [pollTheSensors] Hue B Smart detected 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:17: debug [pollTheSensors] entered
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:17: debug [pageBridges] bridges present canPoll!}
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:17: debug [pageBridges] Hue B SMART detected for 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:16: debug [pollTheSensors] Hue B Smart detected 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:28:16: debug [pollTheSensors] entered
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:56: info [pageBridges] Hue B Smart page build 0017884b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:56: debug [pollTheSensors] Hue B Smart detected 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:56: debug [pollTheSensors] entered
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:56: debug [pageBridges] bridges present canPoll!}
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:56: debug [pageBridges] Hue B SMART detected for 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:36: info [pageBridges] Hue B Smart page build 0017884b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:36: debug [pollTheSensors] Hue B Smart detected 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:36: debug [pollTheSensors] entered
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:36: debug [pageBridges] bridges present canPoll!}
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:36: debug [pageBridges] Hue B SMART detected for 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:16: debug [pollTheSensors] Hue B Smart detected 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:16: debug [pollTheSensors] entered
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:15: info [pageBridges] Hue B Smart page build 0017884b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:15: debug [pollTheSensors] Hue B Smart detected 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:15: debug [pollTheSensors] entered
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:15: debug [pageBridges] bridges present canPoll!}
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:15: debug [pageBridges] Hue B SMART detected for 4b1aa2
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:11: debug [handleChangeMode] Mode is Home run normal 1 minute Polling
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:11: debug Initializing
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:11: trace Updated with settings: [z_Sensors:[Hue Rooms, Hue Motion, Hue Switch Dimmer, Hue Tap], z_BridgesUsernameAPI_4b1aa2:OiCAjBzpxCO0xRUVjSXkk64-6sfyI2LmyXF7jzqt, z_Bridges:[Hue B Smart Bridge]]
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:10: debug [handleChangeMode] Mode is Home run normal 1 minute Polling
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:10: debug Initializing
668675cf-d2b7-405f-be07-7d52f118c51b 16:27:10: trace Installed with settings: [z_Sensors:[Hue Rooms, Hue Motion, Hue Switch Dimmer, Hue Tap], z_BridgesUsernameAPI_4b1aa2:OiCAjBzpxCO0xRUVjSXkk64-6sfyI2LmyXF7jzqt, z_Bridges:[Hue B Smart Bridge]]


(Martin Verbeek) #113

looking at the device op Hue B smart, it looks like if also the IP address is without the port at the device attribute networkAddress itself, could you check in my devices when you click on the Hue B Smart Bridge device what the value of networkAddress is? is it with or without a port number (e.g. 192.x.y.z:80)?

if it is without :80 then load new code, now the IP is checked for the port and added if needed.


#114

There is no port number and this was the problem. Everything seems to work now! Many thanks for fixing this problem. My sensor have all been found. Later on ill be back to report after i tested them. So far i saw the batteriy says 0% and the motion sensors measure temperature… did you get this working correctly? My hall sensor says 18 degrees which seems to be correct.


(Martin Verbeek) #115

Motion sensors do temp and lux, glad we got it working. Battery is indeed still not implemented, will fix shortly.

Be sure that you also understand the limitations mentioned at the start of the thread…
And what you can do to make it more fluid :sunglasses:


#116

The temperature readings are a very nice bonus. i cant understand philips doesnt even use this feature in their own hue app… I understand the limitations that the states are actually meant to be used as trigger events. So far all my motion detectors and switches are imported, so far so good. But the motion detectors dont read any motion, in fact they some read constant motion and some nno motion ever. Also the lux reading doesnt change when i turn on a light. The switches also dont communicate with hue. I can see the switches now as “things”, they just dont show any buttons or change on/off status when i push a button. Am i doing it wrong or understanding it wrong? Or is it still bugged for me? Thanks for taking all the time to check this out.

Log:

c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:34: info [handlePoll] Update Sensor 4B1AA2/sensor/9 ZLLPresence Hal sensor 00:17:88:01:02:03:27:9c CONFIG true Reachable true
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:34: info [handlePoll] Update Sensor 4B1AA2/sensor/5 ZLLPresence Hal sensor 00:17:88:01:02:03:12:a9 CONFIG true Reachable true
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:34: info [handlePoll] Update Sensor 4B1AA2/sensor/2 ZLLSwitch Woonkamer (achter) 00:17:88:01:10:49:8a:32 CONFIG true Reachable true
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:34: info [handlePoll] Update Sensor 4B1AA2/sensor/45 ZLLSwitch Slaapkamer (2) 00:17:88:01:02:0d:67:2a CONFIG true Reachable true
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:34: info [handlePoll] Update Sensor 4B1AA2/sensor/42 ZLLPresence Hue motion sensor 1 (Toilet) 00:17:88:01:02:03:13:e0 CONFIG true Reachable true
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:34: info [handlePoll] Update Sensor 4B1AA2/sensor/14 ZLLSwitch Woonkamer (voor) 00:17:88:01:02:0e:4d:c6 CONFIG true Reachable true
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:34: info [handlePoll] Update Sensor 4B1AA2/sensor/16 ZLLSwitch Slaapkamer (deur) 00:17:88:01:10:49:8a:31 CONFIG true Reachable true
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:34: info [handlePoll] Update Sensor 4B1AA2/sensor/17 ZLLSwitch Slaapkamer (1) 00:17:88:01:10:49:8a:2e CONFIG true Reachable true
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:34: debug [handlePoll] entered for mac 4B1AA2
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:33: info [handleRooms] 4B1AA2/group/4 Hal
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:33: info [handleRooms] 4B1AA2/group/1 Woonkamer
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:33: info [handleRooms] 4B1AA2/group/2 Slaapkamer
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:33: info [handleRooms] 4B1AA2/group/3 Toilet
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:33: debug [pollTheSensors] Hue B Smart detected 4b1aa2 IP 192.168.1.12
c9ba7205-7f22-4d39-9ce6-183424666a7b 21:21:33: debug [pollTheSensors] entered


(Martin Verbeek) #117

For the Hue Tap, check out one in my devices and click list events. See if you have any button events. You have to react to button events not to a switch events. Or in the app select the device and look under recent.


#118

Im using dimmer switches, not hue taps. And you are right, there are many events in the logs. Looks pretty complicated to figure out how to use all that data for a beginner like me! But also there should be a lot possible with this which is very cool.

The motion detectors do not work correctly though. I have 3 motion detectors, but your app finds 4. And there is only 1 of those 4 which has any events logged. I will try to figure out if it catches all signals from all detectors or if its really just 1 which is working. In Hue labs i connected 2 motion detectors together to work as a team, perhaps it gives problems.


(Martin Verbeek) #119

Let me check on the motion sensors. I am not using them right now, but have just added them.

Dimmer switch has something called scene cycling, if you press on button once you get button 10, twice 11 and so on. This only works fluidly when you have a motion sensor I the vicinity of your switch. Not a hue motion but one that is native ST.

Hue will reset cycle after 10 seconds back to 1.

Switch on and off should work.

Slow a nd fast dimmer should also work, but with a motion sensor for responsiveness.

App normally polls the Hue bridge every minute, with a motion sensor around it will poll every second 20 times or so.


(Martin Verbeek) #120

For this Hue labs setup, could you send me the output of the following command? It might indeed be the problem adding 4 instead of 3.
In your browser execute:

bridgeIP/api/username copied from bridge device/sensors