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

Hue Motion Sensors update stuck at queued #27

Open
woytekbode opened this issue May 8, 2021 · 15 comments
Open

Hue Motion Sensors update stuck at queued #27

woytekbode opened this issue May 8, 2021 · 15 comments

Comments

@woytekbode
Copy link

woytekbode commented May 8, 2021

I recently installed Home Assistant on a Raspberry Pi4 with SSD and conbee 2. Running the Deconz add-on and want to have hue lights, motion sensors and aqara sensors on the network.

When I found out it is possible to update devices over the air with the Deconz addon it made me very happy. That means it's not necessary to keep an old Hue Hub present for updates. However, I'm having some problems with updating my Hue motion sensors.

Steps that I took:

  • Download Hue motion sensor firmware 6.1.1.27575 from the link in the readme
  • Place the firmware in the HA share folder with WinSCP
  • Copy the firmware to the docker data/otau folder with SSH
  • Start the STD OTAU plugin
  • Select the correct device
  • Select the firmware
  • Select Update

The update is recognised and seems to start but it hangs on "queued" and the time stops at 0.46. Things I have tried:

  • Let Phoscon rename the file to 100B-010D-42006BB7.zigbee and try again
  • Restart the motion sensor by pulling and reinserting the battery
  • Wait overnight
  • Retry pressing the query/update buttons...

Otau_update_queued

@woytekbode
Copy link
Author

So I have managed to update my Hue motion sensors. I did the following:

  • Disconnect the Hue light so that the sensors are forced to talk to the coordinator directly (note that I only have a test set-up right now with one light and several sensors, doing this in an actual house set-up will be much more difficult)
  • Manually select the firmware that was renamed by restarting Deconz
  • Press the upload button
  • Press the query button

I'm glad I got it to work but I am wondering how I can do the update when the sensors are located all over the house with routers everywhere in between. It's not so easy to force a direct connection with the coordinator in that situation.

Maybe we can try and figure out if something is wrong when updating via routers?

@jonnycastaway
Copy link

Same issue with all Hue Devices.
Hue Devices, no matter if it's a Bulb, Dimmer, Motion Sensor, stuck at queued or at 0.03%.
Ikea Devices updates without problems.
Biggest Problem ist that stuck at 0.03% will block the complete updates because deconz handles updates one by one.
Bring the device near to the coordinator is not an option because i have bulbs that i cannot move.

@matlimatli
Copy link

I agree that it seems to be an issue with updating via routers. I managed to shut off various lights around the house and thereby forcing my dimmer switch to connect directly to the coordinator. The update then went smoothly, until after ~90%, when the device suddenly connected to a different router. After this, the update didn't make any progress at all.

@NePheus
Copy link

NePheus commented Jun 25, 2021

Same problem here. Is this a fixable bug by the dev team? Or cant this behavior be changed and we have to force (somehow) the connection directly to the coordinator?

@ebaauw
Copy link
Collaborator

ebaauw commented Jul 22, 2021

Do you guys have source routing enabled? If so, could you disable it, wait a couple of minutes and try again?

@jdeluyck
Copy link

Do you guys have source routing enabled? If so, could you disable it, wait a couple of minutes and try again?

Where can I find this? I've been peeking through deconz, but...

@ebaauw
Copy link
Collaborator

ebaauw commented Jul 23, 2021

In the GUI, enable the Source Routing panel under Panels.

@jdeluyck
Copy link

Not enabled here. (and Hue doesn't update unless it's directly linked)

@ebaauw
Copy link
Collaborator

ebaauw commented Jul 24, 2021

What coordinator device and firmware do you use?

@jdeluyck
Copy link

ConbeeII running firmware 26660700, home assistant addon.

@antonbo
Copy link

antonbo commented Sep 1, 2021

I was able to proceed a little by using instructions from #22. But it still stuck for me at 4-5%. And restarted from 0% if I press Query or Update
Devices for update: Dimmer Switch and Presence Sensor

UPD1: I'm able to proceed in my network if I press scan every 1.5 minutes. Smells like someone is going into sleep mode and stops transmitting OTA packets. It does not help to set "Add light time" to 60 minutes in my case. Is there any command line equivalent for "Scan for Devices" button in Old WebUI?

I'm using Conbee II with 26700700, no source routing. Most of devices are from IKEA (lights and sockets)

@antonbo
Copy link

antonbo commented Sep 2, 2021

So all my sensors are updated now. The procedure involved 'xdotool click 1' to force Touchlink scan every 60-90 seconds via old UI settings. Be careful to avoid OTA plugin generated images. In my case they were corrupted so I've used original ones from Philips site. I've tried to do the same with dimmer switches, but it fails with unknown reason for me. The firmware was sent fully to the device, but after restart (and few red-green blinks on device) it still shows the old one.

It's also possible to request Touchlink scan via REST API, but I have not tried it.

@woytekbode
Copy link
Author

@ebaauw Hi Erik. IS there something we can do to progress this? I'd be happy to run some tests to find out where the issue is. I can imagine it's not high priority but on the long run it would be very inconvenient if firmware updates are not possible when using Deconz instead of the Hue Hub.

@antonbo Nice to see you have made some progress!

@ebaauw
Copy link
Collaborator

ebaauw commented Dec 20, 2021

IS there something we can do to progress this?

I wouldn't know what.

As far as I understand the OTAU protocol, the device is directing the upgrade, requesting each block of data from the OTAU server. The update stalls when the device is no longer requesting next blocks. Most likely, this happens because the device didn't receive a proper answer from its previous request. We've seen this happen with source routing enabled during the OTAU upgrade, as the packet would become too large with the source routing header info. Of course your "regular" interference and Zigbee routing issues would also apply here.

It's been a while, but I managed to update all my Hue devices through the OTAU plugin, without resorting to continuous (touchlink) scanning. It's been challenging sometimes on my production network, especially for end devices. I suspect there's a mismatch in the timing between deCONZ sending the response and the device polling its parent. Analysing and fixing this is beyond my skills, I'm afraid.

I helps to use a test network without routers (other than the coordinator), forcing the end device to use the coordinator as parent. As I mentioned earlier: make sure to turn off source routing (if you're updating on a network with other routers), and to install fresh batteries in the end device (don't blindly trust the reported battery level).

@smallgreyrock
Copy link

smallgreyrock commented Jan 28, 2022

Disabling source routing made the OTAU feature mostly work on my 50-60 device network, albeit not very reliably.

One frustrating thing about Hue devices is that if they're sufficiently out of date you seem to have to update to a different old firmware (or multiple different old firmwares) before you can update to the current one. I don't know if deconz handles that gracefully, you may have to select a specific firmware file in that case.

Sometimes the update check fails for reasons I don't understand -- I've seen deconz reply OTAU_NO_IMAGE_AVAILABLE for querying devices that definitely do have an updated image available.

Trying to force the device to start updating using query/update does not seem to work reliably.

Leaving deconz alone overnight updated ~90% of the devices. The remaining 10% were either stuck in the queued state, or at some random percentage. Clicking abort/query/update a couple of times sometimes unstuck them.

I wish disabling source routing was more clearly documented, I'd never have guessed that was breaking OTAU if I hadn't found this ticket. For anyone else who stumbles on this, OTAU does work, you just ... might have to wait and flail around a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants