zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
752 stars 689 forks source link

[Device Support Request]MOES 2Gang inwall switch #1038

Closed Barmatuhin closed 2 years ago

Barmatuhin commented 3 years ago

MOES 2gang in-wall switch have NO entities after pairing. image

Describe the solution you'd like Add support for TS0601 _TZE200_g1ib5ldv for first and second gang.

Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be sure to add the entire content of the log panel after pairing the device to a code block below this line. { "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: 128>, 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=True, is_full_function_device=False, is_mains_powered=False, is_receiver_on_when_idle=False, is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0051", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE200_g1ib5ldv", "model": "TS0601", "class": "zigpy.device.Device" }

Additional context image

MattWestb commented 3 years ago

All TS004X switches have device automatons for all known events sent from the switches in there quirks so shall being easy doing automatons with them but they is still tuya devices ;-)

tomkusz commented 3 years ago

@javicalle you are great, it's working now perfectly!!! That's my fault with no TUYA_MCU_COMMAND definition in switch.py.

I have one more problem with Tuya 1-button (TS0041 _TZ3000_4upl1fcj) and 2-button (TS0042 _TZ3000_dfgbtub0) Scene Switches. There is no buttons entities (there are only battery entities). Mayby you have medicine for it ...

You are very good Tuya Device Doctor!

@javicalle It will be great if those Scene Switches can work with long, short and double push of the buttons.


I have another question. When I try to add a device (previously added and removed) by Texas Instruments CC2652P coordinator in zigpy, the device is not detected at all. I think this is a problem of old device entries in Home Assistant. How to remove old device entries from HA system?

javicalle commented 3 years ago

ZHA entities are stored in this file:

Be extra carefull editing the file and make a backup before edit.

MattWestb commented 3 years ago

I and some user is having problems then struggling with quirks that ZHA is being in one locked mode and not loading quirks that have OK signature. Deleting the device waiting one minute (so ZHA can cleaning the registers) and restating is normally helping.

If not can "cleaning" of old entity's in the config/.storage/core.entity_registry being needed for getting quirk loading OK.

config/zigbee.db is holding all Zigbee device and there propitiates and can being the last messing with but is normally not being corrupted.

TI coordinator look having problem joining device in many situations for the moment if reading Z2M issues but can being unrelated.

tomkusz commented 3 years ago

Thank's for info. But please tell me which entity's in the config/.storage/core.entity_registry I should clean.

MattWestb commented 3 years ago

The newest is last and the "unique_id": "bc:33:ac:ff:fe:03:db:c1-1-1", is the long address of the device plus end point. Also core.device_registry is holding deleted devices in the end and can being deleted. Look for the long address of your device.

tomkusz commented 3 years ago

Many thank's I'll check it.