core icon indicating copy to clipboard operation
core copied to clipboard

Some Deconz sensors are unavailable in HA, active in Deconz

Open Remc000tje opened this issue 2 years ago • 22 comments

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.

Remc000tje avatar Nov 03 '22 11:11 Remc000tje

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)

home-assistant[bot] avatar Nov 03 '22 11:11 home-assistant[bot]

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

Kane610 avatar Nov 03 '22 15:11 Kane610

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

Remc000tje avatar Nov 03 '22 16:11 Remc000tje

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

Kane610 avatar Nov 03 '22 17:11 Kane610

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.

AddeFr avatar Nov 03 '22 19:11 AddeFr

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

Kane610 avatar Nov 03 '22 19:11 Kane610

Deconz.txt Attaching Deconz log.

AddeFr avatar Nov 03 '22 20:11 AddeFr

Deconz.txt Attaching Deconz log.

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

Kane610 avatar Nov 03 '22 20:11 Kane610

Sorry, but how do I enable debug logging?

AddeFr avatar Nov 03 '22 20:11 AddeFr

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'

MatKennel avatar Nov 03 '22 20:11 MatKennel

@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

Kane610 avatar Nov 03 '22 20:11 Kane610

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

MatKennel avatar Nov 03 '22 21:11 MatKennel

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.

Kane610 avatar Nov 03 '22 21:11 Kane610

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.

hindenber9 avatar Nov 05 '22 15:11 hindenber9

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 :)

Kane610 avatar Nov 05 '22 17:11 Kane610

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

hindenber9 avatar Nov 05 '22 18:11 hindenber9

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 avatar Nov 05 '22 19:11 Kane610

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

Kane610 avatar Nov 05 '22 20:11 Kane610

@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

Kane610 avatar Nov 05 '22 20:11 Kane610

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. :-(

vukisz avatar Nov 07 '22 14:11 vukisz

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

Kane610 avatar Nov 07 '22 16:11 Kane610

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

vukisz avatar Nov 07 '22 16:11 vukisz

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

Prior99 avatar Nov 08 '22 09:11 Prior99

@homeassistant @Kane610 I have the same issue.

  • xiaomi Luminance sensor - not responding
  • Aqara Multi Sensor - not responding Basically the same issue as everyone else is reporting.

jtihonov avatar Nov 08 '22 10:11 jtihonov

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

Kane610 avatar Nov 08 '22 14:11 Kane610

You guys are awesome.

Prior99 avatar Nov 08 '22 15:11 Prior99

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

jtihonov avatar Nov 08 '22 16:11 jtihonov

@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 avatar Nov 08 '22 16:11 Kane610

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

Kane610 avatar Nov 10 '22 08:11 Kane610

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

vukisz avatar Nov 10 '22 09:11 vukisz