home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.59k stars 29.91k forks source link

Some Deconz sensors are unavailable in HA, active in Deconz #81469

Closed Remc000tje closed 1 year ago

Remc000tje commented 1 year ago

The problem

I have several Sonoff temperature sensors. After upgrade I lost half of the sensors in HA, while they are still active in Deconz / Phoscon.

What version of Home Assistant Core has the issue?

2022.11.0

What was the last working version of Home Assistant Core?

2022.10.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Deconz

Link to integration documentation on our website

https://www.home-assistant.io/integrations/deconz

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

nope

Additional information

after returning to 2022.10.5 without touching Deconz or anything, all sensors where online.

home-assistant[bot] commented 1 year ago

Hey there @kane610, mind taking a look at this issue as it has been labeled with an integration (deconz) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `deconz` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign deconz` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


deconz documentation deconz source (message by IssueLinks)

Kane610 commented 1 year ago

Ok. I'm gonna need a lot more information. What sensors are not working what devices do they belong to. What version of deconz are you running. How are you running deconz. Are there any errors in the log?

Can you enable debug logging and share full startup logs of home assistant so I can look at the device description

Remc000tje commented 1 year ago

I've just got everything in working order again after this update I reversed. half of these Identical devices were n't available. image

in Deconz/Phoscon they did and still do exist.

image

image image

so Deconz had no issue, but it seems if only 3 Sonoff temp were picked-up in HA. All Aqara temp sensors were okay.

after reversing installation everything went back to normal.

the only difference I see is:

image image

Kane610 commented 1 year ago

I've just got everything in working order again after this update I reversed. half of these Identical devices were n't available. image

in Deconz/Phoscon they did and still do exist.

image

image image

so Deconz had no issue, but it seems if only 3 Sonoff temp were picked-up in HA. All Aqara temp sensors were okay.

after reversing installation everything went back to normal.

the only difference I see is:

image image

This is all from 2022.10? I need data from the faulty upgrade

AddeFr commented 1 year ago

I have the same problem with 2022.11.0 and 2022.11.1. Aqara/Xiaomi multi sensors work in Deconz but not in HA. I get this in HA log: 2022-11-03 20:23:19.180 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up deconz platform for sensor. Zigbee lights and switches are working in HA.

Kane610 commented 1 year ago

I have the same problem with 2022.11.0 and 2022.11.1. Aqara/Xiaomi multi sensors work in Deconz but not in HA. I get this in HA log: 2022-11-03 20:23:19.180 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up deconz platform for sensor. Zigbee lights and switches are working in HA. Can you share more info? Like the full printout in the logs. You can also enable debugging of the deConz integration and share the full startup log

AddeFr commented 1 year ago

Deconz.txt Attaching Deconz log.

Kane610 commented 1 year ago

Deconz.txt Attaching Deconz log.

Thanks! But I need debug logs for deconz integration on home assistant side

AddeFr commented 1 year ago

Sorry, but how do I enable debug logging?

MatKennel commented 1 year ago

Similar problem on my side, Unfortunateky so many private information in the logs that I cannot share but here some more info:

2022-11-03 21:36:13.372 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up deconz platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/deconz/sensor.py", line 300, in async_setup_entry
    gateway.register_platform_add_device_callback(
  File "/usr/src/homeassistant/homeassistant/components/deconz/gateway.py", line 173, in register_platform_add_device_callback
    async_add_device(EventType.ADDED, device_id)
  File "/usr/src/homeassistant/homeassistant/components/deconz/gateway.py", line 163, in async_add_device
    add_device_callback(EventType.ADDED, device_id)
  File "/usr/src/homeassistant/homeassistant/components/deconz/sensor.py", line 271, in async_add_sensor
    if description.value_fn(sensor) is None:
  File "/usr/src/homeassistant/homeassistant/components/deconz/sensor.py", line 126, in <lambda>
    value_fn=lambda device: device.scaled_consumption,
  File "/usr/local/lib/python3.10/site-packages/pydeconz/models/sensor/consumption.py", line 36, in scaled_consumption
    return self.consumption / 1000
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
Kane610 commented 1 year ago

@MatKennel would you enable debug printing for deconz integration from deconz integration documentation and share that privately with me? set default logging to error.

Looking at your error I feel that the issue in this case might be on deconz side, consumption should be the primary value of a consumption sensor and should never be None

MatKennel commented 1 year ago

home-assistant.log good remark to set all to error, now it is okay

Kane610 commented 1 year ago

home-assistant.log good remark to set all to error, now it is okay

I have my moments. Thanks for the logs

As far as I can read out 'state': {'consumption': None, 'lastupdated': 'none'}, My code doesn't handle this situation right now, I have written to deconz devs to understand the situation as according to the documentation consumption should always be a number.

I'll try to resolve this tomorrow, preferably I also get better data on the other issues and can resolve them in a similar timely matter.

hindenber9 commented 1 year ago

Same here. Half of my Xiaomi sensors (lumi.sensor_ht and lumi.weather) gone in deconz integration since updating from core 2022.10.5 to 2022.11. In Phoscon Web App (running as HA deconz addon) all sensors are visible and deliver valid and current data.

Kane610 commented 1 year ago

Same here. Half of my Xiaomi sensors (lumi.sensor_ht and lumi.weather) gone in deconz integration since updating from core 2022.10.5 to 2022.11. In Phoscon Web App (running as HA deconz addon) all sensors are visible and deliver valid and current data.

Hello. No need to continue the reporting. It is known that the issue exist. What I need is help with logs to understand why the issue occurs :)

hindenber9 commented 1 year ago

Same here. Half of my Xiaomi sensors (lumi.sensor_ht and lumi.weather) gone in deconz integration since updating from core 2022.10.5 to 2022.11. In Phoscon Web App (running as HA deconz addon) all sensors are visible and deliver valid and current data.

Hello. No need to continue the reporting. It is known that the issue exist. What I need is help with logs to understand why the issue occurs :)

home-assistant.log

Kane610 commented 1 year ago

Same here. Half of my Xiaomi sensors (lumi.sensor_ht and lumi.weather) gone in deconz integration since updating from core 2022.10.5 to 2022.11. In Phoscon Web App (running as HA deconz addon) all sensors are visible and deliver valid and current data.

Hello. No need to continue the reporting. It is known that the issue exist. What I need is help with logs to understand why the issue occurs :)

home-assistant.log

Thank you! Could you tell me which devices doesn't work for you?

edit

NVM I saw you have the same issue as Mat which is resolved and marked to be released with 2022.11.2

Kane610 commented 1 year ago

@MatKennel I put up a PR to fix your issue. (aaand it's merged... marked for 2022.11.2 release)

Kane610 commented 1 year ago

@AddeFr as you wrote that the sensor platform didn't setup properly I think your issue is the same as MatKennel and hindenber9 and thus should be resolved with 2022.11.2 release

vukisz commented 1 year ago

I cannot recall what I had prior 2022.11.2 (last update was on nov 3). But after 2022.11.2 half of my sensors are not available. I can see them in phoscon, but not in HA. :-(

Kane610 commented 1 year ago

I cannot recall what I had prior 2022.11.2 (last update was on nov 3). But after 2022.11.2 half of my sensors are not available. I can see them in phoscon, but not in HA. :-(

2022.11.2 is not yet released

vukisz commented 1 year ago

Maybe my mistake. Anyway rolled back to 2022.10.2 and all sensors started working :-)

Prior99 commented 1 year ago

When can we expect the 2022.11.2 release? This is a big problem for me as I control my heating via these sensors.

jtihonov commented 1 year ago

@homeassistant @Kane610 I have the same issue.

Kane610 commented 1 year ago

When can we expect the 2022.11.2 release? This is a big problem for me as I control my heating via these sensors.

It's being processed right now so should be out within a few hours I think

Prior99 commented 1 year ago

You guys are awesome.

jtihonov commented 1 year ago

@Kane610 Wow. That's really like if I had a premium subscription, not community :D :D :D

Kane610 commented 1 year ago

@Kane610 Wow. That's really like if I had a premium subscription, not community :D :D :D

I'm not really involved in the release process but yes its typically a well oiled machine :)

Kane610 commented 1 year ago

Any feedback on the fix. Does it resolve this issue, can I close it?

vukisz commented 1 year ago

2022.11.2 resolved for me. Thank you! Silver lining of this issue: changed battery for most of the sensors, as though that they are unavailable because ran out of juice :D

AddeFr commented 1 year ago

Yes, solved for me too. Thanks'!

Kane610 commented 1 year ago

Thank you both for verifying. Closing this as completed.

Remc000tje commented 1 year ago

also here everything in working order

Kane610 commented 1 year ago

also here everything in working order

Thanks!

Guenni75 commented 1 year ago

ähhhhh..... NO. I am working since 5 hours on this f...ing deCONZ things and nothing works. The aqara tempsensors (4 pcs) disappeared after a restart and only the aqara p1 motion sensor is showen if i add the deCONZ integration to HA. In Phoscon all sensors (5 pcs) are working. Befor i used ZHA and the tempsensors were working, but i can't get the motion sensor to work.

Home Assistant 2022.11.5 deCONZ 6.17.0

Kane610 commented 1 year ago

ähhhhh..... NO. I am working since 5 hours on this f...ing deCONZ things and nothing works. The aqara tempsensors (4 pcs) disappeared after a restart and only the aqara p1 motion sensor is showen if i add the deCONZ integration to HA. In Phoscon all sensors (5 pcs) are working. Befor i used ZHA and the tempsensors were working, but i can't get the motion sensor to work.

Home Assistant 2022.11.5 deCONZ 6.17.0

Please open a new issue. This particular issue has been resolved