Code Monkey home page Code Monkey logo

smartthingsedge-xiaomi's People

Contributors

mrtorrent avatar sunekuntz avatar veonua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smartthingsedge-xiaomi's Issues

Temperature alert in Aqara mini switch WXKG11LM

First of all, THANK YOU for this driver! It's the only one that fully works (single click/hold/double click)

Not really a "real" issue, more of a question:
I installed the Aqara WXKG11LM mini switch and below the 3 button states, I see a "Temperature alert" but doesn't work. What's its purpose?
photo_2021-12-26_02-28-41

Xiaomi aqara temp sensor pressure

Taken from Smartthings CLI logcat:

(Aqara Weather)> emitting event {"attribute_id":"atmosphericPressure","capability_id":"atmosphericPressureMeasurement","component_id":"main","state":{"unit":"kPa","value":104}}
(Aqara Weather)> emitting event {"attribute_id":"atmosPressure","capability_id":"legendabsolute60149.atmosPressure","component_id":"main","state":{"value":1041}}

So there seems to be two events and in Edge driver:

device:emit_event(capabilities.atmosphericPressureMeasurement.atmosphericPressure({value = utils.round(mBar/10), unit = "kPa"}))
device:emit_event(atmos_Pressure.atmosPressure(mBar))

Thus i reckon the last emit in driver is always relevant ?

Future possibility to choose mbar or kPa ? (for example in device settings)

channel problem

hello,
I can't join your channel.

thank you for your efforts.

unable to pair Button

I have the WXKG01LM button that won't find the driver. It's connecting to the hub but that's it. Is there a certain procedure for pairing this with the driver?

Aqara temp/humidity/pressure sensor spurious 0 values

Quick background, I've been using long time DTH for this sensor without problems and switched to your edge driver version lately

Now I've been seeing since last weekend 'spurious' 0 values for temperature and humidity. Usually 1 to 3 times a day

I started partly yesterday and now today logging (CLI) and could catch a couple of 0 value cases

2023-07-10T07:27:14.008109911+00:00 INFO Aqara/Xiaomi Temperature 1.3  Doing health check read for [69FE]:0402:0000
2023-07-10T07:27:14.012583578+00:00 INFO Aqara/Xiaomi Temperature 1.3  <ZigbeeDevice: 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8 [0x69FE] (Xiaomi 3)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0x69FE, dest_endpoint: 0x01, profile: 0x0104, cluster: TemperatureMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0000 > > >
2023-07-10T07:27:14.033139911+00:00 DEBUG Aqara/Xiaomi Temperature 1.3  driver device thread event handled
2023-07-10T07:27:18.901592580+00:00 TRACE Aqara/Xiaomi Temperature 1.3  Received event with handler zigbee
2023-07-10T07:27:18.903024914+00:00 INFO Aqara/Xiaomi Temperature 1.3  <ZigbeeDevice: 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8 [0x69FE] (Xiaomi 3)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x69FE, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: TemperatureMeasurement >, lqi: 0xD2, rssi: -56, body_length: 0x0009, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x18, seqno: 0x05, ZCLCommandId: 0x01 >, < ReadAttributeResponse || < AttributeRecord || AttributeId: 0x0000, ZclStatus: SUCCESS, DataType: Int16, MeasuredValue: 0 > > > >
2023-07-10T07:27:18.983828914+00:00 TRACE Aqara/Xiaomi Temperature 1.3  Found ZigbeeMessageDispatcher handler in xiaomi_temp
2023-07-10T07:27:18.984673580+00:00 INFO Aqara/Xiaomi Temperature 1.3  Executing ZclClusterAttributeValueHandler: cluster: TemperatureMeasurement, attribute: MeasuredValue
2023-07-10T07:27:18.986393914+00:00 INFO Aqara/Xiaomi Temperature 1.3  <ZigbeeDevice: 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8 [0x69FE] (Xiaomi 3)> emitting event: {"component_id":"main","attribute_id":"temperature","state":{"unit":"C","value":0.0},"capability_id":"temperatureMeasurement"}
2023-07-10T07:27:18.997940580+00:00 WARN Aqara/Xiaomi Temperature 1.3  Attempted to generate event for 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8.main but it does not support capability Temperature Alarm
2023-07-10T07:27:19.003329580+00:00 DEBUG Aqara/Xiaomi Temperature 1.3  Xiaomi 3 device thread event handled



2023-07-10T11:07:17.385505213+00:00 INFO Aqara/Xiaomi Temperature 1.3  Doing health check read for [69FE]:0402:0000
2023-07-10T11:07:17.387389547+00:00 INFO Aqara/Xiaomi Temperature 1.3  <ZigbeeDevice: 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8 [0x69FE] (Xiaomi 3)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0x69FE, dest_endpoint: 0x01, profile: 0x0104, cluster: TemperatureMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0000 > > >
2023-07-10T11:07:17.410792880+00:00 DEBUG Aqara/Xiaomi Temperature 1.3  driver device thread event handled
2023-07-10T11:07:42.292403225+00:00 TRACE Aqara/Xiaomi Temperature 1.3  Received event with handler zigbee
2023-07-10T11:07:42.293654892+00:00 INFO Aqara/Xiaomi Temperature 1.3  <ZigbeeDevice: 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8 [0x69FE] (Xiaomi 3)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x69FE, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: TemperatureMeasurement >, lqi: 0xC6, rssi: -79, body_length: 0x0009, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x18, seqno: 0x11, ZCLCommandId: 0x01 >, < ReadAttributeResponse || < AttributeRecord || AttributeId: 0x0000, ZclStatus: SUCCESS, DataType: Int16, MeasuredValue: 0 > > > >
2023-07-10T11:07:42.372589559+00:00 TRACE Aqara/Xiaomi Temperature 1.3  Found ZigbeeMessageDispatcher handler in xiaomi_temp
2023-07-10T11:07:42.373438225+00:00 INFO Aqara/Xiaomi Temperature 1.3  Executing ZclClusterAttributeValueHandler: cluster: TemperatureMeasurement, attribute: MeasuredValue
2023-07-10T11:07:42.376159892+00:00 INFO Aqara/Xiaomi Temperature 1.3  <ZigbeeDevice: 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8 [0x69FE] (Xiaomi 3)> emitting event: {"component_id":"main","attribute_id":"temperature","state":{"unit":"C","value":0.0},"capability_id":"temperatureMeasurement"}
2023-07-10T11:07:42.378781892+00:00 WARN Aqara/Xiaomi Temperature 1.3  Attempted to generate event for 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8.main but it does not support capability Temperature Alarm
2023-07-10T11:07:42.381374559+00:00 DEBUG Aqara/Xiaomi Temperature 1.3  Xiaomi 3 device thread event handled

Now from my brief analysis all proper reported values like


2023-07-10T08:33:45.341776603+00:00 INFO Aqara/Xiaomi Temperature 1.3  Doing health check read for [69FE]:0405:0000
2023-07-10T08:33:45.343682936+00:00 INFO Aqara/Xiaomi Temperature 1.3  <ZigbeeDevice: 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8 [0x69FE] (Xiaomi 3)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0x69FE, dest_endpoint: 0x01, profile: 0x0104, cluster: RelativeHumidity >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0000 > > >
2023-07-10T08:33:45.350182270+00:00 DEBUG Aqara/Xiaomi Temperature 1.3  driver device thread event handled
2023-07-10T08:34:15.342704284+00:00 DEBUG Aqara/Xiaomi Temperature 1.3  driver device thread event handled
2023-07-10T08:34:28.414863624+00:00 TRACE Aqara/Xiaomi Temperature 1.3  Received event with handler zigbee
2023-07-10T08:34:28.416293290+00:00 INFO Aqara/Xiaomi Temperature 1.3  <ZigbeeDevice: 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8 [0x69FE] (Xiaomi 3)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x69FE, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: TemperatureMeasurement >, lqi: 0xD2, rssi: -74, body_length: 0x0008, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x18, seqno: 0x2F, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int16, MeasuredValue: 2114 > > > >
2023-07-10T08:34:28.447166290+00:00 TRACE Aqara/Xiaomi Temperature 1.3  Found ZigbeeMessageDispatcher handler in xiaomi_temp
2023-07-10T08:34:28.447994957+00:00 INFO Aqara/Xiaomi Temperature 1.3  Executing ZclClusterAttributeValueHandler: cluster: TemperatureMeasurement, attribute: MeasuredValue
2023-07-10T08:34:28.449689957+00:00 INFO Aqara/Xiaomi Temperature 1.3  <ZigbeeDevice: 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8 [0x69FE] (Xiaomi 3)> emitting event: {"component_id":"main","attribute_id":"temperature","state":{"unit":"C","value":21.14},"capability_id":"temperatureMeasurement"}
2023-07-10T08:34:28.463042957+00:00 WARN Aqara/Xiaomi Temperature 1.3  Attempted to generate event for 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8.main but it does not support capability Temperature Alarm
2023-07-10T08:34:28.464758624+00:00 DEBUG Aqara/Xiaomi Temperature 1.3  Xiaomi 3 device thread event handled

2023-07-10T10:11:59.146888306+00:00 TRACE Aqara/Xiaomi Temperature 1.3  Received event with handler zigbee
2023-07-10T10:11:59.148782306+00:00 INFO Aqara/Xiaomi Temperature 1.3  <ZigbeeDevice: 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8 [0x69FE] (Xiaomi 3)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x69FE, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: TemperatureMeasurement >, lqi: 0xC4, rssi: -77, body_length: 0x0008, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x18, seqno: 0x36, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Int16, MeasuredValue: 2128 > > > >
2023-07-10T10:11:59.165849639+00:00 TRACE Aqara/Xiaomi Temperature 1.3  Found ZigbeeMessageDispatcher handler in xiaomi_temp
2023-07-10T10:11:59.169681306+00:00 INFO Aqara/Xiaomi Temperature 1.3  Executing ZclClusterAttributeValueHandler: cluster: TemperatureMeasurement, attribute: MeasuredValue
2023-07-10T10:11:59.173955306+00:00 INFO Aqara/Xiaomi Temperature 1.3  <ZigbeeDevice: 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8 [0x69FE] (Xiaomi 3)> emitting event: {"component_id":"main","attribute_id":"temperature","state":{"unit":"C","value":21.28},"capability_id":"temperatureMeasurement"}
2023-07-10T10:11:59.203680973+00:00 WARN Aqara/Xiaomi Temperature 1.3  Attempted to generate event for 8b5fc57b-74d2-45c1-a99d-6973ea8d2ba8.main but it does not support capability Temperature Alarm
2023-07-10T10:11:59.205036306+00:00 DEBUG Aqara/Xiaomi Temperature 1.3  Xiaomi 3 device thread event handled

Do come as ReportAttribute

Reported 0 values are always ReadAttributeResponse ???

So far i have many hours of logs and ReadAttributeResponse do happen only 2 times with those 0 values reports.. everything else valid values are ReportAttributes

Wall Switch (Double Rocker) both buttons pressed triggers also left and right button presses

I have Aqara WXKG02LM_rev2 wall switch.
When both buttons are pressed, the corresponding action is also triggered for left and right buttons, as well as for both buttons. This makes it hard to define routines/automations that are triggered by pressing both buttons, since routines registered to either left or right button are also triggered.

For example if there are three routines triggered by the same switch

  1. When left button is pressed, send notification "left"
  2. When right button is pressed, send notification "right"
  3. When both buttons are pressed, turn off a light

When pressing both buttons at the same time once the light is turned off, but both notifications ("left" and "right") are also sent.

Logs from smartthings-cli (with smartthings edge:drivers:logcat <driver-id>) confirm that in fact the driver emits event for each button press:

INFO Xiaomi/Aqara Switch and Button v1.9.1  <ZigbeeDevice: <device-id> [0x7D36] (<device-name>)> emitting event: {"attribute_id":"button","capability_id":"button","component_id":"group1","state":{"value":"pushed"},"state_change":true}
INFO Xiaomi/Aqara Switch and Button v1.9.1  <ZigbeeDevice: <device-id> [0x7D36] (<device-name>)> emitting event: {"attribute_id":"button","capability_id":"button","component_id":"main","state":{"value":"pushed"},"state_change":true}
INFO Xiaomi/Aqara Switch and Button v1.9.1  <ZigbeeDevice: <device-id> [0x7D36] (<device-name>)> emitting event: {"attribute_id":"button","capability_id":"button","component_id":"button2","state":{"value":"pushed"},"state_change":true}

The behavior is similar with other actions/button presses including both buttons (hold and double press), where corresponding action is also registered on left and right buttons.

Is this behaviour intended, or could it be changed so that pressing, holding, or double pressing both buttons would only emit event for the both button press, and not for left and right buttons?

Icon always shows motion detected

Hi,

First of all thanks for these drivers they are working well for me so far. One thing that i just noticed was the icon for aqara motion sensor stays "motion detected" even when there is no motion. And somehow, illuminance is not working for me. When you have a chance, please help check. Thanks man!!!

Screenshot_20220521-050045_SmartThings

Aqara Cube

Stopped working after the latest driver update. I tried uninstalling the driver but cannot because it is "in use". What next?

Unknown device is recognized as xiaomi-switch/opple-switch-2

It seems that any unknown device is always matched to opple-switch-2, and resulting that it is impossible to use DTH instead.

I scanned a zigbee device which doesn't need external driver. It should use pre-embedded easyiot Light DTH driver in ST hub.

  • deviceManufacturerCode: eWeLight
  • deviceModel: ZB-CL01
  • raw descriptor info.

Data application: 01
endpointId: 01
manufacturer: eWeLight
model: ZB-CL01
zigbeeNodeType: ROUTER
Raw Description 01 0104 010D 01 08 0000 0003 0004 0005 0006 0008 0300 1000 00

But when I searched it, it is scanned as name any in ST app, and device type is recognized as edge driver of opple-switch-2.
I noticed that patterns like ^lumi.switch.l.aeu1 are used by device:get_model():find(fingerprint.model) only in opple subdriver code, but couldn't understand why it's happening.
To solve this issue, I had to remove every opple related code & lines from fingerprint.yml and subdriver setup, then I was able to use ST embedded DTH.

I also found another user is also reporting that his Si-Has sensors are also recognized as any opple-switch-2, and those sensors should use DTH driver instead.

Would you please review this issue?

Thank you.

Compared to Orangebucket DTH

yes i know this is not the discussion forum but do other edge drivers have with temp sensor 0 values ?

I've been running old orangebucket DTH and i havent't seen no zero values

Problem with edge is temperature is zero once in a while and i dont know why

From logs you can see zero values.. code has return... <- thus is it zero return when value is not wanted ?

Mbar

It would be nice to be able to change the pressure unit to mbar. I tried but the capability only supports kpa with range from 30 to 130 (if I'm not mistaken). Unfortunately I can't create a custom capability.

Xiaomi Motion Sensor RTCGQ01LM Not Showing

Added the Edge driver, and removed the device and DTH. Live Log shows the following:

[cb4e4911-ee5c-4703-8b48-aa11513c8b56](https://graph-na04-useast2.api.smartthings.com/ide/logs#cb4e4911-ee5c-4703-8b48-aa11513c8b56) 11:07:12 PM: debug SmartShield(text: null, manufacturerId: 0x0b39, direction: 0x00, data: [0xcb, 0xcb, 0xcb], number: null, isManufacturerSpecific: true, messageType: 0x00, senderShortId: 0x100e, isClusterSpecific: false, sourceEndpoint: 0x01, profileId: 0x0104, command: 0xcb, clusterId: 0x0006, destinationEndpoint: 0x01, options: 0x0000) [cb4e4911-ee5c-4703-8b48-aa11513c8b56](https://graph-na04-useast2.api.smartthings.com/ide/logs#cb4e4911-ee5c-4703-8b48-aa11513c8b56) 11:07:12 PM: warn DID NOT PARSE MESSAGE for description : catchall: 0104 0006 01 01 0000 00 100E 00 01 0B39 CB 00 CBCBCB [cb4e4911-ee5c-4703-8b48-aa11513c8b56](https://graph-na04-useast2.api.smartthings.com/ide/logs#cb4e4911-ee5c-4703-8b48-aa11513c8b56) 11:07:12 PM: debug description is catchall: 0104 0006 01 01 0000 00 100E 00 01 0B39 CB 00 CBCBCB

Sensor is still not showing up.

Double rocker cannot control right switch from actions

On the lumi.switch.b2laus01 "Wall Switch - No Neutral - Double Rocker" you cannot control the "right" switch from actions.

I am setting up a remote Zigbee switch to control the Aqara double rocker to turn the lights on/off from across the room. When I go to the action on the remote, I cannot control the right switch. You can test this by trying to add right control to an action if you don't have remote to test with.

Rpreplay_Final1680788817._4-6-23-08.47.mp4

SP-CEU01 outlet missing parameter, no voltage measurement ability

lumi.plug.maeu01

Experimenting this sensor i could find the sensor, switch works, power measurement works.. energy consumption is expected to be kWh so its too high value .. i think it should be divided by 1000 ? This sensor version to my understanding doesnt have voltage measurement.. and temperature measurement is missing

Also is it possible to add link quality value ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.