HowTo: Use Philips Hue sensors (Motion Sensor / Dimmer Switch)

Hi Dominik,

Which polling interval do you use in your setup?


  • The presence value is reported every 5 minutes, and when the motion sensor value changes (from motion to no motion or from no motion to motion);

Hi Christoph,

Good question: How to get known of it?

If you followed my instructions in the initial post you will probably use 5 seconds. You can find the value in this line of code


OK, got it.
Yes exactly 5 sec.
Should I decrease it?

If you want to have faster updates from the sensor, Yes.

1 Like

Fair warning The Hue binding now supports sensor integration. This tutorial is deprecated.


Is there any documentation on how to try this. I’m running openhab2.4 m7.

The new feature has been merged today. You will have to wait for the next snapshot or milestone build. A preview on the documentation.

1 Like

Thanks Christoph. I went a head and tried you test version.

Seems to be working very well on my self-up (22 lamps/ 5 motion sensor). I’ve only configured this manually through item/things files so I haven’t played with the auto side through paperui.

In terms of documentation I was more looking at changing poling settings etc. For example I believe the presence sensor update at 500ms intervals and I can see that. But what frequency do other other sensors update at e.g. temp/light? For instance if I switch on a light in front of the the sensor it does take some time to update (many seconds).

Thanks for the hard work here… working well.

Sounds good. I am happy to hear, that it is working.

Nice catch. Indeed it is not mentioned in the docs. Do you have time to add it? The polling interval for all sensors is by default 500ms (expected value in milliseconds, min. = 50ms). The polling interval for lights is by default 10s (expected value in seconds, min. = 1s). You are able to adjust both values for your needs like this:

Bridge hue:bridge:1 [ ipAddress="", userName="qwertzuiopasdfghjklyxcvbnm1234", pollingInterval=5, sensorPollingInterval=250 ]
1 Like

Thanks christoph!! Been waiting for this one!


I bought myself a Hue motion sensor, for the measurement of the ambiant light.
Unfortunatly Openhab is unable to find the sensor.

When I look on the Openhab Docs it states it is supported and this tutorial confirms this.

I am running OH2.3 Stable and updated the system through the openhabian-config tool.
Unfortunatly it didn’t help.
I’ve got the feeling the binding should be version 2.4 but is still 2.4, did the update fail or aren’t bindings updated until there is a new 2.4.0 stable version?

I found and testen a 0.10.0.jar version downloaded via a link somewhere in this thread.
But this is a test version, if I.m correct and doesn’t work with my version.

If I need version 2.4.0 binding, where can I find the update file and is it correct that it is just a drop of a .jar file into the addons folder?

Thank you for your help.


Hi Edwin,

The new feature will be part of OH 2.4 which will be released in a few days (December 17th). The linked version (.jar file) will not work with OH2.3. If you cannot wait any longer I recommend to update to a milestone or snapshot version.

This is a great thread that helped me to use my Hue sensors in openhab 2.3.

Now with openhab 2.4 the Hue sensors are supported by the Hue binding and sensors are auto-discovered.

Maybe this should be added to the start of the main post.


Hello Christoph, thank you for this awesome enhancement. :slightly_smiling_face: I’ve installed snapshot version yesterday.

Everything works great. I have two “Hue Motion Sensors” and one “Hue Dimmer Switch”.

Unfortunately there is a little error in Documentation


DateTime MotionSensorLastUpdate   { channel="hue:0107:motion-sensor:last_update" }

You missed a “d” in the word “last_updated”, so it should be:

DateTime MotionSensorLastUpdate   { channel="hue:0107:motion-sensor:last_updated" }

One hint for “Hue Dimmer Switch”:

I’ve created a transformation, with the following content:

1001=Button(ON) HOLD
2001=Button(DIM UP) HOLD
3001=Button(DIM DOWN) HOLD
4001=Button(OFF) HOLD

and the corresponding item looks like:

Number 		HueDimmerSwitchButton		"Hue Dimmer Switch Button pressed [MAP(]"	{ channel="hue:0820:xxxxxxxxxxxx:15:dimmer_switch" }

Now button state is “readable”.


1 Like

Thanks for the hint. I will take care of that.

Great map. Just in case: here you can find an example on how to use the dimmer_switch_event in a rule.

1 Like

I’m trying to get rid of the “.0” behind the events received from the Tap and Dimmer switches. (@cweitkamp: may I suggest to fix that in the binding? :smiley:)

This is my first attempt at using a profile to transform a value received, so I may have misinterpreted the OH2 documentation here.

The file content:

16=Button TopLeft
17=Button BottomLeft
34=Button TopRight
18=Button BottomRight

The Item with a transform profile:

String TS_Kitchen "Tap kitchen" (gKitchen) {channel="hue:0830:xxxxxxxxxxxx:tap_kitchen:tap_switch" [profile="transform:MAP", function="", sourceFormat="%.0f"]}

To be sure, I’ve also tried with sourceFormat="%d", but it always generates an error stating it cannot transform:

[al.profiles.MapTransformationProfile] - Could not transform state '16.0' with function '' and format '%.0f'

It looks like the map transform function is called before the source format function. Or… what am I missing here?

Yes, of course. Unfortunately this is part of OH2.4 stable thus it will be a breaking change.

Personally I would omit the “sourceFormat” in this case.

Indeed, it works without sourceFormat parameter and a transform of for instance ‘16.0=xxx’. It makes me wonder how sourceFormat is supposed to work, but that’s no topic for this Philips Hue sensors thread.

I get that, but I hope it can become part of 2.5 (and of course you could introduce a ‘legacy’ parameter if you want to go all fancy… :sunglasses:).