Skip to content

Commit

Permalink
Expose temperature and power_outage_count for Xiaomi MFKZQ01LM (#…
Browse files Browse the repository at this point in the history
…4266)

* subtract 1 from power_outage_count

power_outage_count is always 1 initially, and should be subtracted from 1 to make it 0 to show the number of times the device's power has actually been interrupted

<pre>
info  2022-05-14 08:43:31: Successfully interviewed '0x04cf8cdf3c8e8762', device has successfully been paired
info  2022-05-14 08:43:31: Device '0x04cf8cdf3c8e8762' is supported, identified as: Xiaomi Aqara single switch module T1 (with neutral) (SSM-U01)
info  2022-05-14 08:43:31: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara single switch module T1 (with neutral)","exposes":[{"features":[{"access":7,"description":"On/off state of the switch","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"}],"type":"switch"},{"access":1,"description":"Sum of consumed energy","nam
info  2022-05-14 08:43:31: Configuring '0x04cf8cdf3c8e8762'
info  2022-05-14 08:43:31: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Aqara single switch module T1 (with neutral)","friendly_name":"0x04cf8cdf3c8e8762","model":"SSM-U01","supported":true,"vendor":"Xiaomi"},"type":"pairing"}'
info  2022-05-14 08:43:31: Successfully configured '0x04cf8cdf3c8e8762'
debug 2022-05-14 08:43:32: Received Zigbee message from '0x04cf8cdf3c8e8762', type 'attributeReport', cluster 'genBasic', data '{"appVersion":23}' from endpoint 1 with groupID null
debug 2022-05-14 08:43:33: Received Zigbee message from '0x04cf8cdf3c8e8762', type 'attributeReport', cluster 'aqaraOpple', data '{"247":{"data":[100,16,0,3,40,22,152,57,0,0,0,0,149,57,0,0,0,0,150,57,13,111,18,69,151,57,0,0,0,0,5,33,1,0,154,32,0,11,32,0,8,33,23,1,9,33,0,1],"type":"Buffer"}}' from endpoint 1 with groupID null
debug 2022-05-14 08:43:33: lumi.switch.n0agl1: Processed buffer into data {"3":22,"5":1,"8":279,"9":256,"11":0,"100":0,"149":0,"150":2342.940673828125,"151":0,"152":0,"154":0}
debug 2022-05-14 08:43:33: lumi.switch.n0agl1: unknown key 8 with value 279
debug 2022-05-14 08:43:33: lumi.switch.n0agl1: unknown key 9 with value 256
debug 2022-05-14 08:43:33: lumi.switch.n0agl1: unknown key 154 with value 0
debug 2022-05-14 08:43:33: lumi.switch.n0agl1: Processed data into payload {"temperature":22,"power_outage_count":1,"illuminance":0,"illuminance_lux":0,"state":"OFF","energy":0,"consumption":0,"voltage":234.3,"current":0,"power":0}
debug 2022-05-14 08:43:33: lumi.switch.n0agl1: Processed data into payload {"temperature":22,"power_outage_count":1,"illuminance":0,"illuminance_lux":0,"state":"OFF","energy":0,"consumption":0,"voltage":234.3,"current":0,"power":0}
</pre>

* revert commit

* Include support for temperature and power outage count in SSM-U02

* revert support for temperature and power outage count in SSM-U02

* Include support for temperature and power outage count in MFKZQ01LM
  • Loading branch information
inode64 authored May 20, 2022
1 parent 953ac63 commit 0875664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion devices/xiaomi.js
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ module.exports = [
description: 'Mi/Aqara smart home cube',
meta: {battery: {voltageToPercentage: '3V_2850_3000_log'}},
fromZigbee: [fz.xiaomi_basic, fz.MFKZQ01LM_action_multistate, fz.MFKZQ01LM_action_analog],
exposes: [e.battery(), e.battery_voltage(), e.angle('action_angle'),
exposes: [e.battery(), e.battery_voltage(), e.angle('action_angle'), e.temperature(), e.power_outage_count(),
e.cube_side('action_from_side'), e.cube_side('action_side'), e.cube_side('action_to_side'),
e.action(['shake', 'wakeup', 'fall', 'tap', 'slide', 'flip180', 'flip90', 'rotate_left', 'rotate_right'])],
toZigbee: [],
Expand Down

0 comments on commit 0875664

Please sign in to comment.