Integrate Tradfri Motion Sensor

Hi,
is there somebody to tell how the tradfri motion sensor can be used to detect motion?
Currently it shows only the battery level.
Thx in advance

1 Like

The motion sensors are linked to a bulb instead of the hub. Due to this configuration it HA cannot see the motion information.

Here is a hack to pull the info.

1 Like

Is the status of this still the same? I can only detect motion with the sensor if I couple it to a light first?

If you use the Tradfri gateway, yes. That is how Ikea designed it. If you use a universal zigbee coordinator (zigbee2mqtt, deconz, ZHA supported dongle) : No. It works fine without being coupled to a light.

1 Like

Thanks. I hope they are working to improve it. For example the Ikea power outlet works well as an independent unit, I wish the motion sensor was like that.

After pairing it to my cc2531 Tradfri motion sensor works perfectly here on MQTT/HA:

zigbee2mqtt:info 2020-02-27 16:39:08: MQTT publish: topic ‘zigbee2mqtt/0x680ae2fffe3a723a’, payload ‘{“occupancy”:true,“linkquality”:49,“requested_brightness_level”:76,“requested_brightness_percent”:30,“battery”:74}’

they work perfect with deconz. try to listen to events in dev tools. thats the way switches work with deconz

Hi, i have the latest version of the ikea motion sensor. If i connect the sensor within phoscon directly with a bulb it works fine. Also in the automation “wizard” within home assistant i see the trigger “started detecting motion” for this device. But it triggers nothing. Also when i listen to deconz_events the home assistant doesnt receive anything by the sensor. What am i doing wrong?

There’s a solution to use it without butchering a bulb or use deconz.
Just a normal CC2531 on Home Assistant, with zigbee2mqtt

Thanks for the info everyone here. I was pulling my hair out trying to set up the sensor because it should work the way we’d imagine and not have to be paired to a light or switch.

I’ll stop looking now and just put something together with esp home instead!

1 Like

Did anyone manage to use the luminance sensor in this Ikea Tradfri Motion Sensor?
I’ve got it set up to turn on/off the lights with a condition when the sun is below horizon, but I’d prefer to use the luminance sensor in the condition instead…

I have the Tradfri motion sensor E1745 and use a Sonoff (Itead) dongle which uses the CP2102N chipset plugged into my Pi running Hassio.
I am using Zigbee2mqtt and all my other devices were added very easily. The Tradfri was a pain to link up. Pressing the centre button 4 times to initiate the link would result in an initial detection followed 15 seconds later by an error “the device left the network” as if the Tradfri was only maintaining connection for a very short time and terminated before the full interview had completed.
I finally worked out a trick to keep the Tradfri alive long enough for pairing to complete - just randomly press the other buttons on the Tradfri during the linking process, and bingo - the device is now added and functioning as expected for motion detection although with the well known 3 minute re-detection period).
I do not know of any way to obtain a reading of luminance from this device. Zigbee2mqtt states the following data should be available:
battery (Remaining battery in %)
occupancy (“detected” or “clear”)
requested_brightness_level
requested_brightness_percent
Link quality (signal strength)
It states the requested_brightness_level as 254 and the requested_brightness_percent as 100.
It would be nice if the luminance was available but I have no idea if this can be accessed.

1 Like

These have to do with the button with a sun/moon pictogram, and is used in the IKEA ecosystem to determin when the lights should come on. I did not find a way to use it in HA.

1 Like

Yes I suspected that was the case. Oh well… at least I now have a working Zigbee PIR (which would NOT link up using my old CC2531 dongle with non upgraded firmware).
Now on to create some HA automations which put this to work.

Hi!
I’ve followed this topic and looking forward to see how to create a working automation?I have the motion sensor paired and use zigbee2mqqt and seems to work perfect. However the timer it’s supposed to trigger, never restarts if there’s motion all the time. The only way to make the timer restart is to leave without motion for 3 minutes or more. Any suggestions?

Is that not the wanted behavior?

The wanted behavior is when motion is detected, the timer should restart. (when state of timer is finished, then that triggers to shut off lights).
Situation right now: the timer has to end before its possible to restart timer again by motion.

Then start your timer on the mqtt message:

- id: ec3fdb71-476b-4b5e-9922-8e85e6aa34f0
  alias: 
  description: ''
  trigger:
  - platform: mqtt
    topic: zigbee2mqtt/ikeapirboven
  condition:
  - condition: template
    value_template: '{{ trigger.payload_json.occupancy == true }}'

To anyone with Home assistant cloud and Ikea running in its native gateway i’ve managed to “Botch” getting the motion sensor in Home Assistant without having to switch to zwave or hack hardware (Both are still good options for privacy reasons). It does require the Ikea gateway to also be connected to Alexa via the Alexa Ikea Skill.

What’s interesting is that Alexa is able to intercept the Ikea Motion detection via the Ikea Gateway, whereas Home Assistant does not. I don’t know the underpinnings of how the Ikea skill works (But maybe someone could fill in). Apologies if this has been posted before, I didnt see it when I was researching why the motion sensor. Also my first time posting so please be gentle :D!

The botch requires uses a Toggle Helper in Home Assistant that is then exposed to Alexa. Once this is available in Alexa you can configure a routine to toggle the Home Assistant helper when motion is detected on the ikea sensor. I’ve put together a rough guide below.

This guide assumes you’ve got:

  • Homeassistant Cloud enabled
  • Alexa configured through Settings > Home Assistant Cloud.
  • Ikea Alexa Skill enabled and devices visable in home assistant.

In Home assistant:

  1. Create a “Toggle” helper through: Settings > Devices & Services > Helpers (tab) > Add Helper > Toggle

  2. Expose this sensor to Alexa by going to Settings > Home Assistant Cloud > Alexa - Manage Entites

  3. Wait for it to appear in Alexa (Should be pretty quick)

In the Alexa app:

  1. Create a routine(More > Routines > +) with the following:
    When: IKEA MotionSesnor detects Motion
    Any Time

Action: Helper Name - Power On
Action: Wait 2 mins (adjust to suit your needs)
Action: Helper Name - Power Off

  1. Save and you should start seeing motion events in your Helpers in Home Assistant

Note: The motion sensors on my instance populated with a number. If this happens and youre not sure which one is which just create the above with the number and add the helper to your dashboard, you can then work out which sensor is which.