Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IKEA Trådfri motion sensor detection #1676

Closed
kabal00 opened this issue Jul 13, 2019 · 99 comments

Comments

@kabal00
Copy link

@kabal00 kabal00 commented Jul 13, 2019

Hi all,

I have a strange behavior of my IKEA Trådfri motion sensor which has been perfectly synchronized with the deConz software (installed on raspberry pi 3B+). But after a motion has been detected all of my bulbs within deconz will be shown as triggered (ON), but they are definitely OFF. The bulbs are from OSRAM and IKEA and I am using Homebridge which works great, except this issue.

Does anybody know what I need to do?

Thanks in advance

@Cybersmurfen

This comment has been minimized.

Copy link

@Cybersmurfen Cybersmurfen commented Jul 14, 2019

I got the same behaviour. All lights shows on when a motion is detected.

It is the new waterproof detector - FW: 2.0.022 - the old detectors runs FW: 1.2.214

@Cybersmurfen

This comment has been minimized.

Copy link

@Cybersmurfen Cybersmurfen commented Jul 14, 2019

Well. I deleted the Trådfri sensor from deconz. If I don't reset the sensor it will keep triggering all lights.

@avakarev

This comment has been minimized.

Copy link

@avakarev avakarev commented Jul 14, 2019

I have issues with new model of motion control too.
The old model E1525 (2017) is fine
The new model E1745 (2019, IP44) cause deconz to report bulbs are on while they are off. Also deconz doesn't report motion events following the first "presense: true" till "presense: false".

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Jul 14, 2019

Maybe the new model sends different ZigBee commands/command parameters? It’s definitely different hardware, no dials, no duration setting, but a 30% vs 100% brightness setting. Do you have the sensor on Day or on Night setting?

@avakarev

This comment has been minimized.

Copy link

@avakarev avakarev commented Jul 15, 2019

@ebaauw Hard to say if it's on Day or on Night, there is no indicator anymore on the back. Now there is just a toggliing button, and I think it's supposed to be indicated by gateway/app what's the current settings (and it doesn't indicate it for a moment). In my case, it's set by default, I didn't modify it. The older E1525 has default mode is set to "on Day". Here is how back side looks of E1745 now:
e1745

@avakarev

This comment has been minimized.

Copy link

@avakarev avakarev commented Jul 15, 2019

@ebaauw This is how response of GET /sensors/<id> looks like:

{ config:
      { alert: 'none',
        battery: 87,
        delay: 180,
        duration: 60,
        on: true,
        reachable: true },
     ep: 1,
     etag: '32101bc3e3b2992cb8f7efd5e68cb04d',
     manufacturername: 'IKEA of Sweden',
     modelid: 'TRADFRI motion sensor',
     name: 'Bathroom Motion Sensor R',
     state:
      { dark: true,
        lastupdated: '2019-07-14T21:08:45',
        presence: false },
     swversion: '2.0.022',
     type: 'ZHAPresence',
     uniqueid: '14:b4:57:ff:fe:52:3c:3a-01-0006' }
@Cybersmurfen

This comment has been minimized.

Copy link

@Cybersmurfen Cybersmurfen commented Jul 15, 2019

@avakarev - if you push the toggle button once, the sensor shows if it is day or night with a small red indicator just next to the button. If you push it again it changes mode.

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Jul 15, 2019

Hard to say if it's on Day or on Night, there is no indicator anymore on the back. Now there is just a toggliing button

The IKEA "manual" seems to suggest there's a LED that lights up. Maybe I'm too optimistic reading it.

This is how response of GET /sensors/ looks like:

Thanks. Some observations:

  • Unsurprisingly, it has the same manufacturer name and model (or the REST API plugin wouldn't have exposed it already).
  • config.delay is consistent with the fixed duration of 3 minutes from the manual.
  • What really worries me is the lack of a config.group, suggesting the sensor hasn't been bound to one. The old model would select a random group on reset and send groupcast commands by default, but apparently this model sends a broadcast by default (which causes deCONZ to mark all lights as on). But somehow the lights themselves don't turn on...
  • state.dark is true which means that either:
    • The sensor is on Day mode;
    • The sensor is on Night mode, and it's actually dark enough to turn on the lights.

Can you try the following:

  • In the GUI, bind the client OnOff cluster of the motion sensor to a group. Trigger the motion sensor and check that config.group is created.
  • Run deCONZ with --dbg-aps=2 and observe the logfile for something like:
    Jul 15 12:09:00 pi1 deCONZ[1121]: 12:09:00:346 APS-DATA.indication srcAddr: 0xe9b9, srcEp: 0x01 dstAddrMode: 1, profile: 0x0104, cluster: 0x0006, lqi: 255, rssi: -55
    Jul 15 12:09:00 pi1 deCONZ[1121]: 12:09:00:346 	asdu: 0162420058020000
    Jul 15 12:09:00 pi1 deCONZ[1121]: 12:09:00:347 button 1002 On with timed off
    
    The asdu means the following:
    0162420058020000
        | | |   + 0x0000: _Off Wait Time_: 0.0s
        | | + 0x0258: _Timed Off_: 60.0s (i.e. `state.delay` ==> 60)
        | + 00: _Accept only when on_ is not set (i.e. `state.dark` ==> `true`)
        + command: 0x42: _On With Timed Off_
    
  • Add a light to the group, and see if the motion sensor will control it. Even if the light won't turn on, the REST API plugin should only mark the light(s) in the group as on, instead of all lights.
@tubalainen

This comment has been minimized.

Copy link

@tubalainen tubalainen commented Jul 17, 2019

Hard to say if it's on Day or on Night, there is no indicator anymore on the back. Now there is just a toggliing button

The IKEA "manual" seems to suggest there's a LED that lights up. Maybe I'm too optimistic reading it.

This is how response of GET /sensors/ looks like:

Thanks. Some observations:

  • Unsurprisingly, it has the same manufacturer name and model (or the REST API plugin wouldn't have exposed it already).

  • config.delay is consistent with the fixed duration of 3 minutes from the manual.

  • What really worries me is the lack of a config.group, suggesting the sensor hasn't been bound to one. The old model would select a random group on reset and send groupcast commands by default, but apparently this model sends a broadcast by default (which causes deCONZ to mark all lights as on). But somehow the lights themselves don't turn on...

  • state.dark is true which means that either:

    • The sensor is on Day mode;
    • The sensor is on Night mode, and it's actually dark enough to turn on the lights.

Can you try the following:

  • In the GUI, bind the client OnOff cluster of the motion sensor to a group. Trigger the motion sensor and check that config.group is created.

  • Run deCONZ with --dbg-aps=2 and observe the logfile for something like:

    Jul 15 12:09:00 pi1 deCONZ[1121]: 12:09:00:346 APS-DATA.indication srcAddr: 0xe9b9, srcEp: 0x01 dstAddrMode: 1, profile: 0x0104, cluster: 0x0006, lqi: 255, rssi: -55
    Jul 15 12:09:00 pi1 deCONZ[1121]: 12:09:00:346 	asdu: 0162420058020000
    Jul 15 12:09:00 pi1 deCONZ[1121]: 12:09:00:347 button 1002 On with timed off
    

    The asdu means the following:

    0162420058020000
        | | |   + 0x0000: _Off Wait Time_: 0.0s
        | | + 0x0258: _Timed Off_: 60.0s (i.e. `state.delay` ==> 60)
        | + 00: _Accept only when on_ is not set (i.e. `state.dark` ==> `true`)
        + command: 0x42: _On With Timed Off_
    
  • Add a light to the group, and see if the motion sensor will control it. Even if the light won't turn on, the REST API plugin should only mark the light(s) in the group as on, instead of all lights.

Hi! Can confirm that the new IKEA sensor is behaving oddly. It does not create the config.group and "ghosts" all lights in deconz to "ON" on motion detected. Ive tried the @ebaauw way described above with no success.

How ever, can confirm that the sensor is VASTLY more sensitive than the old one. Hoping for a solution. <3

@avakarev

This comment has been minimized.

Copy link

@avakarev avakarev commented Jul 19, 2019

@ebaauw

The IKEA "manual" seems to suggest there's a LED that lights up. Maybe I'm too optimistic reading it.

I can confirm the back side shows the state and it was on Day mode.

Unfortunately I don't have the access to conbee stick / deconz at the moment so can't provide the logfile / debug output. Hopefully some users of E1745 sensor can help with that.

@ebaauw Thank you for your involvement and attempt to help!

@Ergerbolt

This comment has been minimized.

Copy link

@Ergerbolt Ergerbolt commented Jul 24, 2019

Hi there,

same problem for me. Exactly same behavior.

@JustAnotherUserName87

This comment has been minimized.

Copy link

@JustAnotherUserName87 JustAnotherUserName87 commented Jul 30, 2019

Hi,

I have the same problem. Unfortunately I only have the newer sensor.

@LJSven

This comment has been minimized.

Copy link

@LJSven LJSven commented Aug 6, 2019

Same here!

@Michaelnorge

This comment has been minimized.

Copy link

@Michaelnorge Michaelnorge commented Aug 11, 2019

same here!

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Aug 11, 2019

Made my semi-annual trip to IKEA this weekend, because I needed some new batteries and I long wanted to try the outlet with on/off switch. Unfortunately, the motion sensors were sold out completely, both old and new model. So I got a SYMFONISK instead...

Still waiting on the FYRTUR, so I might actually visit them again by the end of the month.

@Michaelnorge

This comment has been minimized.

Copy link

@Michaelnorge Michaelnorge commented Aug 11, 2019

I have arround 20 Trådfri plug sockets.
I synchronized two of the new motion sensors from Trådfri and got the same problems like described here.

Even after deleting the motion sensors the items keep turning on my lights.
I needed to reset them.

After that almost all of my plug sockets were offline. I needed to resynch them.

I don´t think that there is someone who will fix this problem.
The first entry here is about a month ago and still nothing happend...
Bummer! :-(

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Aug 11, 2019

Even after deleting the motion sensors the items keep turning on my lights.

That is to be expected. The motion sensor sends a broadcast command to turn on all lights. This works without any interference from deCONZ, so removing the motion sensor from deCONZ won't change this. You need to remove the motion sensor from the network (by resetting the motion sensor).

I needed to reset them.
After that almost all of my plug sockets were offline. I needed to resynch them.

Again, this is to be expected. When you reset the sockets, they are removed from the network.

I don´t think that there is someone who will fix this problem.
The first entry here is about a month ago and still nothing happend...

Becasue no-one has provided the info we need to fix it. To gather the info myself, I need the device...

@tubalainen

This comment has been minimized.

Copy link

@tubalainen tubalainen commented Aug 11, 2019

Even after deleting the motion sensors the items keep turning on my lights.

That is to be expected. The motion sensor sends a broadcast command to turn on all lights. This works without any interference from deCONZ, so removing the motion sensor from deCONZ won't change this. You need to remove the motion sensor from the network (by resetting the motion sensor).

I needed to reset them.
After that almost all of my plug sockets were offline. I needed to resynch them.

Again, this is to be expected. When you reset the sockets, they are removed from the network.

I don´t think that there is someone who will fix this problem.
The first entry here is about a month ago and still nothing happend...

Becasue no-one has provided the info we need to fix it. To gather the info myself, I need the device...

I can provide the info needed (I hope...), just tell me what you need. Screendumps of info, debug?

//T

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Aug 11, 2019

@triumvirrr

This comment has been minimized.

Copy link

@triumvirrr triumvirrr commented Aug 12, 2019

@ebaauw
I tried the suggested steps.

  1. I am sorry, but I did not entirely understand the first step, what to do exactly and where to look for config.group. Probably I need the GUI for this? My Raspberry runs headless at the moment.

  2. My sensor sends the folllowing command when motion is detected:
    09:20:11:389 APS-DATA.indication srcAddr: 0x98be, srcEp: 0x01 dstAddrMode: 1, profile: 0x0104, cluster: 0x0006, lqi: 103, rssi: -78
    09:20:11:389 asdu: 011a420008070000

  3. Binding the sensor to a group of lights does not change its behaviour, still all lights are ghost-on after a movement.

I will happily make further tests, especially test 1, with your guidance.

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Aug 12, 2019

Ad 2. I assume the sensor is on Day mode, and it’s light enough? This is the expected On with timed off command, with Accept only when On cleared and a 3-minute timed off. Same as the old motion sensor, I don’t understand why the lights don’t respond. Must be something special with the group. I’m not sure if that can be seen in the log, I probably need ZigBee sniffing output.

How did you bind the sensor for 3 if you don’t understand 1? Yes, you need the GUI for this.

@triumvirrr

This comment has been minimized.

Copy link

@triumvirrr triumvirrr commented Aug 12, 2019

Yes, the example was in day mode with sufficient light.

Coming back to your test #1:
I do not understand what you mean with "the client OnOff cluster of the motion sensor" and I do not know where to look for config.group. Could you assist me with some hints?
Test #3 could be done via the web interface.

Just to be clear:
The issue is not, that the lights do not go on.
The issue is, that ALL the lights, regardless of their configuration regarding the motion sensor (in my case mostly a bunch of Osram Smart+ Plugs) are marked as on, although they (probably) are not. In fact, they keep the physical state as before but are shown to be on for 1 minute. This false state is then also passed on to Openhab which causes quite some mess.

I have collected further logs, perhaps they are useful:
Night mode:
16:48:41:728 APS-DATA.indication srcAddr: 0x98be, srcEp: 0x01 dstAddrMode: 1, profile: 0x0104, cluster: 0x0006, lqi: 247, rssi: -60
16:48:41:728 asdu: 0130420108070000
...
16:49:49:015 aps request id: 214 prf: 0x0000 cl: 0x0031 timeout (confirmed: 1) to 0x000D6FFFFE45ADBA (0x98BE)
16:49:49:094 aps request id: 214 finished, erase from queue

Night mode, light setting "dimmed" (instead of 100%) in the motion sensor:
16:55:04:344 APS-DATA.indication srcAddr: 0x98be, srcEp: 0x01 dstAddrMode: 1, profile: 0x0104, cluster: 0x0006, lqi: 111, rssi: -77
16:55:04:344 asdu: 0132420108070000
...
16:56:13:015 aps request id: 228 prf: 0x0000 cl: 0x0031 timeout (confirmed: 1) to 0x000D6FFFFE45ADBA (0x98BE)
16:56:13:095 aps request id: 228 finished, erase from queue

Additional information:
The sensor is shown with "power source: main" and has lost 13% of its battery in one day. I do not know if this is helpful or if it correlates to the problem.

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Aug 12, 2019

I do not understand what you mean with "the client OnOff cluster of the motion sensor" and I do not know where to look for config.group. Could you assist me with some hints?

In the deCONZ GUI, you see the device's end points and clusters: blue for the server clusters and grey for the client clusters. You need to bind the client On/Off cluster 0x0006 to a group, using the Bind Dropbox panel. This is what it would look like for the old model:
Screenshot 2019-08-12 at 22 03.

Make sure to wave in front of the sensor to wake it, and press Bind. Wave again after half a minute or so to make the sensor (hopefully) send a command to the bound group, and the REST API should show config.group when GETting the /sensors resource. For the old model, it would be something like:

$ ph get /sensors/9
{
  "config": {
    "alert": "none",
    "battery": 34,
    "delay": 60,
    "duration": 60,
    "group": "3797",
    "on": true,
    "reachable": true
  },
  "ep": 1,
  "etag": "45ba72f1e5fa02ab0e4cb28e7f83dff7",
  "manufacturername": "IKEA of Sweden",
  "modelid": "TRADFRI motion sensor",
  "name": "TRADFRI motion sensor ",
  "state": {
    "dark": true,
    "lastupdated": "2019-08-12T18:25:29",
    "presence": false
  },
  "swversion": "1.2.214",
  "type": "ZHAPresence",
  "uniqueid": "00:0b:57:ff:fe:22:cf:5f-01-0006"
}

The issue is not, that the lights do not go on.
The issue is, that ALL the lights, regardless of their configuration regarding the motion sensor (in my case mostly a bunch of Osram Smart+ Plugs) are marked as on, although they (probably) are not.

The issue is that the motion sensor sends a command that deCONZ thinks turns on all lights, but that the lights seem to ignore. This first part makes me thing it's a kind of broadcast command, which we hope to change to a groupcast by binding the sensor to a group. The second part is really interesting, but might not be an issue if don't need the sensor to control the lights directly, without using the gateway.

In fact, they keep the physical state as before but are shown to be on for 1 minute

I suppose until next polled by deCONZ, so the timing might differ per light and will depend on the number of lights in your network.

I have collected further logs, perhaps they are useful:

Cool. Yes they are. I think I managed to confuse myself once again. ASDU xxxx 42 00 0807 0000 is turning the lights on unconditionally (i.e. when the sensor in on Day, or when the sensor is on Night and it's dark); ASDU xxxx 42 01 0807 0000 is prolonging the on duration when the lights were already on, or does nothing when the lights were off (i.e. sensor is on Night, but it's not dark).

The really interesting part is that the same payload seems to be used for the Dimmed setting. Either the sensor sends another command after this one (I'd expect cluster 0x0008 or maybe 0x0005), or it uses another broadcast address (not visible in the log). I'm afraid this might be another IKEA special, similar to the way the remote handles changing colour or colour temperature.

The timeouts on the ZDP (profile 0x0000) requests are unrelated. This is deCONZ trying (and failing) to get some network info from the sensor.

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Aug 12, 2019

Oh, and it would help to have the GUI screenshots of the new model. In particular: is it now an HA / Zigbee 3 device, like the On/Off switch, or still a ZLL device; and does it have an 0xFC7C cluster.

@BeamMeUpTo

This comment has been minimized.

Copy link

@BeamMeUpTo BeamMeUpTo commented Aug 13, 2019

Hi all of you ;),

I will try to send additional information - so here first is the screenshot of the new ikea motion sensor from the deCONZ gui:

IkeaTradfri-Motion-Screenshot_20190813_090943

The Binding Dropbox is empty!

I would like to provide additional info about
ph get /sensors/9

but I have no clue what "ph" is! Please enlighten me!

Beam

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Aug 13, 2019

here first is the screenshot of the new ikea motion sensor from the deCONZ gui:

Thanks. Some observations:

  • This is yet another mac address prefix, which hasn't been whitelisted in the REST API code. Do you actually see the sensor in the API and/or Phoscon?
  • It looks a lot like the on/off switch, including 0xFC7C IKEA cluster. I can only assume the Trådfri hub interacts with the cluster to configure the sensor;
  • 0x0008 Level Control client cluster. This strengthens my suspicion that the sensor might issue Level Control commands when Dimmed is set.

The Binding Dropbox is empty!

Yes, you need to drag the 0x0008 cluster to the Source drop box and fill in the group ID manually.

I have no clue what "ph" is

Just a liitle tool I wrote to interact with the Hue/deCONZ API from the command line. It comes bundled with homebridge-hue. You can use curl instead, but then you have to specify the full URI (incl. host and username/apikey) and format the JSON yourself.

@triumvirrr

This comment has been minimized.

Copy link

@triumvirrr triumvirrr commented Aug 13, 2019

Thanks, Eric.

Binding the sensor via GUI binding dropbox to an (in my case) empty group did the trick. No Ghost-Ons anymore. I also tested with a group with lights in it and they are switched as expected. And only the lights in the group are switched, es expected.

The problem is solved for me, thanks once again!

Note: Configuriong the sensor via we interface to work only for a group did NOT work.

Side effect: The group with the GUI-bound IKEA sensor is then not visible via Web Interface anymore.

The sensor itself is normally visible within all GUIs and the REST API.

Here is the sensor output via REST after binding it to group 6:

{
"config": {
"alert": "none",
"battery": null,
"delay": 180,
"duration": 60,
"group": "6",
"on": true,
"reachable": true
},
"ep": 1,
"etag": "26704aff65b268ca9d2b4aa67fc75963",
"manufacturername": "IKEA of Sweden",
"modelid": "TRADFRI motion sensor",
"name": "TRÅDFRI Bewegungsmelder",
"state": {
"dark": true,
"lastupdated": "2019-08-13T10:06:58",
"presence": true
},
"swversion": "2.0.022",
"type": "ZHAPresence",
"uniqueid": "00:0d:6f:ff:fe:45:ad:ba-01-0006"
}
@Cybersmurfen

This comment has been minimized.

Copy link

@Cybersmurfen Cybersmurfen commented Aug 31, 2019

the 67 version does not include the fix.

@DieterClaeys

This comment has been minimized.

Copy link

@DieterClaeys DieterClaeys commented Sep 2, 2019

I have version 02.05.67 the issue still persist.

@vandalon

This comment has been minimized.

Copy link

@vandalon vandalon commented Sep 5, 2019

Made my semi-annual trip to IKEA this weekend, because I needed some new batteries and I long wanted to try the outlet with on/off switch. Unfortunately, the motion sensors were sold out completely, both old and new model. So I got a SYMFONISK instead...

You know you can just order online, right? :) That's how I got my motion sensor 🗡
I can formir I have the same issue here.

@salopette

This comment has been minimized.

Copy link

@salopette salopette commented Sep 5, 2019

So for me there is still the problem that all groups go to when the sensor triggers

@DieterClaeys

This comment has been minimized.

Copy link

@DieterClaeys DieterClaeys commented Sep 5, 2019

@salopette , from what I understand no fix has been released yet

@mattias1972

This comment has been minimized.

Copy link

@mattias1972 mattias1972 commented Sep 9, 2019

Just tried 02.05.69 (in deCONZ addon v3.6 for Home Assistant) and the issues still remain it seems... Anybody that have any luck getting this to work?

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Sep 9, 2019

Did you re-pair the sensor?

@mattias1972

This comment has been minimized.

Copy link

@mattias1972 mattias1972 commented Sep 9, 2019

No... Will try that!!

@mattias1972

This comment has been minimized.

Copy link

@mattias1972 mattias1972 commented Sep 9, 2019

Ok, I'll put on the dunce cap... After repairing is works!

@DieterClaeys

This comment has been minimized.

Copy link

@DieterClaeys DieterClaeys commented Sep 9, 2019

@simonbove

This comment has been minimized.

Copy link

@simonbove simonbove commented Sep 13, 2019

So to confirm all problems with the new motion sensor from ikea is solved? So now we can go buy them?

@manup

This comment has been minimized.

Copy link
Member

@manup manup commented Sep 15, 2019

The issue is solved since version 2.05.69.
Note that the sensor needs to be re-paired.

@manup manup closed this Sep 15, 2019
@DieterClaeys

This comment has been minimized.

Copy link

@DieterClaeys DieterClaeys commented Sep 16, 2019

Ok, seems the docker image is still on 2.05.67 - so the bugfix wont be active yet

@JensTimmerman

This comment has been minimized.

Copy link

@JensTimmerman JensTimmerman commented Sep 21, 2019

I just got my conbee 2 and tradfri motion sensor (one of the new ones with digital buttons instead of analog turn buttons) 5 days ago, I am on 2.05.69. and I am unable to pair my motion sensor,
The only way I can get it to show up in deconz is if I pair it to a lamp first, then it shows up but 'unreachable' and the lamp seems to get removed from the system aswell, I have to reset the lamp to get it to connect back to deconz but the motion sensor stays as 'unreachable' in phoscon (I do not have the deconz ap or anything, only way I interact with the system is via phoscon for now)

Are there any clear steps on how to connect the motion sensor?
pressing the reset button 4 times does nothing.
Do I need to pair it to a light first and then press the button 4times?
Do I need to keep it 5cm from the conbee 2 and then press the button 4 times?
Do I need to press the button 10 seconds close to the conbee 2?

update:
it seems that I actually am able to connect the motion detector via the phoscon web ui, the detector shows up after starting the add new detector process, keeping the detector close to the conbee 2, press the button 4times in 5 secs and wait 1 minute.
It then shows up in the list of detectors as:

Vendor IKEA of Sweden
Product TRÅDFRI Motion sensor
Version unknown
Motion none
Refreshed09/21/2019 1:53:06 PM a few seconds ago

And the status updates correctly.

BUT: The add new detector flow never reaches the state 'ready' and ends with: communication failed after about 3 minutes, tricking you into believing something went wrong (the version unknown suggests something actually goes wrong?)

Let me know what steps I can take to improve this situation for other users.

update: seems to work correctly today

@bmelman

This comment has been minimized.

Copy link

@bmelman bmelman commented Sep 25, 2019

Additional information:
The sensor is shown with "power source: main" and has lost 13% of its battery in one day. I do not know if this is helpful or if it correlates to the problem.

Same issue here: battery drained from 85 to 15% within one week.

@RestOp

This comment has been minimized.

Copy link

@RestOp RestOp commented Sep 30, 2019

In Motion sensor i have 2,0,022 and there is no update available. Is it normal?

@gloomytree

This comment has been minimized.

Copy link

@gloomytree gloomytree commented Sep 30, 2019

Hi there,
i still have issues with the E1745 (2019, IP44). I can pair it without problems, after that it doesn't do anything. Phoscon says Status Not reachable.
I am running a Raspberry Pi 4 with RaspBee, HASS.io and the according deconz plugin. Version is 2.05.69, so i SHOULD be fine, according to this thread, Firmware is 26050500 (but i cannot update using the Phoscon GUI).

Can someone provide some insights? Need more info?

@wucherpfennig

This comment has been minimized.

Copy link

@wucherpfennig wucherpfennig commented Oct 2, 2019

I am sorry to hijack this thread but as stated above hassio + deconz latest (2.05.69) works good BUT I noticed that there is a strange "cooldown" time of 60 seconds in which the sensor does not detect anything. Is this behaviour changeable?

@manup

This comment has been minimized.

Copy link
Member

@manup manup commented Oct 4, 2019

I am running a Raspberry Pi 4 with RaspBee, HASS.io and the according deconz plugin. Version is 2.05.69, so i SHOULD be fine, according to this thread, Firmware is 26050500 (but i cannot update using the Phoscon GUI).

That's a very old firmware which doesn't support devices like IKEA remote and sensor well.
I'd recommend to upgrade the firmware manually to the latest version 0x26330500 as described in https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Update-deCONZ-manually

@Korhm

This comment has been minimized.

Copy link

@Korhm Korhm commented Oct 4, 2019

I am sorry to hijack this thread but as stated above hassio + deconz latest (2.05.69) works good BUT I noticed that there is a strange "cooldown" time of 60 seconds in which the sensor does not detect anything. Is this behaviour changeable?

I have the same behavior. Don’t know if it’s because of deCONZ or the motion sensor itself.
I’m also interrested of knowing how to avoid this « cooldown » time.

@manup

This comment has been minimized.

Copy link
Member

@manup manup commented Oct 4, 2019

Most likely the sensor prevents battery drain by not sending messages too often.

@gloomytree

This comment has been minimized.

Copy link

@gloomytree gloomytree commented Oct 7, 2019

I am running a Raspberry Pi 4 with RaspBee, HASS.io and the according deconz plugin. Version is 2.05.69, so i SHOULD be fine, according to this thread, Firmware is 26050500 (but i cannot update using the Phoscon GUI).

That's a very old firmware which doesn't support devices like IKEA remote and sensor well.
I'd recommend to upgrade the firmware manually to the latest version 0x26330500 as described in https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Update-deCONZ-manually

Thanks, this saved me. Altough it was kind of difficult to upgrade the firmware via Hass.io / Hass.os, it now works like a charm.

@MacJawa

This comment has been minimized.

Copy link

@MacJawa MacJawa commented Nov 13, 2019

Most likely the sensor prevents battery drain by not sending messages too often.

This kind of makes sense, but on the other hand, as per my experience, the sensor only waits 60 seconds after presence changed to true. Then it sends another update (after 60 seconds). Let's say the second update is presence = false. Then it does not send anything until another movement detected. I assume this behaviour based on "lastupdated" value. Therefore it probably does not send update every 60 seconds, but to be sure we need to monitor the network activity and this is above my actual skill :)
If I'm correct above, then if there is not so much movement, it will make sense to shorten the interval and still it will only send 2 updates. Or if battery drain is not a concern and one would like to have updates more often for the movement, it would be nice to have ability to set the interval to custom value.

So the question remains. Is it possible to set config.delay to custom value other then default 60?
Hopefully @ebaauw or @manup would clarify that.

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Nov 13, 2019

The Trådfri motion sensor doesn’t send state updates (except for battery), and it doesn’t send anything when motion is no longer detected. It sends an On with Timed Off command to the bound group. This causes the lights in this group to turn on for the specified time. No need for a second message, and no need to report next/continued motion before that time has almost expired.

The deCONZ REST API plugin eavesdrops on the group command and sets state.presence, state.dark and config.delay accordingly. These REST attributes are read-only; the only way to “change” config.delay is to change the dial on the old model; on the new model it’s fixed to 180 seconds. The REST API plugin clears state.presence autonomously after config.duration (or, when that’s 0, config.delay) seconds, but this has nothing to do with the motion sensor. Note that the API was modelled after the Hue motion sensor, which works very differently. This sensor does send state updates, also when it no longer detects motion.

@MacJawa

This comment has been minimized.

Copy link

@MacJawa MacJawa commented Nov 13, 2019

Thank you @ebaauw for further information. Unfortunately I still don't understand how motion sensor (new one) behaves when there is continous movement for let's say 5 minutes. Let me explain. I use OpenHab because I want to build more advanced rules, not only simple grouping. At first, I set simple rules:
When presence changes to True, turn on the lights. When presence changes to False, turn off the lights. I quickly found out this wouldn't work, because even I was moving in front of sensor, lights turned off after 60 seconds. They eventually turned on again, but only after I was jumping in front of sensor for a few moments. This is not good, right? So I changed my second rule like this: When presence changes to False, wait for 60 seconds, than check presence again and act. If presence is False, turn off the lights, otherwise let it be. But this is not good as well, because when I rush into kitchen for a cup of water and I leave in 10 seconds, my lights are turned on for 2 minutes, which is kind of wasted energy and not very smart. Of course I can lower the interval and check for presence again in 10 seconds after it changes to False, hoping the sensor will send the update meanwhile, but it's still one minute of wasted energy after I left the room.
But if that initial 60 seconds delay could be shortened to 20 seconds for example, this could solve the situation.

Back to beginning. You say that sensor only sends update when motion is detected. Does it then sleep for 60 seconds? Because according to log in openhab my presence state always changes to OFF exactly one minute after ON, regardless of the movement. Is this behaviour of the sensor or deconz API?
And finally, is it possible to turn off lights sooner after I leave the room (as I explained above) or is it impossible with this sensor?

Thank you for any ideas.

@ebaauw

This comment has been minimized.

Copy link
Contributor

@ebaauw ebaauw commented Nov 13, 2019

You say that sensor only sends update when motion is detected.

Strictly speaking, it sends a command to turn on lights, it doesn’t send a status update. But yes: only when it detects motion.

Does it then sleep for 60 seconds?

Sleep as in shuts down its ZigBee radio: yes. Sleep as in: won’t detect motion: I don’t know. Also I haven’t looked in detail, how far apart it sends commands under continuous motion, but for the new sensor, it seems closer to 180 seconds than 60 seconds.

Because according to log in openhab my presence state always changes to OFF exactly one minute after ON, regardless of the movement. Is this behaviour of the sensor or deconz API?

Again, state.presence is a REST API attribute that has no ZigBee equivalent for the Trådfri motion sensor. The REST API plugin resets it to false after config.duration seconds. If you set config.duration to 0, the REST API resets state.presence after config.delay seconds (the OnTime that the sensor specified with the On with Timed Off command). Personally, I would never have exposed config.duration for the Trådfri sensor, since it’s highly confusing and delay makes more sense if you use the sensor to control lights directly.

And finally, is it possible to turn off lights sooner after I leave the room (as I explained above) or is it impossible with this sensor?

A single motion sensor cannot detect when you leave a room. It detects motion, not presence. I actually use multiple motion sensor in adjacent rooms to detect leaving (motion in living room, motion in hallway, no more motion in living room => left the living room).

The granularity of the new Trådfri motion sensor is close to 3 minutes, i.e. you cannot infer no motion any sooner.

my lights are turned on for 2 minutes, which is kind of wasted energy and not very smart.

With LED based smart lights I wouldn’t worry about that. If you use a wired in-wall switch with tungsten or halogen lights, it’s maybe a different story - I’d replace them with (dumb) LED lights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.