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

Tags: #<Tag:0x00007f0152297638> #<Tag:0x00007f0152297368>

(Christoph Weitkamp) #101

IMHO it is, but I do not think that it is related to the Hue binding itself. It is more or less related to the install / uninstall process of a binding.

(Remko Lems) #102

Uninstalled the Hue binding, cleared cache, unzipped and installed the latest test version 0.10.0 onto Milestone 6 of OpenHAB 2.4.0.

FWIW for now: Nothing happens at all. No clue or indication whatsoever of a new binding (addon) installed.

Note: I’ve got a handful of dimmer switches and 12 motion sensors (still expanding).

Sincerely thanks and appreciation for your contribution! :ok_hand::+1:

(Christoph Weitkamp) #103

Hi Remko,

Sry for my stupid question: I do not quite understand if it is working now or not. Did you get your sensor running with the new binding version?

(Remko Lems) #104

Sorry my mistake. No it is not working.

Is there a special log file or debug setting that I can turn on? I sincerely want to help out.

(Christoph Weitkamp) #105

Please enable DEBUG logging for the binding:


(Remko Lems) #106

I’m going to set up a separate DEBUG log file for this binding. Just have to figure out how exactly again…as it has been a long while ago since I’ve done this particular line of work…keep you posted.

But spitting through the various openhab.log(.n) files shows (the recurring WARN):

2018-11-25 02:45:11.743 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/openhab/addons/org.eclipse.smarthome.binding.hue-0.10.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.smarthome.binding.hue [253]
Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:=“optional”
Unresolved requirement: Import-Package: org.eclipse.smarthome.config.discovery.upnp

at org.eclipse.osgi.container.Module.start( ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start( ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle( [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles( [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess( [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process( [10:org.apache.felix.fileinstall:3.6.4]
at [10:org.apache.felix.fileinstall:3.6.4]

Either missing dependencies?

Sidenote: I do use the official openhab:2.4.0.M6-amd64-debian docker container with persistent storage on a Ubuntu 18.04 LTS server

(Christoph Weitkamp) #107

I saw this before. The framework sometimes does not install dependencies automatically when you put a binding into your addons folder.

First: You have to install the features esh-io-transport-upnp via Karaf console and then put the .jar file into your addons/ folder.

The correct command is

feature:install esh-io-transport-upnp

You can also install a different binding (e.g. Kodi) which needs this dependency too. This in turn installs the required service automatically.

(Remko Lems) #108

Ahhh … Will install the Kodi binding :+1:. Didn’t install it yet as I was thinkering with the various Hue configurations.

==>> It works! The Kodi binding/missing dependency was the key to solve it. Thank you Christoph!

(Dominik) #109


Question to the group. I run a hue motion sensor configured as describe ahead which triggers a shelly 1 via MQTT.

Unfortunately it takes up to 3 sec. till the shelly switch on the lights.

Does someone else have similar setup and encounter the same results?
Would be interesting to understand, as I then could focus on the key area of the problem.


(Christoph Weitkamp) #110

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);

(Dominik) #111

Hi Christoph,

Good question: How to get known of it?

(Christoph Weitkamp) #112

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


(Dominik) #113

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

(Christoph Weitkamp) #114

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

(Christoph Weitkamp) #115

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

(James) #116

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

(Christoph Weitkamp) #117

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

[Philips Hue] Register new dimmer switch as thing
(James) #118

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.

(Christoph Weitkamp) #119

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 ]

(Danny mullen) #120

Thanks christoph!! Been waiting for this one!