Closed jimmyeao closed 10 months ago
It seems to be another MmwRadarMotionGPP
device.
I suggest to you to follow the indications from here:
Probably it is not fully functional, but once applied we can obtain more information from the logs that still allow us to adjust the operation.
Unfortunately this does not work, ZHA is ignoring my custom quirks it seems
Logs are filling up with
2023-01-03 13:39:17.729 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe2f\x02\x00\x04\x00\x00\x00\x00'
2023-01-03 13:39:18.129 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe2g\x01\x00\x01\x01'
2023-01-03 13:39:18.599 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:18.800 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:19.000 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:19.202 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:19.402 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:19.602 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:19.802 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:20.002 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:20.203 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:20.403 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3\x01\x04\x00\x01\x01'
2023-01-03 13:39:20.810 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3e\x02\x00\x04\x00\x00\x00\x02'
2023-01-03 13:39:21.218 WARNING (MainThread) [zigpy.zcl] [0x86F6:1:0xef00] Unknown cluster command 2 b'\x00\xe3f\x02\x00\x04\x00\x00\x00\x00'
Pastebin of debug logs https://pastebin.com/CpiZRzy8
Ok, managed to get it added, it is only exposing Motion now, was expecting it to expose other settings and sensors.. sensor:
switch: Toggle the onboard LED On/Off
new Pastebin of debug logs https://pastebin.com/beN00bCZ
If you are using it, the MmwRadarMotionGPP
quirk should expose 4 entities:
I don't remember the AnalogInput value meaning. Not sure where comes from that LED switch.
Your device logs is reporting (in addition to the occupancy and analog entities) the next DP:
No one have mapped the DPs to their function.
- duration_of_attendance: How long was the room occupied in minutes
- duration_of_absence: How long was the room clear in minutes
Not sure if that are the meanings of the attributes. I believe that these attributes are the one of the u_to_o_delay
and o_to_u_delay
attributes (occupied <--> unoccupied):
Maybe these are the DP 101 and 102 (in seconds?) Would match with your observations?
You can try to update its values from the device view, 'Admin zigbee device', select MmwRadarManufCluster
cluster, select the attribute (ie: dp_101
)
First of all, read and write the current value. Then try to update with another value and check the behavior to understand the function.
- dp=101, value=23
- dp=102, value=0
- dp=103, value=True (Boolean=1)
No one have mapped the DPs to their function.
through testing I can see that dp_101 = occupied time dp_102 = unoccupied time I tried setting dp_103 to Bool.false, but get a service error when I try and write the value - I suspect this may be the LED setting though
edit, dp_103 is definitely the LED, confirmed by setting it through ZZigbee2mqtt then re-adding to ZHA and observing the value
Just to be sure, are the attributes mapped as?:
(Not sure here if they are pir
or infrared
, 24GHz doesn't seem to match any of both)
That would be my proposal for your device:
There would be a new switch for the led status. If not working, enable the debug logs and attach the relevant info.
Not sure about the AnalogInput
.
Edit: fix dp_type
The above quirk has the device detected with a switch, however the switch will not stay toggled, and does not affect the LED state. I don't think this bit is correct either:
dp_101 -> pir_o_to_u_delay
dp_102 -> pir_u_to_o_delay
the values are minutes (integer values, seem to max out at 60) I think the one you mention are related to sensitivity
Should this section have definitions for dp_101 - 103?
attributes. Update(
{
# ramdom attribute IDs
0xEF02: ("dp_2", t.uint32_t, True),
0xEF03: ("dp_3", t.uint32_t, True),
0xEF04: ("dp_4", t.uint32_t, True),
0xEF06: ("dp_6", t.enum8, True),
0xEF69: ("dp_105", t.enum8, True),
0xEF6A: ("dp_106", t.enum8, True),
0xEF6B: ("dp_107", t.enum8, True),
0xEF6C: ("dp_108", t.uint32_t, True),
}
)
Also device signature has changed?
{
"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=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, 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": "0x0107",
"in_clusters": [
"0x0000",
"0x0004",
"0x0005",
"0x0006",
"0x000c",
"0x0406",
"0xef00"
],
"out_clusters": [
"0x000a",
"0x0019"
]
},
"2": {
"profile_id": 260,
"device_type": "0x0107",
"in_clusters": [
"0x000c"
],
"out_clusters": []
},
"242": {
"profile_id": 41440,
"device_type": "0x0061",
"in_clusters": [],
"out_clusters": [
"0x0021"
]
}
},
"manufacturer": "_TZE200_v6ossqfy",
"model": "TS0601",
"class": "ts0601_mmwave.MmwRadarMotion_var03"
}
If I edit your quirk to add in DP_101 and DP_102, I can query those and see the correct integer values, not sure how I add to the quirk to expose those values back to HA though
Should this section have definitions for dp_101 - 103?
No if we want to expose as new entities.
These are attributes of the MmwRadarManufCluster
.
DP=103 is mapped to the switch here:
103: DPToAttributeMapping(
TuyaOnOff.ep_attribute,
"on_off",
dp_type=TuyaDPType.BOOL,
),
I have edit the code to fix the switch problem.
Looking for a way to expose the dp_102 and dp_103.
No direct way to get the values in HA. Analog input is only mapped for some devices:
Probably the way would by to create custom sensors just like these:
But that will require to create the quirk and then modify HA.
After looking at Z2M my final proposal would be:
If the quirk is working for you, then we can try to create the entities in HA.
That throws an error, just looking now
File "/config/custom_zha_quirks/ts0601_mmwave.py", line 32, in <module>
class MmwRadarManufCluster(TuyaMCUCluster):
File "/config/custom_zha_quirks/ts0601_mmwave.py", line 57, in MmwRadarManufCluster
103: DPToAttributeMapping(
TypeError: DPToAttributeMapping.__init__() got an unexpected keyword argument 'dp_type'
I have updated the import statement for the DPToAttributeMapping
class.
Appreciate all your help, however it still errors
I have updated the rest of dp_to_attribute
definitions.
Sorry for the troubles.
No need to apologise :) the file is working now, but still the same issue with the toggle button
Could you attach the log error?
All the dp_type
must had been fixed already.
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A clear and concise description of what you want to happen. _TZE200_v6ossqfy mmwave sensor is detected as a plug this is a MMwave sensor https://zigbee.blakadder.com/Tuya_PS-HPS.html
Device signature
```{ "node_descriptor": "NodeDescriptor(logical_type=Diagnostic information
```yaml { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.12.9", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.7", "docker": true, "arch": "x86_64", "timezone": "Europe/London", "os_name": "Linux", "os_version": "5.15.80", "supervisor": "2022.12.1", "host_os": "Home Assistant OS 9.4", "docker_version": "20.10.19", "chassis": "vm", "run_as_root": true }, "custom_components": { "matter_experimental": { "version": "0.3.0", "requirements": [ "python-matter-server==0.3.0" ] }, "alexa_media": { "version": "4.4.0", "requirements": [ "alexapy==1.26.4", "packaging>=20.3", "wrapt>=1.12.1" ] }, "philips_ambilight_hue": { "version": "1.0.1", "requirements": [ "ha-philipsjs==2.7.6" ] }, "philips_ambilight+hue": { "version": "0.0.4", "requirements": [] }, "entities_calendar": { "version": "0.0.9", "requirements": [] }, "dualmode_generic": { "version": "0.2", "requirements": [] }, "auto_backup": { "version": "1.3.0", "requirements": [] }, "govee": { "version": "1.1.2", "requirements": [ "govee-api-laggat==0.1.23", "dacite==1.5.1" ] }, "watchman": { "version": "0.5.1", "requirements": [ "prettytable==3.0.0" ] }, "garbage_collection": { "version": "4.10.2", "requirements": [ "python-dateutil>=2.8.2" ] }, "deebot": { "version": "1.5.0", "requirements": [ "deebot-client==1.6.0", "numpy>=1.21.2" ] }, "scheduler": { "version": "v0.0.0", "requirements": [] }, "mbapi2020": { "version": "0.7.4", "requirements": [ "protobuf>=3.19.1,<4" ] }, "variable": { "version": "1.0.0.0", "requirements": [] }, "skyq": { "version": "v2.10.8", "requirements": [ "pyskyqremote==0.3.23" ] }, "hacs": { "version": "1.29.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "circadian_lighting": { "version": "2.1.3", "requirements": [] }, "fullykiosk": { "version": "1.1.0", "requirements": [ "python-fullykiosk==0.0.11" ] }, "alarmo": { "version": "v1.9.7", "requirements": [] }, "pod_point": { "version": "0.4.1", "requirements": [ "podpointclient==1.0.0", "StrEnum>=0.4,<0.5" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows==0.34.5", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.89", "zigpy-deconz==0.19.2", "zigpy==0.52.3", "zigpy-xbee==0.16.2", "zigpy-zigate==0.10.3", "zigpy-znp==0.9.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*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" } ], "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": 16235, "manufacturer": "_TZE200_v6ossqfy", "model": "TS0601", "name": "_TZE200_v6ossqfy TS0601", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "manufacturer_code": 4417, "power_source": "Mains", "lqi": 147, "rssi": null, "last_seen": "2023-01-03T10:28:32", "available": true, "device_type": "Router", "signature": { "node_descriptor": "NodeDescriptor(logical_type=Additional logs
``` Paste any additional debug logs here. Don't remove the extra line breaks outside the ``` marks. ```Additional context Add any other context or screenshots about the feature request here.