Hi to all.
On March 11, 2023, the device stopped counting energy. The entity “sensor.licznik_summation_delivered” became unavailable. Up until that moment, everything had been working fine for several months. In the logs, I have the following error message:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/uart.py", line 84, in data_received
self._api.data_received(frame)
File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/api.py", line 373, in data_received
getattr(self, f"_handle_{command.name}")(data)
File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/api.py", line 505, in _handle_aps_data_indication
self._app.handle_rx(
File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 430, in handle_rx
self.packet_received(
File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 875, in packet_received
self.handle_message(
File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 381, in handle_message
return sender.handle_message(
File "/usr/local/lib/python3.10/site-packages/zigpy/device.py", line 370, in handle_message
self.endpoints[src_ep].handle_message(
File "/usr/local/lib/python3.10/site-packages/zigpy/endpoint.py", line 224, in handle_message
handler(hdr, args, dst_addressing=dst_addressing)
File "/usr/local/lib/python3.10/site-packages/zigpy/zcl/__init__.py", line 373, in handle_message
self.handle_cluster_request(hdr, args, dst_addressing=dst_addressing)
File "/usr/local/lib/python3.10/site-packages/zhaquirks/tuya/__init__.py", line 494, in handle_cluster_request
zvalue = ztype(tuya_data)
File "/usr/local/lib/python3.10/site-packages/zigpy/types/basic.py", line 96, in __new__
raise ValueError(
ValueError: 72071 is not an unsigned 16 bit integer
The number 72071 corresponds to the current reading of the meter, which is 720.71 kWh. "I tried to pair the device again, restore a backup from the beginning of March, as well as install on a clean installation.
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2023.4.6",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.10.10",
"docker": true,
"arch": "x86_64",
"timezone": "Europe/Warsaw",
"os_name": "Linux",
"os_version": "6.1.24",
"supervisor": "2023.04.0",
"host_os": "Home Assistant OS 10.0",
"docker_version": "23.0.3",
"chassis": "vm",
"run_as_root": true
},
"custom_components": {
"xiaomi_gateway3": {
"version": "3.2.1",
"requirements": [
"zigpy>=0.44.1"
]
},
"ble_monitor": {
"version": "11.9.0",
"requirements": [
"pycryptodomex>=3.14.1",
"janus>=1.0.0",
"aioblescan>=0.2.14",
"btsocket>=0.2.0",
"pyric>=0.1.6.3"
]
},
"better_thermostat": {
"version": "1.0.2",
"requirements": []
},
"hacs": {
"version": "1.32.1",
"requirements": [
"aiogithubapi>=22.10.1"
]
},
"xiaomi_miot": {
"version": "0.7.7",
"requirements": [
"construct==2.10.56",
"python-miio>=0.5.6",
"micloud>=0.3"
]
}
},
"integration_manifest": {
"domain": "zha",
"name": "Zigbee Home Automation",
"after_dependencies": [
"onboarding",
"usb"
],
"codeowners": [
"@dmulcahey",
"@adminiuga",
"@puddly"
],
"config_flow": true,
"dependencies": [
"file_upload"
],
"documentation": "https://www.home-assistant.io/integrations/zha",
"iot_class": "local_polling",
"loggers": [
"aiosqlite",
"bellows",
"crccheck",
"pure_pcapy3",
"zhaquirks",
"zigpy",
"zigpy_deconz",
"zigpy_xbee",
"zigpy_zigate",
"zigpy_znp"
],
"requirements": [
"bellows==0.35.1",
"pyserial==3.5",
"pyserial-asyncio==0.6",
"zha-quirks==0.0.97",
"zigpy-deconz==0.20.0",
"zigpy==0.54.1",
"zigpy-xbee==0.17.0",
"zigpy-zigate==0.10.3",
"zigpy-znp==0.10.0"
],
"usb": [
{
"vid": "10C4",
"pid": "EA60",
"description": "*2652*",
"known_devices": [
"slae.sh cc2652rb stick"
]
},
{
"vid": "1A86",
"pid": "55D4",
"description": "*sonoff*plus*",
"known_devices": [
"sonoff zigbee dongle plus v2"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*sonoff*plus*",
"known_devices": [
"sonoff zigbee dongle plus"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*tubeszb*",
"known_devices": [
"TubesZB Coordinator"
]
},
{
"vid": "1A86",
"pid": "7523",
"description": "*tubeszb*",
"known_devices": [
"TubesZB Coordinator"
]
},
{
"vid": "1A86",
"pid": "7523",
"description": "*zigstar*",
"known_devices": [
"ZigStar Coordinators"
]
},
{
"vid": "1CF1",
"pid": "0030",
"description": "*conbee*",
"known_devices": [
"Conbee II"
]
},
{
"vid": "10C4",
"pid": "8A2A",
"description": "*zigbee*",
"known_devices": [
"Nortek HUSBZB-1"
]
},
{
"vid": "0403",
"pid": "6015",
"description": "*zigate*",
"known_devices": [
"ZiGate+"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*zigate*",
"known_devices": [
"ZiGate"
]
},
{
"vid": "10C4",
"pid": "8B34",
"description": "*bv 2010/10*",
"known_devices": [
"Bitron Video AV2010/10"
]
}
],
"zeroconf": [
{
"type": "_esphomelib._tcp.local.",
"name": "tube*"
},
{
"type": "_zigate-zigbee-gateway._tcp.local.",
"name": "*zigate*"
},
{
"type": "_zigstar_gw._tcp.local.",
"name": "*zigstar*"
},
{
"type": "_slzb-06._tcp.local.",
"name": "slzb-06*"
}
],
"is_built_in": true
},
"data": {
"ieee": "**REDACTED**",
"nwk": 30556,
"manufacturer": "_TZE200_ewxhg6o9",
"model": "TS0601",
"name": "_TZE200_ewxhg6o9 TS0601",
"quirk_applied": true,
"quirk_class": "zhaquirks.tuya.ts0601_din_power.TuyaPowerMeter",
"manufacturer_code": 4098,
"power_source": "Mains",
"lqi": 255,
"rssi": -57,
"last_seen": "2023-04-24T10:56:19",
"available": true,
"device_type": "Router",
"signature": {
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0051",
"in_clusters": [
"0x0000",
"0x0004",
"0x0005",
"0x0006",
"0x0702",
"0x0b04",
"0xef00"
],
"out_clusters": [
"0x000a",
"0x0019"
]
}
}
},
"active_coordinator": false,
"entities": [
{
"entity_id": "sensor.licznik_active_power",
"name": "_TZE200_ewxhg6o9 TS0601"
},
{
"entity_id": "sensor.licznik_rms_current",
"name": "_TZE200_ewxhg6o9 TS0601"
},
{
"entity_id": "sensor.licznik_rms_voltage",
"name": "_TZE200_ewxhg6o9 TS0601"
},
{
"entity_id": "sensor.licznik_power_factor",
"name": "_TZE200_ewxhg6o9 TS0601"
},
{
"entity_id": "switch.licznik_switch",
"name": "_TZE200_ewxhg6o9 TS0601"
}
],
"neighbors": [
{
"device_type": "Coordinator",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x0000",
"permit_joining": "Unknown",
"depth": "0",
"lqi": "189"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x0543",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "160"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x0E9F",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "168"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x1B73",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "112"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x3490",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "136"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x3F95",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "168"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x45D3",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "142"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x7CA1",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "98"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xAB37",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "155"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xC403",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "145"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xCD5A",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "142"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Parent",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xE3D4",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "220"
}
],
"routes": [
{
"dest_nwk": "0x0000",
"route_status": "Active",
"memory_constrained": false,
"many_to_one": true,
"route_record_required": false,
"next_hop": "0x0000"
},
{
"dest_nwk": "0x341B",
"route_status": "Active",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xE3D4"
},
{
"dest_nwk": "0xC403",
"route_status": "Active",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xE3D4"
},
{
"dest_nwk": "0xBF3D",
"route_status": "Active",
"memory_constrained": false,
"many_to_one": false,
"route_record_required": false,
"next_hop": "0xBF3D"
}
],
"endpoint_names": [
{
"name": "SMART_PLUG"
}
],
"user_given_name": "Licznik",
"device_reg_id": "5bc7f83e8f33ec763055592478e0cfd7",
"area_id": "korytarz",
"cluster_details": {
"1": {
"device_type": {
"name": "SMART_PLUG",
"id": 81
},
"profile_id": 260,
"in_clusters": {
"0x0000": {
"endpoint_attribute": "basic",
"attributes": {
"0x0001": {
"attribute_name": "app_version",
"value": 68
},
"0x0004": {
"attribute_name": "manufacturer",
"value": "_TZE200_ewxhg6o9"
},
"0x0005": {
"attribute_name": "model",
"value": "TS0601"
}
},
"unsupported_attributes": {}
},
"0x0004": {
"endpoint_attribute": "groups",
"attributes": {},
"unsupported_attributes": {
"0xfffe": {
"attribute_name": "attr_reporting_status"
}
}
},
"0x0005": {
"endpoint_attribute": "scenes",
"attributes": {},
"unsupported_attributes": {}
},
"0xef00": {
"endpoint_attribute": "tuya_manufacturer",
"attributes": {
"0x0212": {
"attribute_name": "current",
"value": 932
},
"0x0213": {
"attribute_name": "power",
"value": 1113
},
"0x0214": {
"attribute_name": "voltage",
"value": 2351
},
"0x0101": {
"attribute_name": "switch",
"value": 1
}
},
"unsupported_attributes": {}
},
"0x0b04": {
"endpoint_attribute": "electrical_measurement",
"attributes": {
"0x0400": {
"attribute_name": "ac_frequency_multiplier",
"value": 1
},
"0x0401": {
"attribute_name": "ac_frequency_divisor",
"value": 100
},
"0x0505": {
"attribute_name": "rms_voltage",
"value": 235.1
},
"0x0508": {
"attribute_name": "rms_current",
"value": 932
},
"0x050b": {
"attribute_name": "active_power",
"value": 111.3
},
"0x0602": {
"attribute_name": "ac_current_multiplier",
"value": 1
},
"0x0603": {
"attribute_name": "ac_current_divisor",
"value": 1000
}
},
"unsupported_attributes": {
"0x0600": {
"attribute_name": "ac_voltage_multiplier"
},
"0x0601": {
"attribute_name": "ac_voltage_divisor"
},
"0x0000": {
"attribute_name": "measurement_type"
},
"0x0403": {
"attribute_name": "power_divisor"
},
"0x0604": {
"attribute_name": "ac_power_multiplier"
},
"0x0605": {
"attribute_name": "ac_power_divisor"
},
"0x0402": {
"attribute_name": "power_multiplier"
},
"0x0507": {
"attribute_name": "rms_voltage_max"
},
"0x0300": {
"attribute_name": "ac_frequency"
},
"0x050a": {
"attribute_name": "rms_current_max"
},
"0x0302": {
"attribute_name": "ac_frequency_max"
},
"0x050d": {
"attribute_name": "active_power_max"
},
"0x050f": {
"attribute_name": "apparent_power"
}
}
},
"0x0702": {
"endpoint_attribute": "smartenergy_metering",
"attributes": {
"0x0300": {
"attribute_name": "unit_of_measure",
"value": 0
}
},
"unsupported_attributes": {
"0x0400": {
"attribute_name": "instantaneous_demand"
},
"0x0301": {
"attribute_name": "multiplier"
},
"0x0302": {
"attribute_name": "divisor"
},
"0x0303": {
"attribute_name": "summation_formatting"
},
"0x0304": {
"attribute_name": "demand_formatting"
},
"0x0306": {
"attribute_name": "metering_device_type"
},
"0x0000": {
"attribute_name": "current_summ_delivered"
},
"0x0100": {
"attribute_name": "current_tier1_summ_delivered"
},
"0x0102": {
"attribute_name": "current_tier2_summ_delivered"
},
"0x0104": {
"attribute_name": "current_tier3_summ_delivered"
},
"0x0106": {
"attribute_name": "current_tier4_summ_delivered"
},
"0x0108": {
"attribute_name": "current_tier5_summ_delivered"
},
"0x010a": {
"attribute_name": "current_tier6_summ_delivered"
},
"0x0200": {
"attribute_name": "status"
}
}
},
"0x0006": {
"endpoint_attribute": "on_off",
"attributes": {
"0x0000": {
"attribute_name": "on_off",
"value": 1
}
},
"unsupported_attributes": {
"0x0000": {
"attribute_name": "on_off"
},
"0x4003": {
"attribute_name": "start_up_on_off"
}
}
}
},
"out_clusters": {
"0x000a": {
"endpoint_attribute": "time",
"attributes": {},
"unsupported_attributes": {}
},
"0x0019": {
"endpoint_attribute": "ota",
"attributes": {},
"unsupported_attributes": {}
}
}
}
}
}
}