IKEA Vallhorn Motion Sensor

Since I have the Vallhorn I decided to look into that and actually even implemented it for the most part, TL;DR being it’s not worth it since it would be all fake.

The Vallhorn physical buttons are useful for lights using Zigbee bindings (not automations or hubs) because they set if the sensor will directly turn the lights always or only in the dark as well as for how long keep them on after movement is detected.

Turns out there is no “state”, for that they use the OnWithTimedOff command, which is telling the light “turn on and, in 5 minutes, turn off”. Whenever there’s motion, the sensor sends the command again to the light so the timer resets to 5 minutes again. Zigbee lights keep a internal timer so, if the timer has not been reset by the 5 minutes, they turn off by themselves.

Implementing that in the driver is completely pointless since the driver would have to launch a internal timer and reset it every time the OnWithTimedOff is received - like the driver for the old Tradfi motion sensor had to do to fake the motion / no motion state. The Vallhorn already communicates the motion detected / not detected events so there’s no need for that workaround.

As Mariano already pointed out, creating a routine like “if no motion detected in 5 minutes” is way better since you can write the time you want and technically it’s actually the same since the driver would have to fake a timer like if the hub was a light. And for the day/night switch, you already have illuminance data which is better than whatever hardcoded condition is inside the Vallhorn.

2 Likes