Hue binding with OpenHAB 4: motion sensors do not show state


I have setup OpenHAB 4 from scratch and installed and setup the hue binding. My hue lamps are working properly with the binding, i.e. can be switched on and off. However, the hue motion sensors are only showing the state “Undef”.

I have defined the motion sensors (I have 2 of them) as Things via the MainUI. They are both listed with Status “Online” in the UI. Then, I have added one switch Item to the channel “motion” for each of the things. These items both have immediaetely after creation gone to the status “undef” and remain there, regardless of motion. I would expected them to go to state “OFF” first and switch to “ON” if motion occurs. The only thing that shows up in the logs is
[INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘I_OG_Fl_Bewegung’ changed from NULL to UNDEF

Any idea what the problem might be?

Thanks, Torsten

Are you using the Hue API v2? If so the sensor thing has an “Advanced” channel called “motion-enabled” to which you must link a Switch item and switch it ON…

EDIT or in the Hue app go to Settings and turn on the sensor.

Thank you! That was hard to find: an advanced channel to turn on motion detection on a motion detector. After manuel enabling it is working now! I guess I need a script that turns it back on every time OpenHAB is restarted, right?

No. The enabled state is maintained in the hub. You can also see it (and change it) in the app.

EDIT: just for info of anyone else reading this: all new sensor devices come from the factory with the sensor disabled. (Applies to motion, temperature, light sensors).

1 Like