core: IKEA devices unavailable after HA restart. Manufacturer set to 'unk_manufacturer'

The problem

IKEA devices such as Motion Sensors and SYMFONISK Sound Controller become unavailable when HA restarts. The manufacturer information become ‘unk_manufacturer’ and model changes to ‘unk_model’.

image

Environment

  • Home Assistant Core release with the issue: v0.113.1
  • Last working Home Assistant Core release (if known): N/A
  • Operating environment (OS/Container/Supervised/Core): Supervised
  • Integration causing this issue: ZHA
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml


Traceback/Error logs


Additional information

I’m using ZHA with a Conbee II. I have plenty of Xiaomi devices on my Zigbeen network in ZHA that do not have this issue. The only way I can restore these devices is by removing and readding them. The reconfigure function does not have any effect.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 52 (26 by maintainers)

Most upvoted comments

credits for finding and fixing this bug are really for @ abmantis

this is fixed in 0.116.0. BUT you have to remove all affected devices 1st in ZHA ui.

@dmulcahey the unk_model/unk_manufacturer is not because of restoring device as “unavailable”

2020-07-28 18:52:30 DEBUG (MainThread) [homeassistant.components.zha.core.gateway] [0xc0c9](LUMI lumi.sensor_motion.aq2) restored as 'unavailable', last seen: 5 days, 2:54:59 ago
2020-07-28 18:52:30 DEBUG (MainThread) [homeassistant.components.zha.core.gateway] [0xbf09](LUMI lumi.remote.b686opcn01) restored as 'unavailable', last seen: 4 days, 21:06:03 ago
2020-07-28 18:52:30 DEBUG (MainThread) [homeassistant.components.zha.core.gateway] [0x4330](Konke 3AFE28010402000D) restored as 'unavailable', last seen: 2 days, 4:49:23 ago
2020-07-28 18:52:30 DEBUG (MainThread) [homeassistant.components.zha.core.gateway] [0x95eb](LUMI lumi.switch.b1laus01) restored as 'unavailable', last seen: 2 days, 4:48:12 ago

image

yep, got your DB. The device is not completely saved into database. No endpoints, no clusters. Can you:

  1. copy that device’s IEEE into clip board
  2. remove device
  3. wait 30s and then call zha.remove service with ieee_address: the_ieee-addr_from_clipboard
  4. Restart HA and confirm the device is gone completely
  5. Join that device (make sure debug log is running) and send me the logs since the moment you clicked “add devices” on zha integration

~Looking through the startup logs it looks like several devices only restore one of the values from the database:~

2020-07-29 09:39:24 DEBUG (MainThread) [zigpy.appdb] [0x1605:1:0x0000] Attribute id: 4 value: LUMI
2020-07-29 09:39:24 DEBUG (MainThread) [zigpy.appdb] [0x3e9d:1:0x0000] Attribute id: 4 value: LUMI
2020-07-29 09:39:24 DEBUG (MainThread) [zigpy.appdb] [0x3e9d:1:0x0000] Attribute id: 5 value: lumi.plug
2020-07-29 09:39:24 DEBUG (MainThread) [zigpy.appdb] [0x0a2f:1:0x0000] Attribute id: 4 value: LUMI

2020-07-29 09:39:24 DEBUG (MainThread) [zigpy.appdb] [0xd82f:1:0x0000] Attribute id: 4 value: IKEA of Sweden
2020-07-29 09:39:24 DEBUG (MainThread) [zigpy.appdb] [0xd82f:1:0x0000] Attribute id: 5 value: TRADFRI bulb E27 WW 806lm
2020-07-29 09:39:24 DEBUG (MainThread) [zigpy.appdb] [0xa5bf:1:0x0000] Attribute id: 5 value: TRADFRI motion sensor
2020-07-29 09:39:24 DEBUG (MainThread) [zigpy.appdb] [0x9007:1:0x0000] Attribute id: 4 value: IKEA of Sweden
2020-07-29 09:39:24 DEBUG (MainThread) [zigpy.appdb] [0x9007:1:0x0000] Attribute id: 5 value: TRADFRI motion sensor

~Device 0x1605 is missing model, device 0xa5bf is missing manufacturer etc. There are more I just grabbed a few examples.~

Never mind these logged out of order and I didn’t notice on mobile 🤦🏻‍♂️