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
721 stars 670 forks source link

[Device Support Request] Aqara FP1e (lumi.sensor_occupy.agl1) #3294

Open dmulcahey opened 1 month ago

dmulcahey commented 1 month ago

Problem description

Everything on this device is implemented on the apple cluster 0xfcc0

Solution description

Implement the proper quirk providing support for the device

Device signature

Device signature ```json { "node_descriptor": { "logical_type": 2, "complex_descriptor_available": 0, "user_descriptor_available": 0, "reserved": 0, "aps_flags": 0, "frequency_band": 8, "mac_capability_flags": 140, "manufacturer_code": 4660, "maximum_buffer_size": 108, "maximum_incoming_transfer_size": 127, "server_mask": 11264, "maximum_outgoing_transfer_size": 127, "descriptor_capability_field": 0 }, "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0xfff0", "input_clusters": [ "0x0000", "0x0003", "0xfcc0" ], "output_clusters": [ "0x0003", "0x0019" ] } }, "manufacturer": "aqara", "model": "lumi.sensor_occupy.agl1", "class": "zigpy.device.Device" } ```
martinw72 commented 1 month ago

Would love to see this device supported in ZHA! Is there anything I can do? Would like to help, but I’m not a dev!

sandokanalles commented 1 month ago

I copied the py file from the Aqara FP1, changed a few lines to lumi.sensor_occupy.agl1.

Then created the directory config/zha_quirks under the homeassistant folder Copied the file motion_agl1.py to that directory

Added the following lines in the configuration.yaml zha: enable_quirks: true custom_quirks_path: config/zha_quirks

And after a restart and some time (do not know why) motion was detected in HA.

I guess a lot more needs to be changed in the file but for me it is working and can use it like this until somebody with some actual experience can look at this :)

motion_agl1.zip

dmulcahey commented 1 month ago

it’s similar to the existing FP1 but the event data appears to be sent on different attributes. I need to find a block of time to sit with the device and decode it.

elmocito commented 1 month ago

Make it a +1 that a support would be awesome 🤩

hendrikboldt commented 3 weeks ago

+1,

I am currently trying to use the sensor, but I figured it still needs to be supported.

wobeco commented 3 weeks ago

+1

merdok commented 3 weeks ago

Also waiting for support for this device...

gruberdieter commented 3 weeks ago

+1 That would be really great. Thanks

dontmint commented 4 days ago

+1 - just got this from really cheap TaoBao store