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


(Martin Verbeek) #1

I could not resist it, I acquired a Hue motion sensor and a dimmer switch, already had some TAP´s. I wanted to put the house in night mode when the TAP was pressed late in the evening, so the TAP had to be visible in ST as a device.

The problem with the Hue API is that it does not provide events to the outside world. So it had to be a poll implementation, not a good idea to have the hue bridge polled every second (well the Hue bridge might not be bothered) but the ST cloud will be. But polling faster for a shorter period of time might deliver a more responsive Hue Sensor for ST, as i had ST motion sensors in lots of places I got the idea that the probability of someone pressing a button on a hue sensor is higher when there is motion going on in it´s neighbourhood.

So it has two parallel modes of operation:

  1. It schedules a poll event to the Hue Sensors every minute.

  2. If you have ST motion sensors or any other motion sensors (not the hue motion sensor :slight_smile: ) that are defined in ST it will schedule a number of poll events when motion starts. In the smartapp you can assign an ST motion sensor to the discovered Hue Sensor. These scheduled polls will pick up a change on the related sensor quicker. At least that is the intention. After the series of polls it will stop and wait for a next motion event.

The smartapp is only tested with bridges that are discovered by Super Lan Connect. It supports multiple bridges. When the bridges are discovered it will ask for the Username that is used to make the API calls. The app provides you with a button that brings you to the device definition in the IDE where you have to copy the username from the user data section. When you paste the username in the app it should discover the sensors that are on that bridge(s).

In version 1.01 it now also supports bridges that were created with custom apps that provide the username for the API as an attribute and have the capability bridge e.g. Hue B Smart. The username will then be filled in by default.

In version 1.02 it is now possible to have elevated Hue Bridge polling (10 seconds) during selected modes as opposed to normal 1 minute polls. Also you can select to not poll at all during selected modes (holidays, away etc…). If you select same mode in poll/no poll NO poll is selected.

From version 1.14 on, a buttonpress event will lead to a small burst of polls on the switch, to have more responsive button presses.

in version 1.15 it is now possible to add and control Hue Rooms (groups), the generic device domoticzOnOff is needed for that. Only groups that are defined with the room attribute are added to keep this as clean as possible.

The motion sensor also provides illuminance in lux and temperature.
The Tap is basically a button device
The Dimmer Switch is switch and a button device (long presses are recognized, but no clue if you can use them in ST).

To manage expectations, the devices are used to show status and create events that one can use in ST automations, the HUE API does not allow to change the status, e.g. push a button and modify the status from ST in the bridge.

If any problems or wishes, please post, if not too difficult…it gets fixed or implemented.

add verbem smartthingspublic master github to the definitions and look for

Hue Sensor (Connect) in the apps, this app will create the devices and is mandatory
Hue Tap, Hue Switch, Hue Motion in the DTH

Hue Sensor (Connect)
Hue Motion
Hue Switch
Hue Tap


Have fun, Martin

[ALPHA] Hue Dimmer Switch (ZHA) (beta) (no hue bridge)
ST and hue switch
Zigbee Wall Switch and Dimmer Models (May 2018)
Trigger Harmony Actions with Hue Tap Buttons
Help With Philips Hue In Cross Platform (SmartThings / HomeKit) Environment
FAQ: How Can I Use a Philips Hue Dimmer Switch with Hue Bulbs Already Controlled By SmartThings?
(Hendre) #2

Hi Martin
Is my understanding correct that this enables us to use any Hue Tap / Motion Sensor and Dimmer Switch connected to the Hue Bridge, in Smartthings? And these will show up as devices in ST?
That is fantastic! I have often wished for this, as I have about 6 TAPs lying around which I don’t use much anymore.

What does this mean? Is that the normal procedure ST use when discovering Hue Lights? In other words, your apps can’t be used if the Hue Lights are linked to ST via an app like Hue B Smart?
I get an error when I attempt to add your repo to ST Smart Apps:

(Martin Verbeek) #3

It is only tested with Super Lan Discovered bridges. If Hue B Smart bridge devices are disclosing the username they use to call the API Hue bridges in the data you should be able to use them as well. Just plug in the username in the app where requested.

Are you getting this Github message in the IDE? the links seem to work…

(Hendre) #4

I’m not currently using the Hue B Smart app.

I managed to add your Smart App and I associated ST sensors.

The devices were added to my ST Things list.

What I’ve not been able to determine, is how to use the Dimmer switch e.g. It shows up as a Dimmer with only an “On/Off” option?

The same with the TAP - how does one distinguish between the 4 buttons?

(Martin Verbeek) #5

I see that i need to update the description to set the right expectations, the Hue API is not allowing for external modifications to this type of devices. So you will be able to see what happens and react to it in ST with automation, which was my needed case, you cannot “push” the buttons in ST, the API simply will not allow that.

(Hendre) #6

Thanks. At least, for the motion sensors this is great, since the Hue motion sensors can now be used in webCore without adding them to the ST hub.
Come to think of it, for the switches and the dimmers this is normal behaviour for that type of device, is it not? If I understand correctly, one will still be able to run a piston when the Dimmer or a button of a TAP is pressed e.g.

(Martin Verbeek) #7

Yes, that should work, i use TAP button press myself to put all in Night/Alarm mode.

(Hendre) #8

Not sure if I’m mistaken, but the TAP’s don’t show up in the webCoRE list under switches. (Don’t think it makes much difference at the moment, as they do show under Actuators and can be added there).

(Martin Verbeek) #9

not using core myself, TAP is a button device, if Core supports buttonpress you should be able to automate, not a switch currently, but will take a look at it. Thanks for the feedback, much appreciated!

(Martin Verbeek) #10

Was it easy enough to install and configure? Anything needed to be changed?

(Martin Verbeek) #11

I could not test this myself, but it should work.

(Hendre) #12

Very easy and intuitive.
I’m currently on vacation and can’t check the operation of devices, but I’ve tried the devices in a webCore piston. For the Tap, it shows 4 buttons (as it should) in webCore, but the dimmer creates the impression that it has 32 buttons.
At first, that appears to be incorrect, but it could be because the buttons respond to a second and a long press, which is treated as different buttons.

(Jordon) #13

I love this!! I have been looking for a way to integrate this without neeting a rasp pi or arduino and this is prefect.
I was wondering though if there was a way to pull the device status more often. Just to try and get a little faster reaponse.

Hue Dimmer Switch Connected to ST
(Martin Verbeek) #14

It depends in what mode… when motion is detected or in normal mode? I want to be careful not to create too many events that need to be serviced by the ST cloud, hence the more elevated polling during motion.

see version 1.02.

(Daniel Consuegra) #15

Dumb question… I first have to pair the devices (motion, dimmer) to the Hue hub… right?

(Martin Verbeek) #16

Yep, in the normal Hue way :slight_smile:

(Daniel Consuegra) #17

Thanks… Thought so… can’t wait for Amazon to ship the new devices!

(Daniel Consuegra) #18

Yay! Got the dimmer connected! Thanks Martin!

Now… if only I knew how to modify the buttons’ behaviour…

If I wanted to have a morning mode, relax mode, reading mode and party mode (with the lights changing colours)… how would you do it?

(Hendre) #19

I would suggest you use an app like webCoRE to setup your scene and use the Hue Tap / Dimmer Switch to activate the scene.

Or any other smart app for that matter. Set up your scene and use the Hue device as the trigger.

(Hendre) #20

Tried again to add this for github integration, but still no luck - getting the same error in the IDE.