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

Xiaomi Switch QBKG03LM - Failed to ping #1454

Closed
VivantSenior opened this issue Apr 21, 2019 · 23 comments
Closed

Xiaomi Switch QBKG03LM - Failed to ping #1454

VivantSenior opened this issue Apr 21, 2019 · 23 comments

Comments

@VivantSenior
Copy link

VivantSenior commented Apr 21, 2019

Bug Report

What happened

Hello,

I'm unable to use Xiaomi Wired Wall Switch (version without neutral line) - QBKG03LM. After successful pairing I can see in the logs:

zigbee2mqtt:debug Ping 0x001... (basic)
shepherd:request REQ --> AF:dataRequest, transId: 4
shepherd:request RSP <-- AF:dataRequest, status: 0
shepherd:af dispatchIncomingMsg(): type: dataConfirm, msg: {"status":205,"endpoint":1,"transid":4}
shepherd:msgHdlr IND <-- AF:dataConfirm, transId: 4
zigbee2mqtt:error Failed to ping 0x001...
shepherd Device: 0x001... already in network
shepherd:msgHdlr IND <-- ZDO:tcDeviceInd
shepherd spinlock: false []
shepherd Device: 0x001... already in network
shepherd Device: 0x001... endAnnounce.
zigbee2mqtt:debug Received zigbee message of type 'endDeviceAnnce' with data '"0x001..."' of device 'lumi.ctrl_neutral2' (0x001...) of endpoint 1

Detailed logs: https://pastebin.com/raw/cfYU0rXj.

@Koenkk created similar issue there: #943 but not the same.

Thank you for any advice,
Vivant

What did you expect to happen

Xiaomi Switch should show its current state in Home Assistant and respond on requested state change.

How to reproduce it (minimal and precise)

Pair Xiaomi Wired Wall Switch (QBKG03LM) device.

Debug Info

zigbee2mqtt version: 1.3.1
CC2531 firmware version: 20190223 (default)
Hass.io version: 0.91.4
Hass.io supervisor: 160

@Koenkk
Copy link
Owner

Koenkk commented Apr 22, 2019

Are you also unable to turn it on/off? What error is logged in that case?

@VivantSenior
Copy link
Author

@Koenkk, yes, I'm unable to turn it on or off. See the logs:

error: Zigbee publish to device '0x001...', genOnOff - off - {} - {"manufSpec":0,"disDefaultRsp":0} - 2 failed with error Error: AF data request fails, status code: 205. No network route. Please confirm that the device has (re)joined the network.
info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"zigbee_publish_error","message":"Error: AF data request fails, status code: 205. No network route. Please confirm that the device has (re)joined the network.","meta":{"entity":{"ID":"0x001...","type":"device","friendlyName":"Bedroom_wall_switch"},"message":"OFF"}}'

I've just removed this wall switch with the idea of repairing it with zigbee2mqtt but I'm having trouble with full removal of the device from Home Assistant (hass.io).

@Koenkk
Copy link
Owner

Koenkk commented Apr 22, 2019

It doesn't have to be removed from home assisant, can you try re-pairing it?

@VivantSenior
Copy link
Author

VivantSenior commented Apr 22, 2019

After re-pairing (at least trying to) I have an error:

Cannot get the Node Descriptor of the Device: 0x001... (Error: Timed out after 10000 ms)

EDIT: I don't have this Xiaomi Wall Switch name nor friendly name in database.db (#837 (comment))

@Koenkk
Copy link
Owner

Koenkk commented Apr 23, 2019

Can you restart zigbee2mqtt and retry pairing?

@EmmanuelLM
Copy link
Contributor

Hello, I am having a similar "failed to ping" error after (say) 24-48h of no use.
To re-pair it, this is what I do:

  • allow joining in zigbee2mqtt
  • remove the device via the mqtt command
  • after that the device will automatically re-pair

@VivantSenior
Copy link
Author

Can you restart zigbee2mqtt and retry pairing?

As far as I remember, I have restarted zigbee2mqtt and whole hass.io instance before trying to re-pair. During the weekend will try to do that again.

@JSCarter1
Copy link

I also experienced this issue with the same switch.
I assumed it was something to do with the switch sleeping (presumably to reduce power consumption?).

I added a home assistant automation that calls zigbee2mqtt/<device_id>/get every 15 minutes - since then I haven't had any issues. Other things were changed at around the same time, so this may not have been the thing that fixed it.

@Koenkk
Copy link
Owner

Koenkk commented Apr 26, 2019

For those still having this issue, can you check if this has been fixed with the latest dev firmware? https://github.com/Koenkk/Z-Stack-firmware/tree/dev/coordinator/Z-Stack_Home_1.2/bin

@Koenkk
Copy link
Owner

Koenkk commented Apr 26, 2019

Please test with the latest dev branch, things should have been improved (#943 (comment)). If you have any issues, please report there.

@Koenkk Koenkk closed this as completed Apr 26, 2019
@VivantSenior
Copy link
Author

VivantSenior commented Apr 26, 2019

For those still having this issue, can you check if this has been fixed with the latest dev firmware? https://github.com/Koenkk/Z-Stack-firmware/tree/dev/coordinator/Z-Stack_Home_1.2/bin

Unfortunately still receiving an error:

--REPAIRING--
debug: PM Ping 0x001... (basic)
error: Failed to ping 0x001...
--REMOVING WALL SWITCH--
debug: Received MQTT message on 'zigbee2mqtt/bridge/config/remove' with data '0x001...'
warn: Failed to remove '0x001...', trying force remove...
info: Force removed 0x001...
info: Successfully removed 0x001...
info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_removed","message":"0x001..."}'
--REPAIRING--
error: Cannot get the Node Descriptor of the Device: 0x001... (Error: Timed out after 10000 ms)

EDIT:
After adding:

{"id":13,"type":"Router","ieeeAddr":"0x001...","nwkAddr":XXXXX,"manufId":1111,"manufName":"LUMI"...

back to the database.db I can overcome the issue "Cannot get the Node Descriptor of the Device" but still can see in the logs:

debug: Ping 0x00158d00034957b1 (basic)
error: Failed to ping 0x00158d00034957b1
debug: Ping 0x00158d00034957b1 (basic)
error: Failed to ping 0x00158d00034957b1

@Koenkk
Copy link
Owner

Koenkk commented Apr 26, 2019

After the removal, can you restart zigbee2mqtt and make sure to pair the switch close to the coordinator?

@VivantSenior
Copy link
Author

I'm still receiving the "Failed to ping" error: https://pastebin.com/raw/cs3rztEM.
I think there are two issues:

  • unable to properly remove old instance of the wall switch (error "Cannot get the Node Descriptor of the Device" after trying to pair the device again after the removal by using mqtt message: zigbee2mqtt/bridge/config/remove
  • "Failed to ping" error.

Today I'll mount two new Xiaomi Wall Switches (QBKG03LM) next to the coordinator and see if any issue will appear.

@VivantSenior
Copy link
Author

VivantSenior commented Apr 28, 2019

I successfully paired different Xiaomi Wall Switch (QBKG03LM): https://pastebin.com/raw/qMmdEANn but was still receiving "Failed to ping" on old switch.

--- (later that day) ---

I have connected old Xiaomi wall switch closer to the coordinator, removed it from zigbee2mqtt (using mqtt message), paired it again, disconnected it physically from the wall, moved to the old place and now it's working...

Thanks,
Viv

@EmmanuelLM
Copy link
Contributor

EmmanuelLM commented Apr 28, 2019 via email

@VivantSenior
Copy link
Author

Weird, over the night I had few "Failed to ping" on all Xiaomi Wall Switches (near and far from the coordinator). When I turn on debug log level, shepard debug set to true and restart zigbee2mqtt I can't see any "Failed to ping", just "Successfully pinged". I will monitor the logs...

@VivantSenior
Copy link
Author

VivantSenior commented Apr 30, 2019

No "Failed to ping" over the night. But I have found weird bug. When I connect the load only on one of the button (second button had connected cables to it but on the other end of the cable there was nothing) the light connected to first button started to flickers for a split of the second even when I didn't turn it on or off. It repeated every minute or two.

EDIT: After connecting some load to the second line flickers stops.

@EmmanuelLM
Copy link
Contributor

EmmanuelLM commented Apr 30, 2019 via email

@VivantSenior
Copy link
Author

VivantSenior commented Apr 30, 2019

Yeah, I have three of them. Two of them are in the same room. I have all lines connected but on line didn't had the load on it. After attaching simple bulb flickering stopped.

My idea was that maybe response on a ping from HA caused the flickering (drawing power). I don't know if this is more of a switch firmware issue than zigbee2mqtt...

@Koenkk
Copy link
Owner

Koenkk commented Apr 30, 2019

@VivantSenior it seems to be a hardware design issue: #943 (comment) #943 (comment)

@VivantSenior
Copy link
Author

VivantSenior commented May 13, 2019

image

@Koenkk, https://pastebin.com/raw/Ji72Rkfp. Do you need debug info?

@Koenkk
Copy link
Owner

Koenkk commented May 14, 2019

Could you sniff the zigbee traffic when failed to ping happens? (http://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html)

@VivantSenior
Copy link
Author

zigbee2mqtt:debug 5/30/2019, 12:45:52 PM Ping 0x00...1 (basic)
zigbee2mqtt:debug 5/30/2019, 12:45:52 PM Ping 0x00...2 (basic)
zigbee2mqtt:debug 5/30/2019, 12:45:52 PM Ping 0x00...3 (basic)

I'm a bit confused right now... I have restarted Zigbee2Mqtt HA addon several times (to allow join few new battery devices). I will monitor the logs for the "Failed to ping" error.

Weird part is that despite the error I was able turn on/off switches remotely.

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

4 participants