tomi,

I’ve bought some #Ikea motion sensors for 8€ a piece.

Pairing to the network in Home Assistant and 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 smart plug (SP-EUC01), not to the Zigbee stick (the coordinator). Somehow Aqara didn’t like it and rejected the initial Zigbee ‘interview’.

zigbee2mqtt error message - couldn't pairSuccessful attempt

After some tries finally the following method for pairing worked:

  1. Zigbee2MQTT: Permit Coordinator (forcing to join the Sonoff Zigbee Stick).
  2. Pressed the link button shortly 4 times (in 5 seconds). The red diode started to blink (fading) fast and then slowly.
  3. Placed the sensor a few (2) cm near the coordinator.

Ikea Vallhorn motion sensor and Sonoff Zigbee coordinatorThe initial step (‘zigbee dialogue’) was completed successfully this time and I was able to add them to the dashboards, automations etc.

Overall, the design of the sensor looks nice and smooth. On the backside, it has 3 buttons:

  1. Link – for pairing
  2. 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.
  3. 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 holderThe 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 screenThe automation works ok-ish.

Motion sensor log in Home AssistantIt 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.

https://blog.rozman.info/detecting-movement-in-home-assistant-using-ikea-vallhorn-sensor/

image/png
image/png

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • anitta
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • megavids
  • JUstTest
  • All magazines