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

Tags: #<Tag:0x00007f014b4ae720> #<Tag:0x00007f014b4ae360>

(Kai Kreuzer) #81

Err, just out of curiosity: How did you manage to get that commit into the ESH repo…?

(Christoph Weitkamp) #82

Hm… interesting. I will PM you.

(Graham Couch) #83

Hi @cweitkamp

Appears to be working ok so far. Tested adding Things/Items via Paper UI and manually via my Things/Items file and both ways were fine and data is being reported back.

Will monitor it over the weekend.

(Christoph Weitkamp) #84

Nice. May I ask you to watch for the performance / load of your CPU beside the new features? The default polling interval is high (500ms) to havr a reliable motion detection.

(Graham Couch) #85

Will do. Any particular command etc you want me to use?

(Bob Miles) #86

Dear Christoph,

wow, that was quick! I’m really looking forward to use your latest additions.
I have no IDE set up yet and I’m on stable 2.3, so I guess I can’t use it yet, but I’ll see to that when I have a bit more time at hand.

(Christoph Weitkamp) #87

No, nothing special.

Yes, that is right. You need at least OH2.4.M5 milestone.

(Graham Couch) #88

No issues to report so far.

(Miika Jukka) #89

Dropping this into my addons folder doesn’t trigger anything visible. It just won’t start or even resolve the binding. Karaf console shows nothing related to hue binding.

What I’ve tried is:

  • Remove the current snapshot hue binding installed through paperui->addons
  • Copy test version to addons folder
  • Restart oh multiple times with and without cleaning cache
  • Updated oh to latest snapshot build #1422

One weirdness that I observed was when I removed or installed the current version few other bindings got restarted. Those bindings were astro, network and systeminfo bindings. Also dashboard and all uis got restarted.

Next I tried to revert back and install current snapshot. It worked just fine and it discovered my hue bridge.

So my question is: How to properly debug this?

(Christoph Weitkamp) #90

Which OS do you use?

Did you install the openhab-addons package?

Did you try to clear the cache?

(Miika Jukka) #91

OS is Debian 9 and I have cleaned the cache.

Have not installed openhab-addons. What does it exactly contain? Is it something that is needed when manually installing bindings?

(Christoph Weitkamp) #92

It contains all add-ons. No, I guess you do not want it.

When you choose to install an add-on, openHAB will download it from the internet on request. If you plan on disconnecting your machine from the internet, then you will want to also install the add-ons package (See

Is it possible for you to provide me a DEBUG log? Thanks.

(Miika Jukka) #93

Please specify from where do you want debug logs? org.eclipse.smarthome.binding.hue maybe?

(Christoph Weitkamp) #94

Yes, exactly.

(Miika Jukka) #95

There’s nothing in the logs. Not even complaints about missing requirements. Nothing.

(Miika Jukka) #96

Stupidest mistake in a long time. Didn’t unzip the package but just removed .zip extension by renaming. :stuck_out_tongue_winking_eye:
(Latest test bindings I’ve used used this technic for uploading bindings. Was it so that github doesn’t accept .jar files?)

Edit #1
After some testing all seems to work. Configured everything using .thing file.

What is the function of “sensor status” under bindigns configuration parameters? Is it really a indicator and if so, shouldn’t it be as own channel? Or can you somehow turn the sensor off this way? Seems a bit weird when also dimmer switch has this option.

(Christoph Weitkamp) #97

Okay, I am glad you got it working.

The answer is:

Name Type Description
on bool Turns the sensor on/off. When off, state changes of the sensor are not reflected in the sensor resource. Default is “true”

You can activate and deactivate a sensor via this configuration. Currently this feature is not working in the provided test version.

(Heiko Fanieng) #98

Great Work Christoph,

on openHAB 2.4.0 Build #1421 running with openHABian on a PI and after deactivating the Hue Binding in PaperUI and restarting OH with your test-binding in the addon-folder my 5 Hue-Sensors works as expected :+1:

Would be very awesome to have everything that still works in Apple’s HomeKit also works in EclipseSmartHome and/or openHAB!


(Christoph Weitkamp) #99

Of course. As I am no Apple user I am afraid you have to help me in this case. Which features do you mean?

(Miika Jukka) #100

See my earlier post:

Now theres this recent post describing similar behaviour. UIs starting and stopping when you install or remove the hue binding? Anyhow for me the hue binding has worked properly all the time. I’m running Zulu java if it matters. Is this something to dig deeper?