dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.88k stars 485 forks source link

TRÅDFRI Motion sensor not connected anymore #566

Closed jsponz closed 5 years ago

jsponz commented 6 years ago

After the last DECONZ update, TRÅDFRI Motion sensor is not detected anymore.

Any hint?

Thanks!

ebaauw commented 6 years ago

Battery?

Otherwise try re-pairing the motion sensor. If that fails, try resetting the motion sensor, before re-pairing.

jsponz commented 6 years ago

Nothing :-(

mariusmotea commented 6 years ago

Same problem for me after i upgrade from Raspberry 2 to Raspberry 3+. 2 sensors were automatically joined back to the new deconz installation , but 3rd sensors failed every time. I replaced the batteries and i test also the sensor with Tradfri Gateway, so the sensor seams ok.

Update: Just to be clear, i reset the sensor every time by pressing 4 times the button within 5 seconds.

djwlindenaar commented 6 years ago

I have the same issue. Stable network for a couple of months, now after update to version 2.5.24, some tradfri sensors started dropping off the network. Not all of them. 2 out of 6 RHT sensors and 1 out of 2 motion sensors so far. Re-pairing does not seem to help.

Two of the dropped off sensors are meshing through a tradfri light. That light shows the red dot sometimes in the UI. Could be related?

Let me know how I can help solve this regression!

Daniel

manup commented 6 years ago

Is the firmware of RaspBee the latest: 0x261f0500?

Not sure what happens here, but before reset anything please always try to just pull out the battery press buttons a few times and reinsert battery.

If possible try to force the devices to connect though the RaspBee directly by turning power of the IKEA light off before the "battery-toggle".

djwlindenaar commented 6 years ago

Yes, it's the latest firmware.

I got things working again by powercycling the IKEA light and then rejoined the sensors through the light (as it was before updating deconz).

This worked out fine and things are now communicating again. I hope this was just related to the update event and not a stability issue. We'll see..

mariusmotea commented 6 years ago

Hi,

Can you explain step by step this procedure. I pair the sensor with one bulb, now i can see in deconz a new group with this bulb and i can control it. The sensor is also able to control the light, but i cannot see the sensor in deconz to get the websocket events.

djwlindenaar commented 6 years ago

Hmmm that sound like a completely different issue to me. The motion sensors I have both created a group and a sensor in the REST API after joining the network.

I guess my issue was more in the light which seemed to have an issue than in the sensors.

Daniell

mariusmotea commented 6 years ago

Is there a way how i can debug this issue? I still cannot pair this sensor after multiple retries.

DB-Alex commented 6 years ago

I have the same issue

mariusmotea commented 6 years ago

For sure there is a bug in the last deconz release. I pair this sensor multiple times in the past, now is not wotking anymore.

am3rig0 commented 6 years ago

Just wondered if anyone had any luck with getting TRÅDFRI Motion sensor to work on 2.05.30? Had a go at reincluding my standalone unit (with no lights attached) that worked fine before 2.05.25.

No matter what I try (replacing / removing battery, multiple resets, connecting conbee using usb extension), still no luck connecting this motion sensor in Phoscon.

mariusmotea commented 6 years ago

I did not find any workaround for this issue.

manup commented 6 years ago

I've test two scenarios now (deCONZ 2.05.31, Firmware 0x261f0500)

1) Reset motion sensor without deleting it, to check if it will be detected again when the NWK address changes. 2) Delete motion sensor from the Phoscon App so it will be marked deleted in the database and when add it again via Phoscon App.

Both tests worked, so currently I can't spot a general bug in deCONZ on the matter.

Can you please retry to add the sensor but with all lights (and other mains powered) devices powered off, that is to ensure the sensor will join via gateway. This should minimize eventual problem on in between nodes.

am3rig0 commented 6 years ago

@manup thanks for looking into this.

My main system is a RPI running hassio image, so I am relying on marthoc/hassio-addon-deconz-armhf docker image for latest version of deCONZ.

I did however spin up an ubuntu 18.04 system in virtualbox and can confirm that deCONZ 2.05.31 ( on Firmware 0x261f0500) actually detects the sensor just fine (via USB passthrough).

Once @marthoc had a chance to update his image, i'll check this on my hassio box, fingers crossed!

mariusmotea commented 6 years ago

I try 30 minutes today but with no luck. I have Deconz 2.05.31 / firmware 26210500. Not sure if this helps but while i try to pair the sensor the green light has a loop (10 seconds on, 1 second off). Because of no luck i try to keep the link button pressed for about 10 seconds and i believe the raspbee device was reseted because i saw ~3 fast red flashes and lights control stop working.

am3rig0 commented 6 years ago

@mariusmotea perhaps try firmware 0x261f0500 - this seems to work for both myself and @manup

mariusmotea commented 6 years ago

I don't know how to downgrade the firmware, maybe somebody can help . I pair the sensor two times with the Tradfri Bridge, absolutely no issues, However this time i saw the blinking on rasbee was more constant when i try to pair, was a loop one second on / one second off so i believe the pair process is failing and it retry. Is there a way to see at what step the pair process is failing?

manup commented 6 years ago

To downgrade the firmware please do:

RaspBee 1) close deCONZ 2) $ sudo GCFFlasher_internal -f /usr/share/deCONZ/firmware/deCONZ_Rpi_0x261f0500.bin.GCF

ConBee 1) close deCONZ 2) $ sudo GCFFlasher_internal -d 0 -f /usr/share/deCONZ/firmware/deCONZ_Rpi_0x261f0500.bin.GCF

mariusmotea commented 6 years ago

Unfortunately it did not pair also with firmware 0x261f0500. I will dig more, maybe i will find our what is going on. There is no way to start deconz in debug mode?

manup commented 6 years ago

There is no way to start deconz in debug mode?

You can enable (noisy) logging by starting deCONZ on the command line like:

$ deCONZ --http-port=80 --dbg-error=1 --dbg-info=2 --dbg-aps=2 --dbg-zcl=2

There should be hopefully something to see when the sensor joins.

mariusmotea commented 6 years ago

I believe the issue is with deconz configuration. I start deconz with above command and it start with a fresh configuration (i guess it use my user env, not root where current configuration is stored). On a light search it detect all my lights instant, however no switches or sensors were detected. I try to pair the sensor that did not work in the past and now there was absolutely no problem to pair it. Now i have two configurations, one were i have just this sensor and another one with others, excepting this.

manup commented 6 years ago

That might indeed be possible, the zll.db file could contain references to the old sensor, usually marked as deleted. deCONZ normally should take care of it and bring back the sensor while searching (as tested in the above two scenarios). To find out the underlying problem you need to use the former configuration, and maybe track where the setup process stops.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

manup commented 5 years ago

Should work with recent deCONZ versions, there were cleanups in regard to database handling.