Closed hellcry37 closed 4 years ago
Hey there @dmulcahey, @adminiuga, mind taking a look at this issue as its been labeled with an integration (zha
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
Can you post Zigbee signature of the device with the issue? Config panel -> device -> Zigbee signature
want to help, but can't find it, can you be more specific please?
I don't have this path: Config panel -> device -> Zigbee signature
I do have: Configuration -> Devices -> List of all devices (could not find any zigbee signature) Configuration -> Zigbee Home Automation -> list of all zigbee devices i have (could not find any zigbee signature)
I observed that from 2 x Heiman Zigbee Power Metering Plug HS2SK-E-EU only one has this issue: TV and AC are both using same type of plug, as you can see in image one works ok (TV) and one not (AC) after restarting
doh, yep, it should be Config Panel -> ZHA -> pick your device from the drop down -> Zigbee signature
The url is not opening. Can you just post it here between tripple backticks -- ```
url with the image:
https://ibb.co/FW3kVjV
url with what i see when i open the device in question:
https://ibb.co/ZSyZJ6R
from https://ibb.co/ZSyZJ6R need the output of "zigbee information"
The device with issue:
{
"node_descriptor": "<NodeDescriptor byte1=1 byte2=64 mac_capability_flags=142 manufacturer_code=4619 maximum_buffer_size=82 maximum_incoming_transfer_size=82 server_mask=10752 maximum_outgoing_transfer_size=82 descriptor_capability_field=0>",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0051",
"in_clusters": [
"0x0000",
"0x0003",
"0x0004",
"0x0006",
"0x0009",
"0x0702",
"0x0b04"
],
"out_clusters": [
"0x0003",
"0x0019"
]
}
},
"manufacturer": "Heiman",
"model": "SmartPlug",
"class": "zigpy.device.Device"
}
the device that works ok
{
"node_descriptor": "<NodeDescriptor byte1=1 byte2=64 mac_capability_flags=142 manufacturer_code=4619 maximum_buffer_size=82 maximum_incoming_transfer_size=82 server_mask=10752 maximum_outgoing_transfer_size=82 descriptor_capability_field=0>",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0051",
"in_clusters": [
"0x0000",
"0x0003",
"0x0004",
"0x0006",
"0x0009",
"0x0702",
"0x0b04"
],
"out_clusters": [
"0x0003",
"0x0019"
]
}
},
"manufacturer": "Heiman",
"model": "SmartPlug",
"class": "zigpy.device.Device"
}
From what I see nothing is different.
Would you be able to try changes in https://github.com/Adminiuga/home-assistant/commit/59bc7f80c71002af84d46662584e34cf1db751b3 ?
will do, check back when is done. Right now before any changes: divisor = 10000 multiplier = 1
OK I've put your changes in smartenergy.py, I've managed to reproduce again after 4 restarts, values of: divisor = 10000 multiplier = 1 when the issue is "in effect"
What else I can try, for now I did not restart so the bug still happens
what's the entity id of the entity with the issue? Just want to confirm the issues is with 0x0702 channel and not 0x0b04
I'm going to need debug enabled (see zha docs troubleshooting) and then the logs from the reset when the issue is occuring and need to know the NWK address of the device with the issue
You can filter debug log, just make sure the following components are in the log:
I've just put this in my configuration.yaml
logger:
default: info
logs:
homeassistant.core: debug
homeassistant.components.zha: debug
# bellows.zigbee.application: debug
# bellows.ezsp: debug
zigpy: debug
# zigpy_cc: debug
# zigpy_deconz.zigbee.application: debug
zigpy_deconz.api: debug
zigpy_deconz: debug
# zigpy_xbee.zigbee.application: debug
# zigpy_xbee.api: debug
# zigpy_zigate: debug
# zhaquirks: debug
Restarted home assistant, fortunately issue was reproduced on the first try, unfortunately logs are empty.
What I am doing wrong?
Nwk: 0x393f - device with issue Nwk: 0xc9ff - device without issue
I did a few restarts, i can say that bug happen on all of them, smartenergy.py is still the modified version, did not change it back, still no logs. ZHA logs will appear in home assistant log or in other place?
you don't have home-assistant.log
in your config folder?
ps: uncomment zigpy_deconz.zigbee.application
in the logger config
i do, home-assistant.log is there but empty
Ah no my apologize, log has a lot of data, just ha doesn't show it Logs coming soon just have to reproduce the bug, doing restarts :)
Yah now the second plug shows the wrong value and the first one is ok :) log is to big, cant paste it, what do you need in it, I'll search and paste it
log.txt log attached (in this log TV one shows the wrong value not AC one)
if in a linux shell, you could do egrep -e 'homeassistant.core|zha|zigpy|deconz' home-assistant.log > filtered-log.txt
and DM or post a link
for the attached log, is the Nwk: 0x393f still the device with the issue?
nop, is the other one :)
for all devices with the issue, after the HA was running for about 20min, read the multiplier and divisor to seed the cache.
ok will do a few more restarts, wait and i'll be back in 20 minutes
managed to make again device with nwk 0x393f to bug. - this is wrong seem that is still Nwk: 0xc9ff with issue
log attached: log_issue_device_nwk_0x393f.txt
Waiting for that 20 minutes to read the values asked
from the 1st debug log you submitted, is it the sensor.heiman_smartplug_2_smartenergy_metering
entity_id having the issue or is it the other one on 0x0b04 cluster entity_id=sensor.heiman_smartplug_2_electrical_measurement
?
first and second logs both show sensor.heiman_smartplug_2_electrical_measurement
electrical_measurement being the one with issues on both devices seems (the measure current consumption in Watts - https://en.wikipedia.org/wiki/Watt)
device: plug2 tv one Nwk: 0xc9ff divisor: 10000 multiplier: 1 Nothing changed
My tv shows it consumes now 682 Watts :)
ok, so this is the other one, the one on 0x0b04 cluster
at the beginning was plug1 AC that had issues, now is plug2 TV with issues, no idea where to get this 0x0b04.
Both logs sent show issue on plug2 tv
on metric cluster both devices have id: 0x0702
at the beginning was plug1 AC that had issues, now is plug2 TV with issues, no idea where to get this 0x0b04
just needed the entity_id (if it wasn't changed) then it would have the name of the cluster. those plugs have two different clusters which show energy use, one in kW other just W
Can you do the following:
await self.fetch_config(True)
and restart HA. as long as it reads those attrs at least once, it is going to keep cached values so the issue shouldn't occur.
plug2 TV - this one currently has the bug ac_power_divisor: 10 ac_power_multiplier: 1 power_divisor: None power_multiplier: None
plug1 AC - this one is ok at this moment ac_power_divisor: 10 ac_power_multiplier: 1 power_divisor: None power_multiplier: None
they are the same.
Doing the changes now and restart
after 6 restarts values of: ac_power_divisor: 10 ac_power_multiplier: 1 power_divisor: None power_multiplier: None
are the same, devices did not manifest the bug in any of the restarts
last change was await self.fetch_config(True) in homeautomation.py
I'll try a bit more tomorrow some restarts and come back with feedback, thanks @Adminiuga , unless you want me to try something else?
just give it a few more restarts tomorrow and report back. I'll submit a PR so it would make into next version.
this is continuation of https://github.com/home-assistant/core/issues/35919
everything works as expected after the two changes and many many restarts.
excellent, the fix should be in 0.112.0 release then.
The problem
The issue that I have is simple, sometimes when i restart Home Assistant the metric is exactly like it was here #36697 Basically it will show to me a consumption of 44W instead of 4.4W
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information
To fix this issue I have to restart Home Assistant one more time. This happens random, no errors of any kind in Home Assistant logs.
Used devices: Zigbee controller: ConBee II Zigbee device: Heiman Zigbee Power Metering Plug HS2SK-E-EU