IKEA motion sensor

Same as the last one which means it sends a on/off Zigbee command to a group it is joined to and therefor not supported and impossible to write a custom driver for currently.

Join it to a SmartThings hub and use HubConnect or join it to deConz with a Conbee stick and then use Kevin’s MQTT solution are your only options at the moment.

But I agree despite IKEAs failure to follow the Zigbee standard here it would be really nice to have these joined directly to HE!

Here is the smartthings device type, i tried to see if i could ge tit to towrok in HE but all it would report is the battery percent

1 Like

This has been mentioned in a few places, but I'm not sure if this thread is one of them: the Ikea motion sensor works via TouchLink to one or more bulbs (ideally set up on Ikea's system but it can be done without their app/gateway, too). It does group broadcasting only, and Hubitat does not support this on the inbound side (i.e., to the hub). It was a pretty recent addition to ST, presumably to accommodate odd devices like Ikea's that tend to do this. It is unlikely Hubitat will add support for this, and most devices don't do this.

If you see a line like addHubToGroup(Integer groupAddr) in the ST DTH as you do on line 156 in this DTH, it's probably bad news for Hubitat. :slight_smile:

3 Likes

Would they if enough of their customers wants it?

I would say that is unlikely given the few devices that require this and the fact that most new ones shouldn't. Here's a post from a different thread about a different device but one with similar requirements:

Ok, way to listen to customers, might need a PR team lol

It's not a "never" necessarily--they are simply prioritizing other things over the few quirky Ikea devices that exist. Here is is some more reading, and you can find probably even more with additional searching:

I agree, things need priority, just the way it was said, hence the PR team joke

I'm pretty sure that Ikea's devices meet the Zigbee specs. They seem to be one of the few manufacturers that have their devices retested when they make a firmware change.

I think these devices are primarily meant for direct control. That being said when you want something more and switch to Hubitat you might want to use them in rules. And they are available worldwide. I think since Hubitat's competitors support it (Smartthings, Deconz, Home Assistant) it would be nice to see support. I have Zigbee2MQTT setup as a test. I might just start moving over to Home Assistant. It will be interesting to see how the market evolves as Home Assistant and other open source options evolve (and maybe Smartthings get things together, not counting on that one).

1 Like

Yes, direct via touchlink.

Many of them do not play well when joined to a coordinator, in that situation a device should be sending it's command frames to the coordinator, not multicasting them to the entire network...

1 Like

I was able to use touchlink to pair an Ikea Motion Sensor and an Ikea Bulb to the Hue Bridge.
Afterwards I paired them together and both the bridge and the sensor worked.
I have my Hubitat monitoring the bulb on the Hue, and use it to trigger further rules.
I'll have to live with the extra latency do to the bridge to bridge communication.

3 Likes

I am not sure if the integration of Ikea Tradfri Motion Sensor with Hubitat is still an issue or not. I wrote a simple driver (based on code from others) to use the sensor to turn my lights off when inactive for a period of time. No Ikea hub is needed.

code is here:

2 Likes

I was very excited to see a custom driver code for the Ikea Tradfri Motion Sensor. Unfortunately, when the sensor is paired to HE, I am only seeing reporting of Battery Level, no motion attribute in Current States nor Events being reported based on motion or no motion. Am I missing something here?

Did you Add the device in HE first as a generic zigbee "Device" by starting zigbee pairing, finding the device, and adding it? If so, you would then go back to the device added and change it's type to "User" Ikea Tradfri Motion Sensor device driver and look at the log file after saving it. you can also turn debug on to see if any messages show up in the log

Can you share what are your TRADFRI motion sensor details?
Mine are :

  • endpointId: 01
  • application: 20
  • inClusters: 0000,0001,0003,0009,0020,1000,FC7C
  • manufacturer: IKEA of Sweden
  • model: TRADFRI motion sensor
  • outClusters: 0003,0004,0006,0008,0019,1000
  • softwareBuild: 2.0.022

And, of course, it doesn't work in Hubitat , because these sensors use ZIgbee Group messaging to bind directly to a switch or a bulb, etc... Hubitat filters out these and nothing (except a battery reports) are normally received.

If your motion sensor is working (by receiving the standard ZCL On/Off event), you have probably done something additionally... direct pairing to a nearby ZIgbee bulb? Or your motion sensor firmware is newer?

Thank you both for replying. Addressing BMX4605’s reply first. Yes, as you outlined the sensor was added to HE and defaults to Device without issue, I changed the Device Type to custom Device Type, Ikea Tradfri Motion Sensor but the problem persists. After your reply I tried to troubleshoot the issue and I fear there may be a deeper problem to this that isn’t your Drivers Code. I have tried troubleshooting the issue;

To test whether it’s a problem with the sensor, I removed the sensor from HE and re added the device a second time with the same results.

To test whether it’s a problem with this particular sensor, I added a second Tradfri Motion Sensor with the same results.

To test whether it’s a problem with the Device Type, I added a Virtual Device and changed the Device Type and both battery and motion appear in Current States.

To test whether it’s a temporary problem with HE I rebooted the hub.

I am at a loss now and not sure what else I can do to make this work. Like I said I don’t believe it to be an issue with your code. It reports battery but not motion. Perhaps you could suggest what steps I could take next.

In response to kkossev, thank you and yes I was also under the impression that Tradfri Motion Sensors would not report motion which is why I was excited to try BMX4605’s code.

I have attached logs and device info;



@kkossev, I am only interested for the motion and am not looking for any other information the device puts out and ignore any other message. So if your device puts out a "0401 0006" message , we are good. My device firmware is different however.

@user2485: Can you send a picture from the device type section as well? I commented the log message in the code to not display the detailed "parsed" messages. However, I am seeing it in your log.

image

1 Like

I think it is clear now - the IKEA motion sensor firmware version 24(hex) is working with HE, while the older firmware version 20(hex) does not.

Have you upgraded the firmware using another Zigbee coordinator ( Ikea hub, Z2M..), or you received the motion sensor with this firmware?

No, my device will occasionally send ZDO profile 0x0000 cluster 0x0006 messages, which are different than the Home Automation profile 0401 .

Thanks, I’m not entirely clear on what you are asking for here, is the information on the Device Type contained here?



I did not explicitly update the firmware, but could have been updated during the following integration tests I did:

  • I loaded it into an instance of Home Assistant I have and explored successfully to have it respond properly and publish a MQTT msg to HE and HE devices acting on the msg payload
  • I loaded it on an Ikea DIRIGERA hub to see how it behaves and whether or not it could be integrated in HE
  • I then adopted the device with the following drivers to see what the device does before I decided to write the code for it:
    • Added it as Device using zigbee adoption
    • Generic Zigbee Motion Sensor
    • Generic Zigbee Motion Sensor (no temp)
    • Ring Alarm Motion Sensor
    • Ring Alarm Motion Sensor G2

As far as various messages, I am only interested and trap for battery cluster 0x0001 and motion 0x0006 and by default ignore profile 0x0000 with any cluster, such as 0x0006 or 0x8021. I am however new in zigbee specification and therefore could be missing other clusters that I should be trapping.

1 Like