Hack: IKEA Trådfri Motion Sensor for presence control

The IKEA Trådfri Motion Sensor and the corresponding IKEA Trådfri Gateway does not provide information on motion activities as such rather than the motion sensor turns on and off the paired lamps.

I need the IKEA Motion Sensor to notify HA on motion activities. This would allow me to:

  1. Steer events from HA
  2. Log motion activities

The IKEA Motion Sensor to trigger Trådfri lamps on/off. That task is relayed to HA.

To buy a GU10 400lm Trådfri lamp and hack it so I can use the hack as a motion notification device.


  1. IKEA Trådfri GU10 400lm
  2. LED
  3. 470Ω resistor
  4. optional: L73L33 voltage regulator.


  1. Pry off the lens cap

  2. Unscrew the LED plate

  3. Desolder the plate contacts

  4. Gently pry off the aluminum plate heat diffuser. It is glued.

  5. Gently pry out the circuit board. It is just snapped in. No cables, no solder nor glue.

  6. This is the circuit board:

At this point you can already hack the device:

The input voltage is 3.3 volts!


  1. You can solder out the Zigbee board and connect a LED that is to indicate if motion has been detected.

  2. You can print out a case and mount the board inside:
    (Case Trådfri Zigbee module (GU10 400lm))

Below you can see I have made use of a L78L33 voltage regulator that is to convert the USB 5V input onto 3.3V needed by the Zigbee board.

0. It is important to understand that the whole Trådfri system is to see this device (hack) as a lamp that is to turn on/off as the IKEA Motion Sensor dictates. The LED on the device (hack) is to indicate if the “lamp” is on or off.

  1. You have to pair the device (hack) to the IKEA Motion Sensor and to the IKEA Gateway. Follow the IKEA instructions.
  2. You should see a new Light in HA as this new GU10 we have just installed
  3. You can modify HA to look like this:

Now it is time to get the “light” component to act as a “binary sensor” component. Here you go the configuration to add to configuration.yaml:

  platform: template
      friendly_name: "Motion MD"
      entity_id: light.tradfri_bulb_gu10_w_400lm
      value_template: '{{ is_state("light.tradfri_bulb_gu10_w_400lm", "on") }}'
      device_class: motion


  1. I do not experience the reportedly lag some users are experiencing with the IKEA Trådfri Motion Sensor. My experience shows that the motion triggers the device immediately.
  2. The minimum time between two consecutive motions is 1 minute. This is set by the IKEA Trådfri Motion Sensor (back trimmer).
  3. Remember that it is the IKEA Trådfri Motion Sensor triggering the on/off sequence of the device. Obviously, this can be overridden by HA.

If you want to place the sensor in a corner, you can make use of this design of mine:
(IKEA Trådfri Motion Sensor corner holder)



and subsequently all automatisations I can do around it.

Happy hacking!

(BTW, I can share my HA configuration if needed)

UPDATE Sept-2019: I have decommissioned this solution in favour of CC2531 with zigbee2mqtt.


So the TL;DR is you hack an Ikea light to not be a light and use a paired motion sensor to turn that on/off; and have HA watch that to see if motion?

Has anyone decoded the motion to light protocol as perhaps those motion sensors could be interfaced directly somehow?

I love hacks like this, very inventive. However I would prefer to buy a working out of the box motion sensor :slight_smile:

Hi, thank you for this hack. It works really well.

But I added some other devices on my gateway and now the GU10 zigbee module is no more recognized.
I tried to reset it by shutting down the power (plug and unplug the wires from the GPIO connectors) four then six times but it’s still not working.

Does someone have an idea how to reset the zigbee module to make a new pairing?

Hi Romes, welcome to the HA community!

I have experienced similar behaviour with my device as well. These are the two recurrent ones:

  1. The device runs out of battery for some days and so it seems it loses the configuration.
  2. HA stops attending to the device although the IKEA app on the phone does.

For the first case, I have to reset the motion sensor device and repair it again to the hacked-gu10 bulb and to the gateway. This is quite inconvenient because it requires reprogramming HA since the name of the motion sensor is to change. About how to reset it, you can find the instructions manual on the IKEA webpage.

For the second case, I have to restart HA.

These are the versions (firmware) I’m running on:
IKEA Gateway: 1.4.15
IKEA Motion Sensor: 1.2.214
IKEA Hacked-GU10 bulb: 1.2.214
HA: 0.78.3 (yes, very antique!)

I hope it helps!

Thanks for this tutorial. I landed here because I bought one of these cheap ikea sensors and find it very stupid. It always overrides whatever setting you apply from the app. So if you turn on the lamp it will stay switched on. But as soon as you pass the sensor it will override the lamp and switch it off after three minutes. Not very practical!

So two questions.

  1. I guess it is not necessary to actually hack the lamp? To try it out I could use any compatible bulb, right?

  2. Could you share you CC2531 solution?


Very interesting…

That’s correct. The reason I hacked the lamp is because I wanted to have a “small” device in my home IT equipment cabinet and not a lamp switching on/off.

The whole solution? It went quite straight forward by just following the instructions in Home Assistant and zigbee2mqtt sites in other words, there is no real added value in publishing my solution because I would just copy&paste what is on those sites/pages.

Thanks. In the meantime I made my own small project inspired by your post. Using node.js and without HA.

I have found that using this approach you can actually control the lamps with an old-school light sensor. We already have an outdoor light sensor that turns an outdoor lamp on and off. Now by adding a Hue bulb (I use a mix of Hue and Trådfri) in the outdoor lamp, my Pi script can monitor the reachable state of the lamp. It is unreachable most of the time, but when the old sensor turns it on, it becomes reachable. I then use the script to control two more lamps. Thus, an old analog sensor controls 3 Hue/Trådfri lamps without any wireless sensor!

I have one question. How often does HA monitor the on state of the hacked lamp? I use three seconds as this delay is no problem, but I wonder how often you can ping the gateway/bridge without problems.

Actually used this approach to steer a Nexa in-wall switch (433MHz) vía rfxcom.

I’m not sure I follow you. To my understanding, rules are state driven that is, switch states are not monitored but when it changes it triggers a rule. On the other hand you may have, for instance a thermometer. If you create a rule to trigger something at certain temperature then this rule is to be triggered every time a new temperature value is received. That’s my understanding.

In a few words, how does CC2531 with zigbee2mqtt work? Can you make it respond to any zigbee remote control or dimmer (eg. Hue and IKEA), and can you see which remote made the request? In other words, does it work as a kind of bridge or gateway so that you can respond to the zigbee commands you grabbed and turn the lights on and off etc?

take a look at this: https://www.zigbee2mqtt.io/information/supported_devices.html
If the device is listed then it can be paired with CC2531. Then you read the state in HA and take actions.

1 Like

I have a CC2531, and a Tradfri motion sensor.
What I did to notify HA on motion activities is this:

Pressing the pair button (in the middle) 4 times in a row. The red light on the front side should flash a few times and the turn off. After a few seconds it turns back on and pulsate. When connected, the light turns off.

I’ve got the Tradfri as “unsupported” in the zigbee2mqtt map… Partial success so far

After that I followed this:

  1. Forced the device removal
  2. Stopped zigbee2mqtt on hass.io
  3. Removed the coordinator usb pen from the raspberry pi
  4. Reattached the coordinator
  5. Restarted zigbee2mqtt
  6. Re-paired the E1743 again

And now it works!


I have connected my ikea motion sensors with zigbee2mqtt instead of using the ikea hub, and I can use the motion sensor standalone in HA. Why all this hard work?


I guess because at that time (2018) this motion sensor was not supported on zigbee2mqtt


I’m using the Tradfri with the DeCONZ Raspbee Gateway. For anyone trying to do this, there is no hacking required anymore =)

1 Like

The hacking is more fun! Lol. I bought 3 Tradfri motion sensors, 1 gateway and 3 GU10 bulbs. The GU10 bulbs are super easy to extract the zigbee module, add a 3.3V DC-DC module and voila…cheap motion sensors. Thanks for this awesome hack!

Post your automatin please ? :slight_smile:

The sensor is connected in HA thru zigbee2mqtt but the sensor state stays at N/A
No movement is detected… I can see the battery level. What am I doing wrong?

1 Like

I like the idea!
Here my solution without soldering: I used the script in the example and added the virtual motion detector. When it detects motion, I immediately turn off the light. In my case I wanted the light on in the evening, so I added a condition that it only turns it off when the sun is set.