I’ve bought some #Ikea #Vallhorn motion sensors for 8€ a piece. (see info here)
Pairing to the #Zigbee network in #HomeAssistant and #Zigbee2MQTT was somehow difficult, which is not usual for Zigbee devices (at least according to my limited experiences with them). Nevertheless, I succeeded in pairing them.
Unsuccessful attempts
Firstly I tried to pair the sensor with ‘Permit All’ for several times. Pairing failed. I noticed the sensor wanted to connect to my #Aqara smart plug (SP-EUC01), not to the #Sonoff Zigbee stick (the coordinator). Somehow Aqara didn’t like it and rejected the initial Zigbee ‘interview’.
![zigbee2mqtt error message - couldn't pair](https://blog.rozman.info/wp-content/uploads/2024/01/Screenshot-2024-01-15-123559.png)
Successful attempt
After some tries finally the following method for pairing worked:
- Zigbee2MQTT: Permit Coordinator (forcing to join the Sonoff Zigbee Stick).
- Pressed the link button shortly 4 times (in 5 seconds). The red diode started to blink (fading) fast and then slowly.
- Placed the sensor a few (2) cm near the coordinator.
![Ikea Vallhorn motion sensor and Sonoff Zigbee coordinator](https://blog.rozman.info/wp-content/uploads/2024/01/image-6-576x1024.png)
The initial step (‘zigbee dialogue’) was completed successfully this time and I was able to add them to the dashboards, automations etc.
The sensor reports:
- Illuminance (in lux and numerical value)
- Motion
- Battery
- Firmware status and version
- Last seen, Link quality
![reported movement sensor values](https://blog.rozman.info/wp-content/uploads/2024/01/image-11-1024x509.png)
Overall, the design of the sensor looks nice and smooth. On the backside, it has 3 buttons:
- Link – for pairing
- Timer (1 – 5) – probably to notify connected lights when to turn off (after 1 or 5 minutes). Not sure if this function works or even makes sense in Home Assistant.
- Light mode – to notify connected lights when to turn on/off (always, only at night). Again, this function is probably useful if you have an Ikea gateway and lights and not in the Home Assistant
![Ikea Vallhorn with holder](https://blog.rozman.info/wp-content/uploads/2024/01/image-8-576x1024.png)
The package also includes a holder and a piece of double-sided tape. The manual doesn’t include much information.
Automations
Why I bought this motion sensor at all? The initial idea was to turn on the Home Assistant dashboard (FireHD tablet) when someone approaches the fridge with the tablet attached.
The automation is simple:
If a motion is detected, then send a notification (‘command_screen_on’) to the tablet (running the #HomeAssistant companion app):
![Home Assistant automation - turning on the screen](https://blog.rozman.info/wp-content/uploads/2024/01/image-9-1024x897.png)
The automation works ok-ish.
![Motion sensor log in Home Assistant](https://blog.rozman.info/wp-content/uploads/2024/01/image-10.png)
It detects motion and turns on the tablet, but the tablet screen turns off after a minute. I’ve noticed the sensor doesn’t send triggers every time it detects motion, only at the beginning of the motion and after the state is cleared (no motion detected). The states are:
Detected -> Cleared -> Detected -> Cleared … and so on
The effect: if someone is dancing in front of the sensor for several minutes, it will trigger only one time. Meanwhile, the associated automation will not be triggered again.
What I want (from the state perspective) is:
Detected -> Detected -> Detected -> …. Cleared -> Detected ….
I could prolong the screen on time, but that is not the best solution. I have to think about how to solve this issue. Maybe other types of motion sensors behave the way I want?
Ideas for other 2 motion sensors
Ok, this was the first motion sensor I put in use.
The second sensor I’ve put in my workshop to detect motion. I’d like to build a simple home alarm system. A few days ago I thought I heard someone opening doors and walking in my workshop. When I checked, nobody was there, but the unpleasant feeling stayed. So the purpose of the second sensor is to prove if I’m hallucinating and hearing voices or not 🙂
For the 3rd one, I don’t have an idea yet where to put it.
Update 1 (17. Jan 2024): Issues with false movement detection
The next day after installation I noticed ‘ghost movements’ at night:
![history graph of ghost movements detected](https://blog.rozman.info/wp-content/uploads/2024/01/image-12.png)
Too bad, it looked like a good sensor. False detections make it unusable.
The community also noticed this issue (1). Will try changing the batteries from 1.5V AAA to 1.2V AAA rechargeables.
Update:
I’ve changed the batteries to 1.2V rechargeable ones (Energizer from Kik). The result: no false movement was detected during the night:
![](https://blog.rozman.info/wp-content/uploads/2024/01/image-16.png)
I would never figured it out by myself. Thanks, HA community!
Update 2 (25. March 2024): Undervoltage sensitivity – false movement detected
What’s new: The sensor doesn’t like low voltage either. When the battery dropped under 40%, it showed movement as ‘detected’, even if no movement was present. See the history graph below.
![](https://blog.rozman.info/wp-content/uploads/2024/03/image-1024x215.png)
This corresponds approximately to this part on the battery % chart:
![](https://blog.rozman.info/wp-content/uploads/2024/03/image-1.png)
When I refilled the batteries, it worked normally again (no constant movement detection).
Update 3 (1. Aug. 2024): How long do rechargeable batteries last?
![chart - refillable batteries charge show charge drop over several months](https://blog.rozman.info/wp-content/uploads/2024/01/image-25.png)
Answer: rechargeable batteries in Vallhorn sensors last quite long, probably 10 months or a year. The last time I filled one of the batteries was in March ’24. Now it’s Aug. ’24 and after 5 months it still shows 63%. After the initial sharper drop (March-May) the charge drops slowly. Nevertheless, the sensors will start to behave strangely at 40% of the charge and then it is time to refill the batteries again. Will report next time (predicting: probably in Dec. ’24 or Jan. ’25).
Leave a Reply