[ST Edge/Beta] Xiaomi/Aqara/Tuya zigbee sensors driver

Thank you, the sensors are now connected and working :+1:

1 Like

Hi all,

I added the ability to select what is shown on a dashboard tile for Temperature and Humidity Sensors as requested in

Regards

1 Like

I dont know if its a sensor problem or a driver problem but one of my TUYATEC-v3uxbuxy/RH3052 is showing 7% battery with either the old or a new battery. I’ve tried deleting and re-adding the sensor but always shows 7% battery.

Any thoughts?

@paulonthenet
Could you please collect logs for the one that shows 7% and any other that seems to be working?
Thanks

@ygerlovin Is it possible to add Aqara FP1 presence sensor please?

1 Like

Hi @Steve_Mason ,

I really have no idea. New Aqara devices require special pairing that ST does not support.
See Supporting new E1 Aqara devices

Does the lighting sensor work in automations in the RTCGQ11LM? (the detections work but do not activate the automations in my case). thanks e Cheers

Hi @domenico_antonio_puo

It should be working.
What automation are you trying to create?
Are you on Android?

i am on IOS, my automation is: turn on light if aqara sensor detects lux less than 200.

@domenico_antonio_puo

Do you see illuminance events with <200lux in device event history?

now it works, but it does not respect the parameter set by me apparently (turn on the light below 100 lux). Example: at 97 lux it does not turn on the light anyway. if he did not consider the technical parameters, but I evaluate the practice. when there is good brightness in the room it does not turn on, when there is little light it turns on. I think that’s the thing that matters. thanks for your availability.

@domenico_antonio_puo

If you see illuminance events in device history, but the automations are not triggered, I would guess the issue is either in the ST cloud or in the iOs app.

One thing to mention: the light is only measured when the motion is detected. Aqara motion sensor does not report Lux continiously

The problem may also be in the order of events.
since light is only measured when moving, the script may use the outdated light value as a condition.

It doesn’t work for me in the Smart Lighting smartapp. If there is a condition to check illuminance, it says this feature is experimental and won’t run locally. In fact, it doesn’t fire my automation, neither locally, nor in the cloud, no matter what illuminance level I set. Therefore, I had to refactor to a routine and everything works well now.

Smart lighting app doesn’t work with edge devices, use routines

Hi @Steve_Mason,

After some research, I think a driver for Aqara FP1 might be doable.
Would you be able to provide the logs from smarthings cli to analyse the messages?
Thanks

2 Likes

@ygerlovin I’ll have to install cli so I’ll need a bit of time, but I’ll fire them over to you when I can. Thanks for taking a look!

Hi there! Please forgive me if this is not the right thread to ask and if the general thread for requesting edge drivers is better.

I recently acquired an Aqara Motion Sensor P1 (model: MS-S02) a bit too hastily assuming some of the existing edge drivers already had support and now I realize I was (as far as I can tell) wrong. Is there any chance you (or anyone else reading this) may be interested in adding support for the P1 motion sensor?

If it’s helpful, I can provide logs to help with the development.

While sniffing around GitHub I found what appears to be the fingerprint lumi.motion.ac02. I’m pretty sure that fingerprint is correct because I took an already existing edge driver and added that to its fingerprints which caused my device to get picked up during discover (of course non of the functionality actually works since I didn’t modify any core driver logic).

Hi @Tola

When you paired the device, did you notice in cli any messages, coming from device when motion is detected?
Some Aqara sensors would post messages even when not bound to specific cluster. Some will not work with ST

1 Like

Hi there @ygerlovin! Thank you for your reply!

Yes I did. Here are some of the messages that have come through:

2022-07-06T04:22:34.462775141+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFE, rssi: -78, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x25, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x00010019 > > > >
2022-07-06T04:22:37.464875933+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFE, rssi: -80, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x26, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001000E > > > >
2022-07-06T04:22:46.732066809+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFF, rssi: -49, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x27, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001FFFF > > > >
2022-07-06T04:23:39.581119485+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFD, rssi: -45, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x28, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001FFFF > > > >

2022-07-06T04:47:53.292076884+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFF, rssi: -41, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x2C, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001FFFC > > > >
2022-07-06T04:47:56.524693134+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: Basic >,  lqi: 0xFE, rssi: -43, body_length: 0x0017, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x18, seqno: 0x2D, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0005, DataType: CharString, ModelIdentifier: "lumi.motion.ac02" > > > >
2022-07-06T04:48:01.534203801+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFF, rssi: -54, body_length: 0x0039, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x2E, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x00F7, DataType: OctetString, OctetString: "\x01\x21\xF2\x0B\x03\x28\x1D\x04\x21\x00\x00\x05\x21\x01\x00\x08\x21\x05\x01\x0A\x21\x00\x00\x0C\x20\x01\x13\x20\x00\x14\x20\x00\x64\x10\x00\x65\x21\xFD\xFF\x69\x20\x1E\x6A\x20\x02\x6B\x20\x00" > > > >
2022-07-06T04:51:23.253583528+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFD, rssi: -49, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x31, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x00010010 > > > >
2022-07-06T04:51:57.623044491+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFE, rssi: -54, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x32, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x00010000 > > > >
2022-07-06T04:52:28.792314234+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFD, rssi: -49, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x33, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x000104D5 > > > >
2022-07-06T04:55:20.552340254+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFE, rssi: -51, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x34, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001FFFF > > > >
2022-07-06T04:56:11.992466200+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFD, rssi: -47, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x35, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001FFFF > > > >
2022-07-06T04:56:43.362092359+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFF, rssi: -51, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x36, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001FFFF > > > >
2022-07-06T04:57:33.742383514+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFE, rssi: -51, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x37, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001FFFF > > > >
2022-07-06T04:58:16.612250295+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFE, rssi: -53, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x38, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001FFFF > > > >
2022-07-06T04:58:53.742257161+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFE, rssi: -52, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x39, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001FFFF > > > >
2022-07-06T05:05:27.292119596+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFD, rssi: -48, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x3C, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001FFFC > > > >

2022-07-06T06:08:02.444046735+00:00 INFO Forked Xiaomi Motion Sensor  <ZigbeeDevice: 30e9f10d-45ef-47c0-b8df-6fc0b47c7bb0 [0xE0D9] (Aqara Motion P1)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xE0D9, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xFD, rssi: -54, body_length: 0x000C, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x1C, mfg_code: 0x115F, seqno: 0x41, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0112, DataType: Uint32, Uint32: 0x0001FFFC > > > >

I’ve noticed that I’m getting the AttributeId 0x0112 pretty quickly after moving in front of the sensor. I haven’t yet been able to make sense of that particular attribute.

I also haven’t yet found references to understand the attributes (maybe I don’t know where to look). Here are the list of attributes I’ve found so far (basically pulled from the log sample above): 0x0005, 0x00F7, 0x0112.

Also, for full disclosure in case it’s helpful for understanding the logs, the driver I’m based off of is here which I believe is Veona’s. I basically duplicated the instances of lumi.sensor_motion.aq2 to add the new one.

Based on the little understanding I have so far, I’m wondering if it as simple as this device just sending its events back on different hex numbers (sorry that I don’t know the proper term; maybe it’s clusters?) or if there’s more. When I looked up 0x0112, I saw NWKFCFailure which makes me think it’s more like more things need to be done :slight_smile:

2 Likes