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

Aqara works with edge drivers by @Mariano_Colmenarejo

@Tola
I added a fingerprint for Aqara P1.
Could you please test it?
Thanks

3 Likes

I have a Xiaomi temp humidity sensor, currently it is using the edge driver from @veonua but when i refresh i get the cloud symbols, i guess the driver has fallen foul of Smartthings recent back end update that stops refresh working

Whos driver now works successfully with the Xiaomi Aquara temp humidity sensor ? I no longer have a clue

I have drivers for Aqara temp, some buttons and outlets.

Appreciate that Andrew, i know you wernt over keen on going public with your drivers and just assumed you might not want to keep updating

Have you got a link to your thread please so we dont go off topic here

Yes I’ll let you know how it goes

2 Likes

1 Like

Seems to be working well for Presence, LUX,Power etc.

But the presence sensitivity isn’t recognised yet.

And the detector interval keeps setting back to zero. I’ll play around with the presence time out .

Will be interesting to see how long the battery lasts. They are advertising them as up to 5 year batter life.

1 Like

@Jeff_Gallagher
Thank for the update.
I made a small change to refresh sensitivity and detection interval right after the value has been changed.
Driver version 1.6.1
The cloud should also go away with the driver’s update

Hi I’ve retested and the cloud is gone, but it can’t be changed from high to medium etc.

But apart from the it’s all working very well

1 Like

@Jeff_Gallagher
Would you be able to provide the logs that show configuration changes (sensitivity and interval detection)?
Thanks

Hi @ygerlovin sorry. No. not sure what’s happening, but there seems to be a very long delay in the sending of logs. Not sure what’s wrong.

@Jeff_Gallagher
Have you tried changing sensitivity and interval detection lately?
I made some more changes
Thanks

fp1 edge driver works well. There is only a delay of about three seconds.
There is a Tuya presence sensor that works better than this. I wish I had a plan to add this.

Data * application: 44

  • endpointId: 01
  • manufacturer: _TZE200_ikvncluo
  • model: TS0601
  • zigbeeNodeType: ROUTER
    Raw Description 01 0104 0051 01 04 0000 0004 0005 EF00 02 0019 000A

@jw970065
Would you be able to provide fingerprints and log for such device?
Thanks

1 Like

Yes, I’m on 1.6.2 and they are now displaying but not changing. When I try change I get an error saying cannot connect to the device. Network error…

And I don’t know why I’m not getting logs. I’ve added the older Xiaomi PIR to the driver and I’m getting logs for it.

? Select a driver. 33
2022-07-13T05:28:31.394709410+00:00 DEBUG Zigbee Sensors Edge Driver [YG] 1.6.2 driver device thread event handled
2022-07-13T05:28:52.039035318+00:00 TRACE Zigbee Sensors Edge Driver [YG] 1.6.2 Received event with handler zigbee
2022-07-13T05:28:52.052875985+00:00 INFO Zigbee Sensors Edge Driver [YG] 1.6.2 <ZigbeeDevice: b8717d0e-1a39-4b70-b4f7-ce4e33f87450 [0x7433] (Mirror PIR/Lux)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x7433, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: IlluminanceMeasurement >, lqi: 0x9C, rssi: -61, body_length: 0x0008, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x18, seqno: 0xC6, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Uint16, MeasuredValue: 0x0003 > > > >
2022-07-13T05:28:52.088675318+00:00 TRACE Zigbee Sensors Edge Driver [YG] 1.6.2 Received event with handler zigbee
2022-07-13T05:28:52.101001985+00:00 INFO Zigbee Sensors Edge Driver [YG] 1.6.2 <ZigbeeDevice: b8717d0e-1a39-4b70-b4f7-ce4e33f87450 [0x7433] (Mirror PIR/Lux)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x7433, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OccupancySensing >, lqi: 0x9C, rssi: -61, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x18, seqno: 0xC7, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Bitmap8, Occupancy: Occupancy[0x] > > > >
2022-07-13T05:28:52.122593985+00:00 DEBUG Zigbee Sensors Edge Driver [YG] 1.6.2 tuya_can_handle(): false ‘Mirror PIR/Lux’ LUMI/lumi.sensor_motion.aq2
2022-07-13T05:28:52.129095985+00:00 DEBUG Zigbee Sensors Edge Driver [YG] 1.6.2 tuya_can_handle(): false ‘Mirror PIR/Lux’ LUMI/lumi.sensor_motion.aq2
2022-07-13T05:28:52.138855318+00:00 TRACE Zigbee Sensors Edge Driver [YG] 1.6.2 Found ZigbeeMessageDispatcher handler in Zigbee sensors driver → Zigbee Xiaomi Motion Sensor
2022-07-13T05:28:52.146400652+00:00 INFO Zigbee Sensors Edge Driver [YG] 1.6.2 Executing ZclClusterAttributeValueHandler: cluster: IlluminanceMeasurement, attribute: MeasuredValue
2022-07-13T05:28:52.153211652+00:00 INFO Zigbee Sensors Edge Driver [YG] 1.6.2 <ZigbeeDevice: b8717d0e-1a39-4b70-b4f7-ce4e33f87450 [0x7433] (Mirror PIR/Lux)> emitting event: {“attribute_id”:“illuminance”,“capability_id”:“illuminanceMeasurement”,“component_id”:“main”,“state”:{“value”:3}}
2022-07-13T05:28:52.172027985+00:00 DEBUG Zigbee Sensors Edge Driver [YG] 1.6.2 Mirror PIR/Lux device thread event handled
2022-07-13T05:28:52.181852318+00:00 DEBUG Zigbee Sensors Edge Driver [YG] 1.6.2 tuya_can_handle(): false ‘Mirror PIR/Lux’ LUMI/lumi.sensor_motion.aq2
2022-07-13T05:28:52.187958652+00:00 DEBUG Zigbee Sensors Edge Driver [YG] 1.6.2 tuya_can_handle(): false ‘Mirror PIR/Lux’ LUMI/lumi.sensor_motion.aq2
2022-07-13T05:28:52.193672985+00:00 TRACE Zigbee Sensors Edge Driver [YG] 1.6.2 Found ZigbeeMessageDispatcher handler in Zigbee sensors driver → Zigbee Xiaomi Motion Sensor
2022-07-13T05:28:52.200612985+00:00 INFO Zigbee Sensors Edge Driver [YG] 1.6.2 Executing ZclClusterAttributeValueHandler: cluster: OccupancySensing, attribute: Occupancy
2022-07-13T05:28:52.212870318+00:00 DEBUG Zigbee Sensors Edge Driver [YG] 1.6.2 handle_motion_detected(): timer scheduled interval=60.0 tid={class=“timer{}”, inner_sock={timeout=0, timer_uuid=“70a744fe-e43d-4ac5-9085-342d318b433e”}} time=Wed Jul 13 05:28:52 2022
2022-07-13T05:28:52.218895985+00:00 INFO Zigbee Sensors Edge Driver [YG] 1.6.2 <ZigbeeDevice: b8717d0e-1a39-4b70-b4f7-ce4e33f87450 [0x7433] (Mirror PIR/Lux)> emitting event: {“attribute_id”:“motion”,“capability_id”:“motionSensor”,“component_id”:“main”,“state”:{“value”:“active”}}
listening for logs… -

Hello Yakov,

what information do you need to add

lumi.motion.agl04 Support for Aqara high precision motion sensor (RTCGQ13LM; lumi.motion.agl04) · Issue #5203 · Koenkk/zigbee2mqtt · GitHub

I have this device connected (online) and getting power reports from it on the Zigbee thing driver, but for some reason, there are no motion/presence events coming, maybe it requires some configuration.

2022-07-15T10:11:47.431052567+00:00 DEBUG Zigbee Sensors Edge Driver [YG] 1.6.2  zhandler_opple_report():  zb_rx={address_header={cluster={byte_length=2, field_name="cluster", value=64704}, dest_addr={byte_length=2, field_name="dest_addr", value=0}, dest_endpoint={byte_length=1, field_name="dest_endpoint", value=1}, profile={byte_length=2, field_name="profile", value=260}, src_addr={byte_length=2, field_name="src_addr", value=65432}, src_endpoint={byte_length=1, field_name="src_endpoint", value=1}}, body={zcl_body={attr_records={{attr_id={byte_length=2, value=247}, data={byte_length=45, value="\x03\x28\x1F\x05\x21\x01\x00\x08\x21\x36\x01\x0A\x21\x26\xFD\x0C\x20\x14\x10\x20\x01\x12\x20\x00\x65\x20\x00\x66\x20\x02\x67\x20\x00\x68\x20\x00\x69\x20\x02\x6A\x20\x01\x6B\x20\x03"}, data_type={byte_length=1, value=65}}}}, zcl_header={cmd={byte_length=1, value=10}, frame_ctrl={byte_length=1, field_name="frame_ctrl", value=24}, seqno={byte_length=1, field_name="seqno", value=23}}}, body_length={byte_length=2, field_name="body_length", value=52}, lqi={byte_length=1, field_name="lqi", value=208}, rssi={byte_length=1, field_name="rssi", value=-48}, type={byte_length=1, field_name="type", value=0}}
2022-07-15T10:11:47.454139900+00:00 ERROR Zigbee Sensors Edge Driver [YG] 1.6.2  Aqara Presence Detector FP1 thread encountered error: [string "st/dispatcher.lua"]:229: Error encountered while processing event for <ZigbeeDevice: 6dc4a410-3d38-46c6-b8c7-5873a0e8eeb8 [0xFF98] (Aqara Presence Detector FP1)>:
    arg1: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xFF98, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xD0, rssi: -48, body_length: 0x0034, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x18, seqno: 0x17, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x00F7, DataType: OctetString, OctetString: "\x03\x28\x1F\x05\x21\x01\x00\x08\x21\x36\x01\x0A\x21\x26\xFD\x0C\x20\x14\x10\x20\x01\x12\x20\x00\x65\x20\x00\x66\x20\x02\x67\x20\x00\x68\x20\x00\x69\x20\x02\x6A\x20\x01\x6B\x20\x03" > > > >
[string "st/dispatcher.lua"]:229: Error encountered while processing event for <ZigbeeDevice: 6dc4a410-3d38-46c6-b8c7-5873a0e8eeb8 [0xFF98] (Aqara Presence Detector FP1)>:
    arg1: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xFF98, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: 0xFCC0 >, lqi: 0xD0, rssi: -48, body_length: 0x0034, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x18, seqno: 0x17, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x00F7, DataType: OctetString, OctetString: "\x03\x28\x1F\x05\x21\x01\x00\x08\x21\x36\x01\x0A\x21\x26\xFD\x0C\x20\x14\x10\x20\x01\x12\x20\x00\x65\x20\x00\x66\x20\x02\x67\x20\x00\x68\x20\x00\x69\x20\x02\x6A\x20\x01\x6B\x20\x03" > > > >
[string "st/buf.lua"]:37: buf must be a string
1 Like

@veonua

Thanks, I hope I fixed that in v1.6.3.
Also, I added a fingerprint for lumi.motion.agl04, you are welcome to try it and see whether you get the updates. If it works, I will create a special device profile for that deice, as it does not support illuminanceMeasurement

1 Like