zha-device-handlers: pzem-004t not working with zha
Describe the bug
I am using cc2530 with pzem-004t v3 with PTVO configurable firmware in the home assistant using this custom quirk
pzem004t.py.txt but no entites showing in zha dashboard
To Reproduce Steps to reproduce the behavior:
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behavior
power monitering entites,the screem short show the expected entites

Screenshots
my zha dashbord with no entites
PTVO firmware configeration

Device Signature
{
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle: 136>, manufacturer_code=4447, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=0, maximum_outgoing_transfer_size=160, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=True, *is_router=False, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0xfffe",
"in_clusters": [
"0x0000",
"0x000c",
"0x0014"
],
"out_clusters": [
"0x0000"
]
}
},
"manufacturer": "ptvo.info",
"model": "ptvo.switch",
"class": "zigpy.device.Device"
}
Diagnostic information
{
"home_assistant": {
"installation_type": "Home Assistant Container",
"version": "2022.9.7",
"dev": false,
"hassio": false,
"virtualenv": false,
"python_version": "3.10.5",
"docker": true,
"arch": "x86_64",
"timezone": "UTC",
"os_name": "Linux",
"os_version": "5.18.0-kali7-amd64",
"run_as_root": true
},
"custom_components": {},
"integration_manifest": {
"domain": "zha",
"name": "Zigbee Home Automation",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/zha",
"requirements": [
"bellows==0.33.1",
"pyserial==3.5",
"pyserial-asyncio==0.6",
"zha-quirks==0.0.79",
"zigpy-deconz==0.18.1",
"zigpy==0.50.3",
"zigpy-xbee==0.15.0",
"zigpy-zigate==0.9.2",
"zigpy-znp==0.8.2"
],
"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"
]
}
],
"codeowners": [
"@dmulcahey",
"@adminiuga",
"@puddly"
],
"zeroconf": [
{
"type": "_esphomelib._tcp.local.",
"name": "tube*"
},
{
"type": "_zigate-zigbee-gateway._tcp.local.",
"name": "*zigate*"
}
],
"dependencies": [
"file_upload"
],
"after_dependencies": [
"onboarding",
"usb",
"zeroconf"
],
"iot_class": "local_polling",
"loggers": [
"aiosqlite",
"bellows",
"crccheck",
"pure_pcapy3",
"zhaquirks",
"zigpy",
"zigpy_deconz",
"zigpy_xbee",
"zigpy_zigate",
"zigpy_znp"
],
"is_built_in": true
},
"data": {
"ieee": "**REDACTED**",
"nwk": 34,
"manufacturer": "ptvo.info",
"model": "ptvo.switch",
"name": "ptvo.info ptvo.switch",
"quirk_applied": false,
"quirk_class": "zigpy.device.Device",
"manufacturer_code": 4447,
"power_source": "Battery or Unknown",
"lqi": 84,
"rssi": null,
"last_seen": "2022-10-21T18:21:57",
"available": true,
"device_type": "EndDevice",
"signature": {
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle: 136>, manufacturer_code=4447, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=0, maximum_outgoing_transfer_size=160, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=True, *is_router=False, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0xfffe",
"in_clusters": [
"0x0000",
"0x000c",
"0x0014"
],
"out_clusters": [
"0x0000"
]
}
}
},
"active_coordinator": false,
"entities": [],
"neighbors": [],
"endpoint_names": [
{
"name": "undefined_0xfffe"
}
],
"user_given_name": null,
"device_reg_id": "049629de53bc6753e6e007adbc3e7238",
"area_id": null,
"cluster_details": {
"1": {
"device_type": {
"name": "undefined_0xfffe",
"id": 65534
},
"profile_id": 260,
"in_clusters": {
"0x0000": {
"endpoint_attribute": "basic",
"attributes": {
"0x0004": {
"attribute_name": "manufacturer",
"value": "ptvo.info"
},
"0x0005": {
"attribute_name": "model",
"value": "ptvo.switch"
}
},
"unsupported_attributes": {}
},
"0x0014": {
"endpoint_attribute": "multistate_value",
"attributes": {},
"unsupported_attributes": {}
},
"0x000c": {
"endpoint_attribute": "analog_input",
"attributes": {},
"unsupported_attributes": {}
}
},
"out_clusters": {
"0x0000": {
"endpoint_attribute": "basic",
"attributes": {},
"unsupported_attributes": {}
}
}
}
}
}
}
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 31 (4 by maintainers)
Looks like you are using the quirk from my repository https://github.com/glcos/pzem004t Please notice that in order for this quirk to work you need to use the exact PTVO GUI settings as shown in my repository, otherwise the quirk signature is not recognized by ZHA and the quirk ignored. I have uploaded the latest version of the quirk I’m using with current Home Assistant release, please use that one instead. Also notice that my device is running a PTVO firmare which is quite old, the latest version might have other differences that require adjusting the quirk.
@delta010 looking again at what you have provided it seems that your device is not sending the chip temperature value. This is expected by the quirk, therefore the signature will not match if the temperature value is not sent by the device. You can try to enable the temperature on the PTVO firmware GUI and see if the issue persists
In addition, if you are using the latest version of the quirk, please set “CSRLabs” as the manufacturer name otherwise it will not match