Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xiaomi LLKZMK11LM not updating certain exposes after firmware update #7112

Closed
snippem opened this issue Apr 18, 2021 · 90 comments · Fixed by Koenkk/zigbee-herdsman-converters#3956
Labels
problem Something isn't working stale Stale issues

Comments

@snippem
Copy link

snippem commented Apr 18, 2021

What happened

Updated the switch when new firmware was reported by zigbee2mqtt
Going from version 9-20-2018 to 8-6-2020.

What did you expect to happen

To work better with the new firmware :-)
But now the power meter works but the energy meter , temperature meter and voltage readout doesn't work anymore.
Also noted when the update completed some of the switches sometimes turn on and off without telling them to do so.
I overcome this problem by resetting the switch.
This doesn't had any effect on the missing exposes.

Debug info

Zigbee2MQTT version: latest developer version.
Adapter hardware: Slae.sh cc2652rb
Adapter firmware version: Couldn't find it

@snippem snippem added the problem Something isn't working label Apr 18, 2021
@McGiverGim
Copy link
Contributor

@snippem maybe can you put your logs in debug mode and paste it here? Maybe it shows something about this problem.

@snippem
Copy link
Author

snippem commented Apr 27, 2021

@snippem maybe can you put your logs in debug mode and paste it here? Maybe it shows something about this problem.

Okay here is the debug log:

Debug Received MQTT message on 'zigbee2mqtt/Daan plafondlamp/l1/set' with data 'ON'
Debug Publishing 'set' 'state' to 'Daan plafondlamp'
Info MQTT publish: topic 'zigbee2mqtt/Daan plafondlamp', payload '{"energy":null,"interlock":true,"linkquality":45,"power":0.06,"state_l1":"ON","state_l2":"OFF","temperature":null,"update":{"state":"idle"},"update_available":false,"voltage":null}'
Debug Received Zigbee message from 'Daan plafondlamp', type 'attributeReport', cluster 'genOnOff', data '{"61440":248397568,"onOff":0}' from endpoint 2 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/Daan plafondlamp', payload '{"energy":null,"interlock":true,"linkquality":45,"power":0.06,"state_l1":"ON","state_l2":"OFF","temperature":null,"update":{"state":"idle"},"update_available":false,"voltage":null}'
Debug Received Zigbee message from 'Daan plafondlamp', type 'attributeReport', cluster 'genOnOff', data '{"61440":117440745,"onOff":1}' from endpoint 1 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/Daan plafondlamp', payload '{"energy":null,"interlock":true,"linkquality":45,"power":0.06,"state_l1":"ON","state_l2":"OFF","temperature":null,"update":{"state":"idle"},"update_available":false,"voltage":null}'
Debug Received Zigbee message from 'Daan plafondlamp', type 'attributeReport', cluster 'genAnalogInput', data '{"presentValue":2.3317694664001465}' from endpoint 1 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/Daan plafondlamp', payload '{"energy":null,"interlock":true,"linkquality":45,"power":2.33,"state_l1":"ON","state_l2":"OFF","temperature":null,"update":{"state":"idle"},"update_available":false,"voltage":null}'
Debug Received Zigbee message from 'Daan plafondlamp', type 'attributeReport', cluster 'genAnalogInput', data '{"presentValue":10.66430950164795}' from endpoint 1 with groupID 0
Info MQTT publish: topic 'zigbee2mqtt/Daan plafondlamp', payload '{"energy":null,"interlock":true,"linkquality":57,"power":10.66,"state_l1":"ON","state_l2":"OFF","temperature":null,"update":{"state":"idle"},"update_available":false,"voltage":null}'

this is for one off 6 all behave the same after the update off the firmware

@McGiverGim
Copy link
Contributor

It seems it receives only the on/off switch information and one analog that z2m maps to power. Nothing more appears. At least in this log.

I don't know if when pairing it can give more information. If you have time do the pairing or the device again with debug enabled.

Which clusters show the UI of Z2M for you? This are the clusters of the original device, without OTA:
image

@snippem
Copy link
Author

snippem commented Apr 28, 2021

Hopefully will find some time to add the device and log these are the cluster with the updateScreenshot_20210428-102711.jpg

@leroyloren
Copy link

leroyloren commented May 4, 2021

Hi, the same issue since OTA 8-6-2020 does not show energy related values.

obrazek

@McGiverGim
Copy link
Contributor

@leroyloren are you able to take some debug logs with the device repairing/joining the network? To see if something appears there...

Here we have two options:

  • The firmware file is not correct for the device
  • With the update the information of the device is sent in a different manner. I think this information is obtained only when joining the network.

@McGiverGim
Copy link
Contributor

I've seen that the original post that started the Xiaomi updates #6906, there are four older firmware versions:

+---lumi.relay.c2acn01
|   +---0.0.0_0036_8691F18B_e92ad148ac2de53568745a44a594007f
|   |       OTA_lumi_relay_c2acn01_V1.3.36.20190308_94007F.20191009160743.ota
|   |
|   +---0.0.0_0042_6CD27E92_33ff98239d745a64cbe3e0408768389c
|   |       OTA_lumi_relay_c2acn01_V1.3.42.20191230_68389C.20200429113233.ota
|   |
|   +---30_0000001E_c0e78b9c_86ffab33d58a29a8cee396c363870c94
|   |       OTA_withCRC_LMES_DualController_V1.3.30_20170801.20181024095320.ota
|   |
|   \---35_3b451bb3_2b39856873feffe89987e517ce06c78a
|           OTA_lumi_relay_c2acn01_V1.3.35.20180920.20181008170031.ota`

I don't know if they can be installed "manually" to see if some of them fixes the problem. But I will do that with caution, maybe the result is worse...

@leroyloren
Copy link

Debug Received Zigbee message from 'Zebrik', type 'read', cluster 'genTime', data '["time"]' from endpoint 1 with groupID 0
Debug Received MQTT message on 'zigbee2mqtt/bridge/request/device/ota_update/check' with data '{"id":"Zebrik","transaction":"433su-1"}'
Info Checking if update available for 'Zebrik'
Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Checking if update available for 'Zebrik'","meta":{"device":"Zebrik","status":"checking_if_available"},"type":"ota_update"}'
Debug Check if update available for '0x00158d00062694c3' (lumi.relay.c2acn01)
Debug Using endpoint '1'
Debug Received Zigbee message from 'Zebrik', type 'commandQueryNextImageRequest', cluster 'genOta', data '{"fieldControl":0,"fileVersion":46,"imageType":257,"manufacturerCode":4447}' from endpoint 1 with groupID 0
Debug Got OTA request '{"fieldControl":0,"manufacturerCode":4447,"imageType":257,"fileVersion":46}'
Debug Is new image available for '0x00158d00062694c3', current '{"fieldControl":0,"manufacturerCode":4447,"imageType":257,"fileVersion":46}', latest meta '{"fileVersion":46,"fileSize":179502,"url":"https://github.com/Koenkk/zigbee-OTA/raw/master/images/Xiaomi/20201218113852_lumi.relay.c2acn01_0.0.0_0046_20201216_6BB0FD.ota","sha512":"ea9f9d74c65b2828e6417b525502bfc9d2f75c220b2504927e2b515c340503bc03e2612ad4c2b2ee8d1ff75d1328db8efa743c07c21a82f4ebd15f8ddac40a0b"}'
Debug Update available for '0x00158d00062694c3': NO
Info No update available for 'Zebrik'

@McGiverGim
Copy link
Contributor

This does not seem a "join" or "repair" to the network. Maybe it is an OTA check?
What I ask for is enable join the zigbee network, and press the relay button five seconds to join the network. Like the first time it join the network. Is then when the device publishes all this capabilities if I'm not wrong. I don't know if you have the device "more or less" accesible.

@leroyloren
Copy link

Device 'Zebrik' joined
Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"Zebrik","ieee_address":"0x00158d00062694c3"},"type":"device_joined"}'
Info Starting interview of 'Zebrik'
Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"Zebrik","ieee_address":"0x00158d00062694c3","status":"started"},"type":"device_interview"}'
Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"Zebrik"},"type":"device_connected"}'
Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"Zebrik"},"type":"pairing"}'
Debug Device 'Zebrik' announced itself
Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"Zebrik","ieee_address":"0x00158d00062694c3"},"type":"device_announce"}'
Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"announce","meta":{"friendly_name":"Zebrik"},"type":"device_announced"}'
Debug Device 'Roleta pokoj 2' announced itself
Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"Roleta pokoj 2","ieee_address":"0x5c0272fffec20a57"},"type":"device_announce"}'
Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"announce","meta":{"friendly_name":"Roleta pokoj 2"},"type":"device_announced"}'
Debug Received Zigbee message from 'Zebrik', type 'readResponse', cluster 'genBasic', data '{"modelId":"lumi.relay.c2acn01"}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'Zebrik', type 'raw', cluster 'genBasic', data '{"data":[28,95,17,0,10,1,255,66,68,3,40,0,5,33,25,0,8,33,46,18,9,33,0,1,100,16,0,101,16,0,110,32,0,111,32,0,148,32,25,149,57,10,215,3,61,150,57,123,248,21,69,151,57,136,229,200,59,152,57,240,108,192,62,155,33,0,0,156,32,1,10,33,0,0,12,40,0,0],"type":"Buffer"}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'Zebrik', type 'attributeReport', cluster 'genBasic', data '{"appVersion":1,"modelId":"lumi.relay.c2acn01"}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'Zebrik', type 'readResponse', cluster 'genBasic', data '{"manufacturerName":"LUMI"}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'Zebrik', type 'readResponse', cluster 'genBasic', data '{"powerSource":4}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'Zebrik', type 'readResponse', cluster 'genBasic', data '{"zclVersion":0}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'Zebrik', type 'readResponse', cluster 'genBasic', data '{"stackVersion":2}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'Zebrik', type 'readResponse', cluster 'genBasic', data '{"hwVersion":18}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'Zebrik', type 'readResponse', cluster 'genBasic', data '{"dateCode":"8-6-2020"}' from endpoint 1 with groupID 0
Debug Received Zigbee message from 'Zebrik', type 'readResponse', cluster 'genBasic', data '{}' from endpoint 1 with groupID 0
Info Successfully interviewed 'Zebrik', device has successfully been paired
Info Device 'Zebrik' is supported, identified as: Xiaomi Aqara wireless relay controller (LLKZMK11LM)
Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"Aqara wireless relay controller","exposes":[{"access":5,"description":"Instantaneous measured power","name":"power","property":"power","type":"numeric","unit":"W"},{"access":1,"description":"Sum of consumed energy","name":"energy","property":"energy","type":"numeric","unit":"kWh"},{"access":1,"description":"Measured temperature value","name":"temperature","property":"temperature","type":"numeric","unit":"°C"},{"access":1,"description":"Measured electrical potential value","name":"voltage","property":"voltage","type":"numeric","unit":"V"},{"endpoint":"l1","features":[{"access":7,"description":"On/off state of the switch","endpoint":"l1","name":"state","property":"state_l1","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"}],"type":"switch"},{"endpoint":"l2","features":[{"access":7,"description":"On/off state of the switch","endpoint":"l2","name":"state","property":"state_l2","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"}],"type":"switch"},{"access":3,"description":"Enabling prevents both relais being on at the same time","name":"interlock","property":"interlock","type":"binary","value_off":false,"value_on":true},{"access":1,"description":"Link quality (signal strength)","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"LLKZMK11LM","supports_ota":true,"vendor":"Xiaomi"},"friendly_name":"Zebrik","ieee_address":"0x00158d00062694c3","status":"successful","supported":true},"type":"device_interview"}'
Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Aqara wireless relay controller","friendly_name":"Zebrik","model":"LLKZMK11LM","supported":true,"vendor":"Xiaomi"},"type":"pairing"}'

@McGiverGim
Copy link
Contributor

McGiverGim commented May 4, 2021

I thought that the debug will show other clusters, but only genBasic is shown... I think I can't help much more.
@Koenkk some idea about this? If the problem is with the firmware file, a lot of users will update using the OTA function to this version and lost some features... is a very popular device.

EDIT: I've one idea, maybe the new "firmware" changes the way it sends the information, and is more similar to the one of the new relays (https://www.zigbee2mqtt.io/devices/SSM-U01.html or https://www.zigbee2mqtt.io/devices/SSM-U02.html). Maybe is a stupid idea, I suppose we will see some error/warning message in the logs.

@Koenkk
Copy link
Owner

Koenkk commented May 4, 2021

Have you already tried reconfiguring the device by clicking on the device in the frontend and pressing the yellow refresh icon?

@snippem
Copy link
Author

snippem commented May 4, 2021

Have you already tried reconfiguring the device by clicking on the device in the frontend and pressing the yellow refresh icon?

Hi tried that and is say's the device cannot be reconfigured.

@Koenkk
Copy link
Owner

Koenkk commented May 4, 2021

Can someone check if energy metering still works with the original gateway when on this firmware?

@leroyloren
Copy link

leroyloren commented May 4, 2021

photo_2021-05-04_21-02-52
photo_2021-05-04_21-04-55

If you really stop showing this information in the latest firmware, is there any way to downgrade?

  • is a question of whether this information was ever showed in the application. (it's a hub from a friend)

@McGiverGim
Copy link
Contributor

The screen captures are from your relay (the one with the problem) with the official hub? The accessory ID seems the MAC address and is different from the one of your logs.

@leroyloren
Copy link

leroyloren commented May 5, 2021

yeah, it's Aqara hub (and relay) from a friend.

@pilmrc
Copy link

pilmrc commented May 10, 2021

I’ve upgraded my unit too, before reading about this problem, and now it is not sending anymore measures. Only when asking to switch on or off, but reporting only the current power. Is there a way to downgrade firmware?
My unit is produced on Jan 2021 and loading 2019 firmware. I suppose the 2020 version is not ok. The date code is the only information I have to trace the firmware. Any test or validation let me know.

@McGiverGim
Copy link
Contributor

@Koenkk maybe is better to remove the OTA for this device? Is clear that it has some kind of problem, while investigating is better to not let others update and loose functionality.

@pilmrc
Copy link

pilmrc commented May 11, 2021

Doing more investigation with log debug mode on.
In reality the device is sending data.
every minute (quite regular) is sending the following:

debug 2021-05-11 19:04:40: Received Zigbee message from 'switch1', type 'read', cluster 'genTime', data '["time"]' from endpoint 1 with groupID 0

And every 2-5 minutes, there is no fixed time data like the following

debug 2021-05-11 19:03:29: Received Zigbee message from 'switch1', type 'raw', cluster 'genBasic', data '{"data":[28,95,17,1,10,1,255,66,68,3,40,32,5,33,42,0,8,33,46,18,9,33,0,2,100,16,1,101,16,1,110,32,1,111,32,1,148,32,2,149,57,10,215,35,58,150,57,126,200,22,69,151,57,240,41,164,59,152,57,0,65,205,60,155,33,0,0,156,32,1,10,33,0,0,12,40,0,0],"type":"Buffer"}' from endpoint 1 with groupID 0

debug 2021-05-11 19:08:54: Received Zigbee message from 'switch1', type 'raw', cluster 'genBasic', data '{"data":[28,95,17,8,10,1,255,66,68,3,40,32,5,33,42,0,8,33,46,18,9,33,0,2,100,16,1,101,16,1,110,32,1,111,32,1,148,32,6,149,57,10,215,35,58,150,57,113,38,23,69,151,57,240,41,164,59,152,57,96,11,163,61,155,33,0,0,156,32,1,10,33,0,0,12,40,0,0],"type":"Buffer"}' from endpoint 1 with groupID 0

At this point I suppose the upgrade is changing the way the data is formatted. Not expert on this.
Can I help in any other way? Can pairing the device in debug mode give more details?

Koenkk added a commit to Koenkk/zigbee-OTA that referenced this issue May 12, 2021
@Koenkk
Copy link
Owner

Koenkk commented May 12, 2021

@McGiverGim good point, disabled the OTA

Looking at the logs of @pilmrc it seems Xiaomi changed to yet another proprietary format, currently have no clue how to decode this.

@snippem
Copy link
Author

snippem commented May 21, 2021

@McGiverGim good point, disabled the OTA

Looking at the logs of @pilmrc it seems Xiaomi changed to yet another proprietary format, currently have no clue how to decode this.

Is it a option to set the previous working firmware as an update.
This so my switches have all the functions that i had with the older firmware?
And also because my switches with the new firmware sometimes turn on and off all happening within a second.

@Koenkk
Copy link
Owner

Koenkk commented May 21, 2021

@snippem we don't have to OTA file of the previous firmware, otherwise it should be possible.

@snippem
Copy link
Author

snippem commented May 21, 2021

Oke is there any chance the new firmware will have the same functionality as the old firmware?

@Koenkk
Copy link
Owner

Koenkk commented May 21, 2021

@snippem someone has to figure out how the new data should be parsed, but I currently have no clue how to do it.

@ALaDoffe
Copy link

ALaDoffe commented May 22, 2021

@Koenkk
Hello since OTA update was removed for this device, i get this in HA logs :

WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'update_available' when rendering '{{ value_json.update_available}}'

More on FrontEnd, i have still references of Ota Update:

image

I tested :
remove/rejoin the devices,
remove mosquitto retain messages

Thx

EDIT :
Removing ota: ota.zigbeeOTA from zigbee-herdsman-converters/devices/xiaomi.js solved the issue :
{
zigbeeModel: ['lumi.relay.c2acn01'],
model: 'LLKZMK11LM',
vendor: 'Xiaomi',
description: 'Aqara wireless relay controller',
fromZigbee: [fz.xiaomi_switch_basic, fz.xiaomi_power, fz.ignore_multistate_report, fz.on_off],
meta: {multiEndpoint: true},
toZigbee: [tz.on_off, tz.LLKZMK11LM_interlock, tz.xiaomi_power],
endpoint: (device) => {
return {'l1': 1, 'l2': 2};
},
exposes: [e.power().withAccess(ea.STATE_GET), e.energy(), e.temperature(), e.voltage().withAccess(ea.STATE),
e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
exposes.binary('interlock', ea.STATE_SET, true, false)
.withDescription('Enabling prevents both relais being on at the same time')],
ota: ota.zigbeeOTA,
},

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue May 22, 2021
@Koenkk
Copy link
Owner

Koenkk commented May 22, 2021

@ALaDoffe done!

@dinamik1488
Copy link

does energy monitoring work?

@localbuddha
Copy link

I've just checked my setup, guys, and I need to say "sorry". My Sonoff Zigbee 3.0 USB Dongle Plus looks faulty, and all firmware updates for relays was completed on old CC2531 dongle v. 20190608

@sorryusernameisalreadytaken

@Koenkk Hey! Just want let you know my LLKZMK11LM relay was updated successfully to 9-22-2021, and it shows power, temperature and voltage.

image

Here the same. I updatet 4 LLKZMK11LM to FW: 9-22-2021.
The fw-update took about 17 minutes for each relay.

@Koenkk why is it just possible to update the xiaomi devices with dev-latest?

@Koenkk
Copy link
Owner

Koenkk commented Mar 1, 2022

@sorryusernameisalreadytaken should also be possible with the latest release (1.24.0)

@McGiverGim
Copy link
Contributor

McGiverGim commented Mar 1, 2022

I've updated one of my devices to test it. It seems the power for example is not working. I will try to get some debug logs tomorrow to see what is working and what not.

EDIT: the power now is working, I was wrong, I will check tomorrow what is working and what not and report here again.

@McGiverGim
Copy link
Contributor

I've taked some logs with the latest firmware and latest release.

The ON/OFF works:

debug 2022-03-01 21:23:05: Received Zigbee message from 'rele_cocina', type 'attributeReport', cluster 'genOnOff', data '{"61440":117440684,"onOff":1}' from endpoint 1 with groupID 0
...
debug 2022-03-01 21:24:16: Received Zigbee message from 'rele_cocina', type 'attributeReport', cluster 'genOnOff', data '{"61440":117440686,"onOff":0}' from endpoint 1 with groupID 0

The power works but not always. Sometimes it receives the genAnalogInput message and others don't.:

debug 2022-03-01 21:23:08: Received Zigbee message from 'rele_cocina', type 'attributeReport', cluster 'genAnalogInput', data '{"presentValue":36.61201477050781}' from endpoint 1 with groupID 0
...
debug 2022-03-01 21:24:17: Received Zigbee message from 'rele_cocina', type 'attributeReport', cluster 'genAnalogInput', data '{"presentValue":0}' from endpoint 1 with groupID 0

It receives the genBasic, that I suppose contains the power too and voltage, temperature, etc., but I suppose it is not processed by it because the format is different from what it expects:

debug 2022-03-02 10:40:21: Received Zigbee message from 'rele_cocina', type 'raw', cluster 'genBasic', data '{"data":[28,95,17,12,10,1,255,66,68,3,40,36,5,33,93,0,8,33,47,18,9,33,4,18,100,16,1,101,16,1,110,32,1,111,32,1,148,32,0,149,57,92,143,34,61,150,57,0,0,0,0,151,57,0,0,0,0,152,57,0,0,0,0,155,33,17,0,156,32,1,10,33,48,190,12,40,0,0],"type":"Buffer"}' from endpoint 1 with groupID 0

Maybe we expect that the aqara_apple converter process it? If yes, then I think it will not work, the data does not come from a "247" attribute and the message is different. This is a log of another device from Xiaomi that uses the aqara_opple:

debug 2022-03-01 21:24:25: Received Zigbee message from 'rele_despacho', type 'attributeReport', cluster 'aqaraOpple', data '{"247":{"data":[100,16,0,3,40,33,152,57,0,0,0,0,149,57,137,94,56,65,150,57,50,239,12,69,151,57,0,0,0,0,5,33,10,0,154,32,0,11,32,0,8,33,21,1,9,33,3,14],"type":"Buffer"}}' from endpoint 1 with groupID 0

So the power is not confiable, and the energy/voltage/temperature don't seem to work. I suppose the people who say is working... maybe it contains the latest known value before the upgrade? The value have changed since you updated the firmware?

I will try to make a custom converter to try to process it with the same format than aqara_opple, but I don't know if it will work. The data from the buffer seems different.

@McGiverGim
Copy link
Contributor

McGiverGim commented Mar 2, 2022

I've created an "ugly" converter with the code of the aqara_opple method to process the buffer and added some logs to it. It seems to found the "temperature", "energy", "voltage", "current" and "power" in the buffer:

debug 2022-03-02 12:30:11: Received Zigbee message from 'rele_cocina', type 'raw', cluster 'genBasic', data '{"data":[28,95,17,138,10,1,255,66,68,3,40,36,5,33,95,0,8,33,47,18,9,33,4,18,100,16,0,101,16,0,110,32,0,111,32,0,148,32,0,149,57,92,143,34,61,150,57,0,0,0,0,151,57,0,0,0,0,152,57,0,0,0,0,155,33,17,0,156,32,1,10,33,182,120,12,40,0,0],"type":"Buffer"}' from endpoint 1 with groupID 0
...
debug 2022-03-02 12:35:43: i 9
debug 2022-03-02 12:35:43: index 3 (temperature)
debug 2022-03-02 12:35:43: value 36

...
debug 2022-03-02 12:35:44: i 39
debug 2022-03-02 12:35:44: index 149 (energy)
debug 2022-03-02 12:35:44: value 0.03968749940395355
debug 2022-03-02 12:35:44: i 45
debug 2022-03-02 12:35:44: index 150 (voltage)
debug 2022-03-02 12:35:44: value 0
debug 2022-03-02 12:35:44: i 51
debug 2022-03-02 12:35:44: index 151 (current)
debug 2022-03-02 12:35:44: value 0
debug 2022-03-02 12:35:44: i 57
debug 2022-03-02 12:35:44: index 152 (power)
debug 2022-03-02 12:35:44: value 0
...

But all of them with value zero or the energy, that seems to be "a fixed value" that does not move. With this amount of decimals I suppose that it will move fast when I power on the lights and that does not happen. The only that seems to work is temperature, it moves between 36-37 that seems a reasonable value.

And this message does not seems to happen when some value changes, so it does not seem to util neither :(

My knowledge finish here. I don't know how to continue.

@McGiverGim
Copy link
Contributor

I don't know if it matters, but after "repairing" the device, it seems more reliable...

Now the genAnalogInput with the power value seems to work more reliable. It is sent after a power on/off.

The 149, 150, etc. values (energy, voltage, current, etc.) now have some value:

debug 2022-03-02 15:39:11: Received Zigbee message from 'rele_cocina', type 'raw', cluster 'genBasic', data '{"data":[28,95,17,24,10,1,255,66,68,3,40,36,5,33,102,0,8,33,47,18,9,33,0,13,100,16,0,101,16,0,110,32,0,111,32,0,148,32,3,149,57,31,133,43,61,150,57,225,162,14,69,151,57,0,48,104,59,152,57,0,0,0,0,155,33,0,0,156,32,1,10,33,48,190,12,40,0,0],"type":"Buffer"}' from endpoint 1 with groupID 0

149,57,31,133,43,61,
150,57,225,162,14,69,
151,57,0,48,104,59,
152,57,0,0,0,0,

It is sent only each 5-6 minutes, but may be enough to see the energy, voltage, etc. if we don't need realtime data of this attributes.

I will keep an eye over them, to see if they continue working... if others can take a look to the debug logs to confirm that it will be great.

@McGiverGim
Copy link
Contributor

It seems to work. It's an ugly converter, almost duplicate from the current one. If someone want to test it, here is the code:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const {
    precisionRound, mapNumberRange, isLegacyEnabled, toLocalISOString, numberWithinRange, hasAlreadyProcessedMessage,
    calibrateAndPrecisionRoundOptions, addActionGroup, postfixWithEndpointName, getKey,
    batteryVoltageToPercentage, getMetaValue,
} = require('zigbee-herdsman-converters/lib/utils');
const {Buffer} = require('buffer');
const e = exposes.presets;
const ea = exposes.access;

const fzLocal = {
    aqara_opple: {
        cluster: 'genBasic',
        type: ['raw'],
        options: (definition) => {
            const result = [];
            if (definition.exposes.find((e) => e.name === 'temperature')) {
                result.push(exposes.options.precision('temperature'), exposes.options.calibration('temperature'));
            }
            if (definition.exposes.find((e) => e.name === 'illuminance')) {
                result.push(exposes.options.precision('illuminance'), exposes.options.calibration('illuminance', 'percentual'));
            }
            return result;
        },
        convert: (model, msg, publish, options, meta) => {
            const payload = {};

			if (meta.logger) meta.logger.debug('msg ' + msg.type + ', ' + msg.data.type);
			let data = null;
			
			if (Buffer.isBuffer(msg.data)) {
				data = msg.data;			
			} else if (msg.data.hasOwnProperty('247')) {
				data = msg.data['247'];
			}
			if (meta.logger) meta.logger.debug('data ' + data);
			if (data != null) {				
                // Xiaomi struct parsing
                const length = data.length;
				if (meta.logger) meta.logger.debug('length ' + length);
                for (let i=0; i < length; i++) {
                    const index = data[i];
                    let value = null;
                    switch (data[i+1]) {
                    case 16:
                        // 0x10 ZclBoolean
                        value = data.readUInt8(i+2);
                        i += 2;
                        break;
                    case 32:
                        // 0x20 Zcl8BitUint
                        value = data.readUInt8(i+2);
                        i += 2;
                        break;
                    case 33:
                        // 0x21 Zcl16BitUint
                        value = data.readUInt16LE(i+2);
                        i += 3;
                        break;
                    case 34:
                        // 0x22 Zcl24BitUint
                        value = data.readUIntLE(i+2, 3);
                        i += 4;
                        break;
                    case 35:
                        // 0x23 Zcl32BitUint
                        value = data.readUInt32LE(i+2);
                        i += 5;
                        break;
                    case 36:
                        // 0x24 Zcl40BitUint
                        value = data.readUIntLE(i+2, 5);
                        i += 6;
                        break;
                    case 37:
                        // 0x25 Zcl48BitUint
                        value = data.readUIntLE(i+2, 6);
                        i += 7;
                        break;
                    case 38:
                        // 0x26 Zcl56BitUint
                        value = data.readUIntLE(i+2, 7);
                        i += 8;
                        break;
                    case 39:
                        // 0x27 Zcl64BitUint
                        value = data.readBigUInt64BE(i+2);
                        i += 9;
                        break;
                    case 40:
                        // 0x28 Zcl8BitInt
                        value = data.readInt8(i+2);
                        i += 2;
                        break;
                    case 41:
                        // 0x29 Zcl16BitInt
                        value = data.readInt16LE(i+2);
                        i += 3;
                        break;
                    case 42:
                        // 0x2A Zcl24BitInt
                        value = data.readIntLE(i+2, 3);
                        i += 4;
                        break;
                    case 43:
                        // 0x2B Zcl32BitInt
                        value = data.readInt32LE(i+2);
                        i += 5;
                        break;
                    case 44:
                        // 0x2C Zcl40BitInt
                        value = data.readIntLE(i+2, 5);
                        i += 6;
                        break;
                    case 45:
                        // 0x2D Zcl48BitInt
                        value = data.readIntLE(i+2, 6);
                        i += 7;
                        break;
                    case 46:
                        // 0x2E Zcl56BitInt
                        value = data.readIntLE(i+2, 7);
                        i += 8;
                        break;
                    case 47:
                        // 0x2F Zcl64BitInt
                        value = data.readBigInt64BE(i+2);
                        i += 9;
                        break;
                    case 57:
                        // 0x39 ZclSingleFloat
                        value = data.readFloatLE(i+2);
                        i += 5;
                        break;
                    case 58:
                        // 0x3a ZclDoubleFloat
                        value = data.readDoubleLE(i+2);
                        i += 5;
                        break;
                    default:
                        if (meta.logger) meta.logger.debug(`${model.zigbeeModel}: unknown vtype=${data[i+1]}, pos=${i+1}`);
                    }

                    if (index == 1) {
                        payload.voltage = value;
                        payload.battery = batteryVoltageToPercentage(value, '3V_2100');
                    } else if (index === 3) {
                        if (!['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM'].includes(model.model)) {
                            payload.temperature = calibrateAndPrecisionRoundOptions(value, options, 'temperature'); // 0x03
                        }
                    } else if (index === 5) {
                        if (['JT-BZ-01AQ/A', 'RTCZCGQ11LM'].includes(model.model)) payload.power_outage_count = value;
                    } else if (index === 100) {
                        if (['QBKG20LM', 'QBKG31LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
                            const mapping = model.model === 'QBCZ15LM' ? 'relay' : 'left';
                            payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
                        } else if (['WXKG14LM', 'WXKG16LM', 'WXKG17LM'].includes(model.model)) {
                            payload.click_mode = {1: 'fast', 2: 'multi'}[value];
                        } else if (['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM'].includes(model.model)) {
                            // We don't know what the value means for these devices.
                            // https://github.com/Koenkk/zigbee2mqtt/issues/11126
                        } else {
                            payload.state = value === 1 ? 'ON' : 'OFF';
                        }
                    } else if (index === 101) {
                        if (['QBKG20LM', 'QBKG31LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
                            const mapping = model.model === 'QBCZ15LM' ? 'usb' : 'right';
                            payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
                        } else if (['QBKG25LM', 'QBKG34LM'].includes(model.model)) {
                            payload.state_center = value === 1 ? 'ON' : 'OFF';
                        } else if (['RTCGQ12LM'].includes(model.model)) {
                            payload.illuminance = calibrateAndPrecisionRoundOptions(value, options, 'illuminance');
                        } else if (['ZNJLBL01LM'].includes(model.model)) {
                            payload.battery = value;
                        }
                    } else if (index ===102 ) {
                        if (['QBKG25LM', 'QBKG34LM'].includes(model.model)) {
                            payload.state_right = value === 1 ? 'ON' : 'OFF';
                        } else if (['RTCZCGQ11LM'].includes(model.model)) {
                            payload.presence_event = {0: 'enter', 1: 'leave', 2: 'left_enter', 3: 'right_leave', 4: 'right_enter',
                                5: 'left_leave', 6: 'approach', 7: 'away', 255: null}[value];
                        }
                    } else if (index === 103) {
                        if (['RTCZCGQ11LM'].includes(model.model)) payload.monitoring_mode = value === 1 ? 'left_right' : 'undirected';
                    } else if (index === 105) {
                        if (['RTCGQ13LM'].includes(model.model)) {
                            payload.motion_sensitivity = {1: 'low', 2: 'medium', 3: 'high'}[value];
                        } else if (['RTCZCGQ11LM'].includes(model.model)) {
                            payload.approach_distance = {0: 'far', 1: 'medium', 2: 'near'}[value];
                        }
                    } else if (index === 149) {
                        payload.energy = precisionRound(value, 2); // 0x95
                        // Consumption is deprecated
                        payload.consumption = payload.energy;
                    } else if (index === 150) payload.voltage = precisionRound(value * 0.1, 1); // 0x96
                    else if (index === 151) payload.current = precisionRound(value * 0.001, 4); // 0x97
                    else if (index === 152) payload.power = precisionRound(value, 2); // 0x98
                    else if (index === 159) payload.gas_sensitivity = {1: '15%LEL', 2: '10%LEL'}[value]; // JT-BZ-01AQ/A
                    else if (index === 160) payload.gas = value === 1; // JT-BZ-01AQ/A
                    else if (index === 161) payload.gas_density = value; // JT-BZ-01AQ/A
                    else if (index === 162) payload.test = value === 1; // JT-BZ-01AQ/A
                    else if (index === 163) payload.mute = value === 1; // JT-BZ-01AQ/A
                    else if (index === 164) payload.state = value === 1 ? 'preparation' : 'work'; // JT-BZ-01AQ/A
                    else if (index === 166) payload.linkage_alarm = value === 1; // JT-BZ-01AQ/A
                    else if (meta.logger) meta.logger.debug(`${model.zigbeeModel}: unknown index ${index} with value ${value}`);
                }
			}

            if (msg.data.hasOwnProperty('0')) payload.detection_period = msg.data['0'];
            if (msg.data.hasOwnProperty('2')) {
                if (['JT-BZ-01AQ/A'].includes(model.model)) payload.power_outage_count = msg.data['2'];
            }
            if (msg.data.hasOwnProperty('4')) payload.mode_switch = {4: 'anti_flicker_mode', 1: 'quick_mode'}[msg.data['4']];
            if (msg.data.hasOwnProperty('10')) payload.switch_type = {1: 'toggle', 2: 'momentary'}[msg.data['10']];
            if (msg.data.hasOwnProperty('240')) payload.flip_indicator_light = msg.data['240'] === 1 ? 'ON' : 'OFF';
            if (msg.data.hasOwnProperty('258')) payload.detection_interval = msg.data['258'];
            if (msg.data.hasOwnProperty('268')) {
                if (['RTCGQ13LM'].includes(model.model)) {
                    payload.motion_sensitivity = {1: 'low', 2: 'medium', 3: 'high'}[msg.data['268']];
                } else if (['JT-BZ-01AQ/A'].includes(model.model)) {
                    payload.gas_sensitivity = {1: '15%LEL', 2: '10%LEL'}[msg.data['268']];
                }
            }
            if (msg.data.hasOwnProperty('293')) payload.click_mode = {1: 'fast', 2: 'multi'}[msg.data['293']];
            if (msg.data.hasOwnProperty('294')) payload.mute = msg.data['294'] === 1; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('295')) payload.test = msg.data['295'] === 1; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('313')) payload.state = msg.data['313'] === 1 ? 'preparation' : 'work'; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('314')) payload.gas = msg.data['314'] === 1; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('315')) payload.gas_density = msg.data['315']; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('322')) payload.presence = msg.data['322'] === 1; // RTCZCGQ11LM
            if (msg.data.hasOwnProperty('323')) {
                payload.presence_event = {0: 'enter', 1: 'leave', 2: 'left_enter', 3: 'right_leave', 4: 'right_enter',
                    5: 'left_leave', 6: 'approach', 7: 'away'}[msg.data['323']]; // RTCZCGQ11LM
            }
            // RTCZCGQ11LM
            if (msg.data.hasOwnProperty('324')) payload.monitoring_mode = msg.data['324'] === 1 ? 'left_right' : 'undirected';
            // RTCZCGQ11LM
            if (msg.data.hasOwnProperty('326')) payload.approach_distance = {0: 'far', 1: 'medium', 2: 'near'}[msg.data['326']];
            if (msg.data.hasOwnProperty('331')) payload.linkage_alarm = msg.data['331'] === 1; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('512')) {
                if (['ZNCZ15LM', 'QBCZ14LM', 'QBCZ15LM'].includes(model.model)) {
                    payload.button_lock = msg.data['512'] === 1 ? 'OFF' : 'ON';
                } else {
                    const mode = {0x01: 'control_relay', 0x00: 'decoupled'}[msg.data['512']];
                    payload[postfixWithEndpointName('operation_mode', msg, model)] = mode;
                }
            }
            if (msg.data.hasOwnProperty('513')) payload.power_outage_memory = msg.data['513'] === 1;
            if (msg.data.hasOwnProperty('514')) payload.auto_off = msg.data['514'] === 1;
            if (msg.data.hasOwnProperty('515')) payload.led_disabled_night = msg.data['515'] === 1;
            if (msg.data.hasOwnProperty('519')) payload.consumer_connected = msg.data['519'] === 1;
            if (msg.data.hasOwnProperty('523')) payload.overload_protection = precisionRound(msg.data['523'], 2);
            if (msg.data.hasOwnProperty('550')) payload.button_switch_mode = msg.data['550'] === 1 ? 'relay_and_usb' : 'relay';
            if (msg.data['mode'] !== undefined) payload.operation_mode = ['command', 'event'][msg.data['mode']];
            if (msg.data.hasOwnProperty('1289')) payload.dimmer_mode = {3: 'rgbw', 1: 'dual_ct'}[msg.data['1289']];
            return payload;
        },
    },
};
	
const definition = {
	
	zigbeeModel: ['lumi.relay.c2acn01'],
	model: 'LLKZMK11LM',
	vendor: 'Xiaomi',
	description: 'Aqara wireless relay controller',
	fromZigbee: [fz.xiaomi_power, fz.ignore_multistate_report, fz.on_off, fzLocal.aqara_opple],
	meta: {multiEndpoint: true},
	toZigbee: [tz.on_off, tz.LLKZMK11LM_interlock, tz.xiaomi_power],
	endpoint: (device) => {
		return {'l1': 1, 'l2': 2};
	},
	exposes: [e.power().withAccess(ea.STATE_GET), e.energy(), e.temperature(), e.voltage().withAccess(ea.STATE),
		e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
		exposes.binary('interlock', ea.STATE_SET, true, false)
			.withDescription('Enabling prevents both relais being on at the same time')],

};

module.exports = definition;

It needs a good refactor and more, but we can share our impressions about if this is working or not.

My device is not reliable again, after some time on, I don't receive the power message. A repairing fixes it, but it seems to last not much time. This device have problems before the update, the energy returned to zero several times a day.

@DJTerentjev
Copy link
Contributor

It seems to work. It's an ugly converter, almost duplicate from the current one. If someone want to test it, here is the code

It works. Thank you. Energy update every 5 minutes.

@McGiverGim
Copy link
Contributor

I've modified a little the external converter. Let's see if others can help with some doubts.

Here is the new code:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const {
    precisionRound, mapNumberRange, isLegacyEnabled, toLocalISOString, numberWithinRange, hasAlreadyProcessedMessage,
    calibrateAndPrecisionRoundOptions, addActionGroup, postfixWithEndpointName, getKey,
    batteryVoltageToPercentage, getMetaValue,
} = require('zigbee-herdsman-converters/lib/utils');
const {Buffer} = require('buffer');
const e = exposes.presets;
const ea = exposes.access;

const xiaomiBuffer2DataArray = (meta, model, buffer) => {

    const dataArray = [];

    if (buffer !== null && Buffer.isBuffer(buffer)) {

        // Xiaomi struct parsing        
        for (let i=0; i < buffer.length - 1; i++) {

            const index = buffer[i];
            let value = null;

            switch (buffer[i+1]) {
            case 1:
                // 0x01 unknown, length supposed by the data received
                if (meta.logger) meta.logger.debug(`${model.zigbeeModel}: unknown vtype=${buffer[i+1]}, pos=${i+1}, length supposed by the data received`);
                i += 4;
                break;
            case 16:
                // 0x10 ZclBoolean
                value = buffer.readUInt8(i+2);
                i += 2;
                break;
            case 32:
                // 0x20 Zcl8BitUint
                value = buffer.readUInt8(i+2);
                i += 2;
                break;
            case 33:
                // 0x21 Zcl16BitUint
                value = buffer.readUInt16LE(i+2);
                i += 3;
                break;
            case 34:
                // 0x22 Zcl24BitUint
                value = buffer.readUIntLE(i+2, 3);
                i += 4;
                break;
            case 35:
                // 0x23 Zcl32BitUint
                value = buffer.readUInt32LE(i+2);
                i += 5;
                break;
            case 36:
                // 0x24 Zcl40BitUint
                value = buffer.readUIntLE(i+2, 5);
                i += 6;
                break;
            case 37:
                // 0x25 Zcl48BitUint
                value = buffer.readUIntLE(i+2, 6);
                i += 7;
                break;
            case 38:
                // 0x26 Zcl56BitUint
                value = buffer.readUIntLE(i+2, 7);
                i += 8;
                break;
            case 39:
                // 0x27 Zcl64BitUint
                value = buffer.readBigUInt64BE(i+2);
                i += 9;
                break;
            case 40:
                // 0x28 Zcl8BitInt
                value = buffer.readInt8(i+2);
                i += 2;
                break;
            case 41:
                // 0x29 Zcl16BitInt
                value = buffer.readInt16LE(i+2);
                i += 3;
                break;
            case 42:
                // 0x2A Zcl24BitInt
                value = buffer.readIntLE(i+2, 3);
                i += 4;
                break;
            case 43:
                // 0x2B Zcl32BitInt
                value = buffer.readInt32LE(i+2);
                i += 5;
                break;
            case 44:
                // 0x2C Zcl40BitInt
                value = buffer.readIntLE(i+2, 5);
                i += 6;
                break;
            case 45:
                // 0x2D Zcl48BitInt
                value = buffer.readIntLE(i+2, 6);
                i += 7;
                break;
            case 46:
                // 0x2E Zcl56BitInt
                value = buffer.readIntLE(i+2, 7);
                i += 8;
                break;
            case 47:
                // 0x2F Zcl64BitInt
                value = buffer.readBigInt64BE(i+2);
                i += 9;
                break;
            case 57:
                // 0x39 ZclSingleFloat
                value = buffer.readFloatLE(i+2);
                i += 5;
                break;
            case 58:
                // 0x3a ZclDoubleFloat
                value = buffer.readDoubleLE(i+2);
                i += 5;
                break;
            case 95:
                // 0x5f unknown, lenght supposed by the data received
                if (meta.logger) meta.logger.debug(`${model.zigbeeModel}: unknown vtype=${buffer[i+1]}, pos=${i+1}, length supposed by the data received`);
                i += 3;
                break;

            default:
                if (meta.logger) meta.logger.debug(`${model.zigbeeModel}: unknown vtype=${buffer[i+1]}, pos=${i+1}`);
            }
            
            if (value != null) {
                dataArray.push(
                {
                    "attribute": index, 
                    "value": value 
                });
            }
        }
    }
    
    if (meta.logger) meta.logger.debug(`${model.zigbeeModel}: Processed buffer into data ${JSON.stringify(dataArray)}`); 
    
    return dataArray;
};

const fzLocal = {
    aqara_opple: {
        cluster: 'genBasic',
        type: ['raw'],
        options: (definition) => {
            const result = [];
            if (definition.exposes.find((e) => e.name === 'temperature')) {
                result.push(exposes.options.precision('temperature'), exposes.options.calibration('temperature'));
            }
            if (definition.exposes.find((e) => e.name === 'illuminance')) {
                result.push(exposes.options.precision('illuminance'), exposes.options.calibration('illuminance', 'percentual'));
            }
            return result;
        },
        convert: (model, msg, publish, options, meta) => {
            const payload = {};

            let dataArray = null;
            
            if (Buffer.isBuffer(msg.data)) {
                dataArray = xiaomiBuffer2DataArray(meta, model, msg.data);
            } else if (msg.data.hasOwnProperty('247')) {
                dataArray = xiaomiBuffer2DataArray(meta, model, msg.data['247']);
            }

            if (dataArray != null) {                

                // Xiaomi struct parsing
                for (const key in dataArray) {

                    const index = dataArray[key].attribute;
                    const value = dataArray[key].value;
 
                    if (index == 1) {
                        payload.voltage = value;
                        payload.battery = batteryVoltageToPercentage(value, '3V_2100');
                    } else if (index === 3) {
                        if (!['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM'].includes(model.model)) {
                            payload.temperature = calibrateAndPrecisionRoundOptions(value, options, 'temperature'); // 0x03
                        }
                    } else if (index === 5) {
                        if (['JT-BZ-01AQ/A', 'RTCZCGQ11LM'].includes(model.model)) payload.power_outage_count = value;
                    } else if (index === 100) {
                        if (['QBKG20LM', 'QBKG31LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
                            const mapping = model.model === 'QBCZ15LM' ? 'relay' : 'left';
                            payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
                        } else if (['WXKG14LM', 'WXKG16LM', 'WXKG17LM'].includes(model.model)) {
                            payload.click_mode = {1: 'fast', 2: 'multi'}[value];
                        } else if (['WXCJKG11LM', 'WXCJKG12LM', 'WXCJKG13LM'].includes(model.model)) {
                            // We don't know what the value means for these devices.
                            // https://github.com/Koenkk/zigbee2mqtt/issues/11126
                        } else {
                            payload.state = value === 1 ? 'ON' : 'OFF';
                        }
                    } else if (index === 101) {
                        if (['QBKG20LM', 'QBKG31LM', 'QBKG39LM', 'QBKG41LM', 'QBCZ15LM'].includes(model.model)) {
                            const mapping = model.model === 'QBCZ15LM' ? 'usb' : 'right';
                            payload[`state_${mapping}`] = value === 1 ? 'ON' : 'OFF';
                        } else if (['QBKG25LM', 'QBKG34LM'].includes(model.model)) {
                            payload.state_center = value === 1 ? 'ON' : 'OFF';
                        } else if (['RTCGQ12LM'].includes(model.model)) {
                            payload.illuminance = calibrateAndPrecisionRoundOptions(value, options, 'illuminance');
                        } else if (['ZNJLBL01LM'].includes(model.model)) {
                            payload.battery = value;
                        }
                    } else if (index === 102 ) {
                        if (['QBKG25LM', 'QBKG34LM'].includes(model.model)) {
                            payload.state_right = value === 1 ? 'ON' : 'OFF';
                        } else if (['RTCZCGQ11LM'].includes(model.model)) {
                            payload.presence_event = {0: 'enter', 1: 'leave', 2: 'left_enter', 3: 'right_leave', 4: 'right_enter',
                                5: 'left_leave', 6: 'approach', 7: 'away', 255: null}[value];
                        }
                    } else if (index === 103) {
                        if (['RTCZCGQ11LM'].includes(model.model)) payload.monitoring_mode = value === 1 ? 'left_right' : 'undirected';
                    } else if (index === 105) {
                        if (['RTCGQ13LM'].includes(model.model)) {
                            payload.motion_sensitivity = {1: 'low', 2: 'medium', 3: 'high'}[value];
                        } else if (['RTCZCGQ11LM'].includes(model.model)) {
                            payload.approach_distance = {0: 'far', 1: 'medium', 2: 'near'}[value];
                        }
                    } else if (index === 149) {
                        payload.energy = precisionRound(value, 2); // 0x95
                        // Consumption is deprecated
                        payload.consumption = payload.energy;
                    } else if (index === 150) payload.voltage = precisionRound(value * 0.1, 1); // 0x96
                    else if (index === 151) payload.current = precisionRound(value * 0.001, 4); // 0x97
                    else if (index === 152) payload.power = precisionRound(value, 2); // 0x98
                    else if (index === 159) payload.gas_sensitivity = {1: '15%LEL', 2: '10%LEL'}[value]; // JT-BZ-01AQ/A
                    else if (index === 160) payload.gas = value === 1; // JT-BZ-01AQ/A
                    else if (index === 161) payload.gas_density = value; // JT-BZ-01AQ/A
                    else if (index === 162) payload.test = value === 1; // JT-BZ-01AQ/A
                    else if (index === 163) payload.mute = value === 1; // JT-BZ-01AQ/A
                    else if (index === 164) payload.state = value === 1 ? 'preparation' : 'work'; // JT-BZ-01AQ/A
                    else if (index === 166) payload.linkage_alarm = value === 1; // JT-BZ-01AQ/A
                    else if (meta.logger) meta.logger.debug(`${model.zigbeeModel}: unknown index ${index} with value ${value}`);
                }
            }

            if (msg.data.hasOwnProperty('0')) payload.detection_period = msg.data['0'];
            if (msg.data.hasOwnProperty('2')) {
                if (['JT-BZ-01AQ/A'].includes(model.model)) payload.power_outage_count = msg.data['2'];
            }
            if (msg.data.hasOwnProperty('4')) payload.mode_switch = {4: 'anti_flicker_mode', 1: 'quick_mode'}[msg.data['4']];
            if (msg.data.hasOwnProperty('10')) payload.switch_type = {1: 'toggle', 2: 'momentary'}[msg.data['10']];
            if (msg.data.hasOwnProperty('240')) payload.flip_indicator_light = msg.data['240'] === 1 ? 'ON' : 'OFF';
            if (msg.data.hasOwnProperty('258')) payload.detection_interval = msg.data['258'];
            if (msg.data.hasOwnProperty('268')) {
                if (['RTCGQ13LM'].includes(model.model)) {
                    payload.motion_sensitivity = {1: 'low', 2: 'medium', 3: 'high'}[msg.data['268']];
                } else if (['JT-BZ-01AQ/A'].includes(model.model)) {
                    payload.gas_sensitivity = {1: '15%LEL', 2: '10%LEL'}[msg.data['268']];
                }
            }
            if (msg.data.hasOwnProperty('293')) payload.click_mode = {1: 'fast', 2: 'multi'}[msg.data['293']];
            if (msg.data.hasOwnProperty('294')) payload.mute = msg.data['294'] === 1; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('295')) payload.test = msg.data['295'] === 1; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('313')) payload.state = msg.data['313'] === 1 ? 'preparation' : 'work'; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('314')) payload.gas = msg.data['314'] === 1; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('315')) payload.gas_density = msg.data['315']; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('322')) payload.presence = msg.data['322'] === 1; // RTCZCGQ11LM
            if (msg.data.hasOwnProperty('323')) {
                payload.presence_event = {0: 'enter', 1: 'leave', 2: 'left_enter', 3: 'right_leave', 4: 'right_enter',
                    5: 'left_leave', 6: 'approach', 7: 'away'}[msg.data['323']]; // RTCZCGQ11LM
            }
            // RTCZCGQ11LM
            if (msg.data.hasOwnProperty('324')) payload.monitoring_mode = msg.data['324'] === 1 ? 'left_right' : 'undirected';
            // RTCZCGQ11LM
            if (msg.data.hasOwnProperty('326')) payload.approach_distance = {0: 'far', 1: 'medium', 2: 'near'}[msg.data['326']];
            if (msg.data.hasOwnProperty('331')) payload.linkage_alarm = msg.data['331'] === 1; // JT-BZ-01AQ/A
            if (msg.data.hasOwnProperty('512')) {
                if (['ZNCZ15LM', 'QBCZ14LM', 'QBCZ15LM'].includes(model.model)) {
                    payload.button_lock = msg.data['512'] === 1 ? 'OFF' : 'ON';
                } else {
                    const mode = {0x01: 'control_relay', 0x00: 'decoupled'}[msg.data['512']];
                    payload[postfixWithEndpointName('operation_mode', msg, model)] = mode;
                }
            }
            if (msg.data.hasOwnProperty('513')) payload.power_outage_memory = msg.data['513'] === 1;
            if (msg.data.hasOwnProperty('514')) payload.auto_off = msg.data['514'] === 1;
            if (msg.data.hasOwnProperty('515')) payload.led_disabled_night = msg.data['515'] === 1;
            if (msg.data.hasOwnProperty('519')) payload.consumer_connected = msg.data['519'] === 1;
            if (msg.data.hasOwnProperty('523')) payload.overload_protection = precisionRound(msg.data['523'], 2);
            if (msg.data.hasOwnProperty('550')) payload.button_switch_mode = msg.data['550'] === 1 ? 'relay_and_usb' : 'relay';
            if (msg.data['mode'] !== undefined) payload.operation_mode = ['command', 'event'][msg.data['mode']];
            if (msg.data.hasOwnProperty('1289')) payload.dimmer_mode = {3: 'rgbw', 1: 'dual_ct'}[msg.data['1289']];
            return payload;
        },
    },
};
    
const definition = {
    
    zigbeeModel: ['lumi.relay.c2acn01'],
    model: 'LLKZMK11LM',
    vendor: 'Xiaomi',
    description: 'Aqara wireless relay controller',
    fromZigbee: [fz.xiaomi_power, fz.ignore_multistate_report, fz.on_off, fzLocal.aqara_opple],
    meta: {multiEndpoint: true},
    toZigbee: [tz.on_off, tz.LLKZMK11LM_interlock, tz.xiaomi_power],
    endpoint: (device) => {
        return {'l1': 1, 'l2': 2};
    },
    exposes: [e.power().withAccess(ea.STATE_GET), e.energy(), e.temperature(), e.voltage().withAccess(ea.STATE),
        e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'),
        exposes.binary('interlock', ea.STATE_SET, true, false)
            .withDescription('Enabling prevents both relais being on at the same time')],

};

module.exports = definition;

Differences with the earlier version:

  1. It moves the data extraction from the buffer to a function to simplify. In this way, it shows in debug mode all the data exported, like this:
debug 2022-03-03 10:08:48: lumi.relay.c2acn01: Processed buffer into data [{"attribute":3,"value":36},{"attribute":5,"value":112},{"attribute":8,"value":4655},{"attribute":9,"value":4355},{"attribute":100,"value":0},{"attribute":101,"value":0},{"attribute":110,"value":0},{"attribute":111,"value":0},{"attribute":148,"value":0},{"attribute":149,"value":0.042500000447034836},{"attribute":150,"value":0},{"attribute":151,"value":0},{"attribute":152,"value":0},{"attribute":155,"value":16},{"attribute":156,"value":1},{"attribute":10,"value":48688},{"attribute":12,"value":0}]
  1. The old algorithm, when finds a data type that does not understand moves to the next byte. Is the only way to do that, we don't know the lenght of it, but produces that it finds wrong data when one of the values is equal to one of the data types. Looking at some logs I think I can extract the lenght of the two unknown types and at least move the number of bytes needed to the next. It will be great if someone can post some of his buffers, to see if I can confirm it:
debug 2022-03-03 10:08:48: Received Zigbee message from 'rele_cocina', type 'raw', cluster 'genBasic', data '{"data":[28,95,17,67,10,1,255,66,68,3,40,36,5,33,112,0,8,33,47,18,9,33,3,17,100,16,0,101,16,0,110,32,0,111,32,0,148,32,0,149,57,123,20,46,61,150,57,0,0,0,0,151,57,0,0,0,0,152,57,0,0,0,0,155,33,16,0,156,32,1,10,33,48,190,12,40,0,0],"type":"Buffer"}' from endpoint 1 with groupID 0

28,95,17,67, -> ? (data length 2 for type 95)
10,1,255,66,68, -> ? (data length 3 for type 1) The attribute 10 appears later too, so maybe something is wrong here
  1. Here maybe you can help me, there are a lot of attributes that we don't know what they are:
debug 2022-03-03 11:06:15: lumi.relay.c2acn01: Processed buffer into data [{"attribute":3,"value":36},{"attribute":5,"value":112},{"attribute":8,"value":4655},{"attribute":9,"value":4355},{"attribute":100,"value":1},{"attribute":101,"value":0},{"attribute":110,"value":1},{"attribute":111,"value":0},{"attribute":148,"value":0},{"attribute":149,"value":0.042500000447034836},{"attribute":150,"value":0},{"attribute":151,"value":0},{"attribute":152,"value":0},{"attribute":155,"value":16},{"attribute":156,"value":1},{"attribute":10,"value":0},{"attribute":12,"value":0}]

// VALUES FOUND
{"attribute":3,"value":36} -> Temperature
{"attribute":5,"value":112} -> For other devices is the power outage count? It seems to high to me.
{"attribute":149,"value":0.042500000447034836} -> Energy
{"attribute":150,"value":0} ->  Voltage
{"attribute":151,"value":0} -> Current
{"attribute":152,"value":0} -> Power

// VALUES NOT FOUND
debug 2022-03-03 11:06:15: lumi.relay.c2acn01: unknown index 8 with value 4655
debug 2022-03-03 11:06:15: lumi.relay.c2acn01: unknown index 9 with value 4355
debug 2022-03-03 11:06:15: lumi.relay.c2acn01: unknown index 110 with value 1
debug 2022-03-03 11:06:15: lumi.relay.c2acn01: unknown index 111 with value 0
debug 2022-03-03 11:06:15: lumi.relay.c2acn01: unknown index 148 with value 0
debug 2022-03-03 11:06:15: lumi.relay.c2acn01: unknown index 155 with value 16
debug 2022-03-03 11:06:15: lumi.relay.c2acn01: unknown index 156 with value 1
debug 2022-03-03 11:06:15: lumi.relay.c2acn01: unknown index 10 with value 0 -> The attribute 10 appears before, so maybe something is wrong
debug 2022-03-03 11:06:15: lumi.relay.c2acn01: unknown index 12 with value 0

As you can see, I have some values with zero (like voltage). When I repair the device it shows the correct value for some time, after that it fails again. This device has always give me some problems, I think my unit is faulty, so it will be great if you can confirm that this only happens to me.

@McGiverGim
Copy link
Contributor

Looking again at the logs the two unknown values from the beginning can be used in two different ways:

{"data":[28,95,17,67,10,1,255,66,68,...

// Option 1
28,95,17,67, -> ? (attribute 28, data type 95, value length 2)
10,1,255,66,68, -> ? (attribute 10, data type 1, value length 3. The attribute 10 appears later too, so maybe something is wrong here

// Option 2
28,95,17,67,10,1, -> ? (attribute 28, data type 95, value length 4)
255,66,68, -> ? (attribute 255, data type 66, value length 1)

My code uses the first, but I think maybe the second one is the correct, in this way there is no attribute 10 duplicated in the buffer.

@DJTerentjev
Copy link
Contributor

Please see my log file with latest code of converter ... if it can help
_addon_45df7312_zigbee2mqtt_edge_logs-3.txt

@McGiverGim
Copy link
Contributor

McGiverGim commented Mar 3, 2022

I think your log has too much level :P a simple debug logging it's enough. But I have extracted the important from it.

  • It does not solve my doubt about the data length in the first bytes. They are very similar to mine, so I'm not sure what bytes can change (contain the value).
  • I see several attributes have different values than mine, but I don't know what they are. For example the 148 you have with values 1 and 2, and I only have with 0. The attribute 9 is very different too, mine 256, yours 4355.
  • Looking at mine again, I think the 110 and 111 (or the 100, 101, seem to change at the same time) are the value for the switch 1 and switch 2. Can have a 0 (off), 1 (on) and I have seen some of them with a 255 (usually a null value, strange that it can be null). It seems I can't find some for the interlock feature.

It will be interesting to see if the energy and voltage continues working in your system. As I said, mine after some hours starts to be zero, but I think is a faulty unit.

@DJTerentjev
Copy link
Contributor

It will be interesting to see if the energy and voltage continues working in your system. As I said, mine after some hours starts to be zero, but I think is a faulty unit.

I will inform you. How often it's drop to zero?

@McGiverGim
Copy link
Contributor

Mine after few hours, less than a day, sometimes several times a day.

@DJTerentjev
Copy link
Contributor

Looks good after 24 hrs:
image
image

@McGiverGim
Copy link
Contributor

Thanks @DJTerentjev for the report! It's clear that is my unit that is faulty.

I have pushed a PR Koenkk/zigbee-herdsman-converters#3956 that fix the problem. I hope it will be merged soon into the edge version.

@McGiverGim
Copy link
Contributor

The PR has been merged into the Edge version. If someone tests it and finds a problem please report me. It seems to be working.

@sensei73
Copy link

sensei73 commented Apr 13, 2022

I think there is still a problem with the energy meter, mine stop increasing.

@oembsod
Copy link

oembsod commented May 5, 2022

Good afternoon, does anyone else have a problem with the random inclusion of channels on the new firmware "9-22-2021". I noticed that this happens when the channel button is enabled. Maybe there is a solution?

@snippem wrote about it

And also because my switches with the new firmware sometimes turn on and off all happening within a second.

@McGiverGim
Copy link
Contributor

In my case, that as I say the device becomes "defective" after some time, I have observed that the field power_outage_count has a very big value. Maybe you see this on/off after a reboot of the device (detected as power outage). Can you verify this value to see if you have the same problem?

@oembsod
Copy link

oembsod commented May 5, 2022

The second line is "state_l2":"ON" and "power_outage_count":73. After 30 seconds, the last line is "power_outage_count": 74 and "temperature": 0, as if the relay has rebooted
@McGiverGim looks like a bad relay?

2022-04-30 04:38:50: 'lumi.relay.c2acn01_bedroom', payload '{..."linkquality":214,"power":0,"power_outage_count":73,"power_outage_memory":true,"state_l1":"OFF","state_l2":"OFF","temperature":32,"update":{"state":"idle"},"update_available":false,"voltage":231.8}'
2022-04-30 04:39:18: 'lumi.relay.c2acn01_bedroom', payload '{..."linkquality":204,"power":0,"power_outage_count":73,"power_outage_memory":true,"state_l1":"OFF","state_l2":"ON","temperature":32,"update":{"state":"idle"},"update_available":false,"voltage":231.8}'
2022-04-30 04:39:19: 'lumi.relay.c2acn01_bedroom', payload '{..."linkquality":207,"power":0,"power_outage_count":73,"power_outage_memory":true,"state_l1":"OFF","state_l2":"OFF","temperature":32,"update":{"state":"idle"},"update_available":false,"voltage":231.8}'
2022-04-30 04:39:20: 'lumi.relay.c2acn01_bedroom', payload '{..."linkquality":211,"power":0,"power_outage_count":73,"power_outage_memory":true,"state_l1":"OFF","state_l2":"OFF","temperature":32,"update":{"state":"idle"},"update_available":false,"voltage":231.8}'
2022-04-30 04:39:20: 'lumi.relay.c2acn01_bedroom', payload '{..."linkquality":211,"power":0,"power_outage_count":73,"power_outage_memory":true,"state_l1":"OFF","state_l2":"OFF","temperature":32,"update":{"state":"idle"},"update_available":false,"voltage":231.8}'
2022-04-30 04:39:21: 'lumi.relay.c2acn01_bedroom', payload '{..."linkquality":211,"power":0,"power_outage_count":74,"power_outage_memory":true,"state_l1":"OFF","state_l2":"OFF","temperature":0,"update":{"state":"idle"},"update_available":false,"voltage":233.5}'

@McGiverGim
Copy link
Contributor

I think so. Is not a bad relay. Is more that for some reason something breaks it. I've three relays and one of them started to work "bad". I replaced it. After some time of use, the same relay broke again. So it seems to me that something breaks it.

@oembsod
Copy link

oembsod commented May 5, 2022

I think so. Is not a bad relay. Is more that for some reason something breaks it. I've three relays and one of them started to work "bad". I replaced it. After some time of use, the same relay broke again. So it seems to me that something breaks it.

have you tried to rollback the firmware?

@McGiverGim
Copy link
Contributor

This happened too with old firmware. Precisely I updated the firmware to see if goes better, but not...

nukusinji added a commit to nukusinji/zigbee-OTA that referenced this issue Aug 18, 2022
commit 6e9fd56
Author: Ryan Kim(True-World) <[email protected]>
Date:   Thu Aug 18 01:15:32 2022 +0900

    add csm-300z v2 OTA (Koenkk#148)

    * add csm-300z v2

    * add ota file

commit f4c7cec
Author: Otnow <[email protected]>
Date:   Sun Aug 14 23:04:17 2022 +0300

    Add and update OTA files for some Xiaomi devices (Koenkk#147)

commit ff6e43f
Author: Peter A. Bigot <[email protected]>
Date:   Wed Aug 3 23:59:49 2022 -0700

    Remove _TZE200_hue3yfsn firmware (Koenkk#146)

    Upstream issues 104 through 107 cause problems.  Drop the firmware involved.

commit a7483c2
Author: Dávid Nagy <[email protected]>
Date:   Fri Jul 29 17:07:56 2022 +0200

    Add HC-SLM-1 OTA (Koenkk#143)

    * add home control as zigbee binary

    * added manufacture name, revert additional changes

    * Delete package-lock.json

    * Update index.json

    Co-authored-by: root <[email protected]>
    Co-authored-by: Koen Kanters <[email protected]>

commit 74d6c15
Author: Otnow <[email protected]>
Date:   Sun Jul 17 23:20:01 2022 +0300

    Update OTA file for Xiaomi `QBKG31LM` (Koenkk#142)

commit 81262e5
Author: Otnow <[email protected]>
Date:   Sun Jul 17 23:17:45 2022 +0300

    Add OTA file for Xiaomi `ZNCZ12LM` (Koenkk#141)

commit 60842bc
Author: Otnow <[email protected]>
Date:   Sun Jul 17 23:17:36 2022 +0300

    Update OTA file for Xiaomi `SP-EUC01` (Koenkk#140)

commit c1d3601
Author: Otnow <[email protected]>
Date:   Sun Jul 17 23:17:20 2022 +0300

    Update OTA file for Xiaomi `ZNCZ04LM` (Koenkk#139)

commit 91de0ee
Author: Otnow <[email protected]>
Date:   Mon Jul 11 18:31:29 2022 +0300

    Add OTA file for Xiaomi `RTCGQ14LM` (Koenkk#137)

commit 54410a4
Author: ChrisHae <[email protected]>
Date:   Wed Jul 6 17:22:42 2022 +0200

    Changed FLS-PP old firmware version ota file to new version (Koenkk#132)

    * Added new FLS-PP firmware version

    * Delete olf FLS-PP firmware ota file

    * Updated index.js with new FLS-PP firmware version

commit 494a381
Author: renoutg <[email protected]>
Date:   Wed Jul 6 17:01:37 2022 +0200

    Add GL-D-006P OTA (Koenkk#135)

    Co-authored-by: Renout Gerrits <[email protected]>

commit 2682c3f
Author: TheJulianJES <[email protected]>
Date:   Fri Jul 1 23:20:42 2022 +0200

    Updated Hue images (Koenkk#133)

commit e9d897d
Author: TheJulianJES <[email protected]>
Date:   Mon Jun 27 19:26:05 2022 +0200

    Added older Hue Adore image (Koenkk#131)

commit 5eadb30
Author: alxbator <[email protected]>
Date:   Sat Jun 18 10:54:29 2022 +0300

    Update OTA file for ZNCLDJ11LM and remove old one for ZNGZDJ11LM (Koenkk#128)

    * Add OTA file for ZNCLDJ11LM

    * Remove prev OTA files for ZNCLDJ11LM and ZNGZDJ11LM

    Co-authored-by: alxbator <>

commit 07811ac
Author: PietPetrus <[email protected]>
Date:   Fri Jun 17 16:58:49 2022 +0200

    Tuya/Telink OTA TS011F _TZ3000_ky0fq4ho v1.0.13 (Koenkk#129)

    * Tuya/Telink OTA TS011F _TZ3000_ky0fq4ho v1.0.13

    * Update index.json

    * Revert "Update index.json"

    This reverts commit b85efea.

commit 24d7239
Author: Koen Kanters <[email protected]>
Date:   Thu Jun 16 19:07:09 2022 +0200

    Add GL-G-001P ota. Koenkk/zigbee2mqtt#12841

commit e55e4b9
Author: Otnow <[email protected]>
Date:   Thu Jun 16 17:57:11 2022 +0300

    Update OTA file for Xiaomi RTCZCGQ11LM (Koenkk#127)

commit c5a5cce
Author: alxbator <[email protected]>
Date:   Thu Jun 16 17:52:45 2022 +0300

    Add OTA file for ZNGZDJ11LM (Koenkk#126)

    Co-authored-by: alxbator <>

commit b6c8127
Author: Koen Kanters <[email protected]>
Date:   Tue Jun 7 18:01:55 2022 +0200

    Revert "Add Gledopto GL-C-008P firmware preinstalled on recent models (Koenkk#124)" (Koenkk#125)

    This reverts commit 40871b5.

commit 40871b5
Author: Martin Böh <[email protected]>
Date:   Sat Jun 4 14:03:23 2022 +0200

    Add Gledopto GL-C-008P firmware preinstalled on recent models (Koenkk#124)

commit 9c2cee9
Author: guozi7788 <[email protected]>
Date:   Sat May 21 15:57:33 2022 +0800

    Add the new image of ZBMINI-L (Koenkk#123)

    * 1.Add the new image of ZBMINI-L

    * 1.Update the Info of ZBMINI-L in the index.json

    Co-authored-by: Howjie.Zhou <[email protected]>

commit cb439c5
Author: Martin Böh <[email protected]>
Date:   Tue May 17 16:53:52 2022 +0200

    Add some fixed Gledopto telink firmwares, z2m#11202 (Koenkk#121)

commit 5e1341f
Author: MDW <[email protected]>
Date:   Mon May 16 17:05:00 2022 +0200

    Add lixee (third party link) (Koenkk#120)

    * Add lixy (third party link)

    * Remove 'local' path for ZLinky

commit 0cdb428
Author: Koen Kanters <[email protected]>
Date:   Mon May 16 16:45:19 2022 +0200

    Handle redirects. Koenkk#114

commit 19e73f7
Author: MDW <[email protected]>
Date:   Mon May 16 16:15:55 2022 +0200

    Add Ubisys images (Koenkk#117)

    * Add ubisys

    * Add images from https://www.ubisys.de/en/support/firmware/

commit ef189d3
Author: Francisco Javier <[email protected]>
Date:   Mon May 16 15:58:48 2022 +0200

    Add OTA file for Aqara SSM-U01 (Koenkk#116)

commit 55dbb99
Author: MDW <[email protected]>
Date:   Mon May 16 15:40:03 2022 +0200

    Rename Eurotronic into Jennic because the manfid is not Eurotronic specific (Koenkk#118)

commit ade0ae2
Author: TheJulianJES <[email protected]>
Date:   Wed May 11 19:15:08 2022 +0200

    Updated Hue image (Koenkk#113)

commit 4bb6973
Author: TheJulianJES <[email protected]>
Date:   Thu May 5 09:10:12 2022 +0200

    Updated Hue image (Koenkk#112)

commit 207a548
Author: TheJulianJES <[email protected]>
Date:   Sun Apr 17 19:13:12 2022 +0200

    Added new Hue image: ConfLightBLE-PortableV3 (Koenkk#110)

commit 8c076f8
Author: TheJulianJES <[email protected]>
Date:   Wed Apr 13 16:52:44 2022 +0200

    Add new Hue images, improve order (Koenkk#109)

    * Add new Hue images

    * Improve order for Hue images

commit f51ed04
Author: David Beitey <[email protected]>
Date:   Sun Apr 10 18:02:48 2022 +1000

    Add linter to automatically validate changes (Koenkk#108)

commit 47d0495
Author: David Beitey <[email protected]>
Date:   Sun Apr 10 18:01:45 2022 +1000

    Fix JSON structure in index.json (Koenkk#107)

    This fixes Koenkk/zigbee2mqtt#12126 because the JSON was an invalid structure

commit 9b82ae9
Author: Vladimir <[email protected]>
Date:   Sat Apr 9 18:04:16 2022 +0200

    TV02-Zigbee OTA-update version 2.0.4 (Koenkk#106)

    * Update add.js

    * Update index.json

    * Update index.json

    * Update add.js

    * Update index.json

    * Update index.json

    * Update index.json

    * Update index.json

    * Update index.json

    * Update index.json

    * Add files via upload

    * Update index.json

    * Delete TV02-Zigbee_MCU Module_2.0.4_164155152229641863dfc.bin

    * Add files via upload

    * Update index.json

    * Update index.json

commit 6c60725
Author: Otnow <[email protected]>
Date:   Wed Apr 6 17:54:53 2022 +0300

    Add OTA file for JT-BZ-01AQ/A (Koenkk#105)

commit f79a851
Author: alxbator <[email protected]>
Date:   Fri Apr 1 17:53:46 2022 +0300

    Add OTA file for ZNDDMK11LM (Koenkk#102)

    Co-authored-by: alxbator <>

commit 322fb62
Author: Otnow <[email protected]>
Date:   Wed Mar 30 18:02:39 2022 +0300

    Add OTA file for JY-GZ-01AQ (Koenkk#101)

commit 49cdf2d
Author: Otnow <[email protected]>
Date:   Tue Mar 8 21:10:52 2022 +0300

    Add OTA file for RTCZCGQ11LM (Koenkk#100)

commit 126f99b
Author: hb020 <[email protected]>
Date:   Sat Mar 5 10:08:57 2022 +0100

    update for Aqara TVOC sensor (VOCKQJK11LM) (Koenkk#99)

    * update of lumi.airmonitor.acn01

    * update for Aqara TVOC sensor (VOCKQJK11LM)

commit 0fdb548
Author: TheJulianJES <[email protected]>
Date:   Sun Feb 27 13:46:43 2022 +0100

    Fix lumi.curtain.acn002 update (Koenkk#98)

commit 186f83a
Author: Schwick <[email protected]>
Date:   Fri Feb 25 19:39:21 2022 +0100

    Updated firmware for lumi.curtain.acn002 to version 1427 (Koenkk#97)

commit adb377d
Author: Henrik Nilsson <[email protected]>
Date:   Thu Feb 24 16:53:25 2022 +0100

    Add old firmware of Hue Go (LLC020) (Koenkk#96)

    This makes it possible to update from older versions.

commit 4091095
Author: z-x-f <[email protected]>
Date:   Thu Feb 24 02:11:49 2022 +0800

    Update DLKZMK11LM OTA file (Koenkk#95)

    Version: 39

commit 0a4ce70
Author: zvldz <[email protected]>
Date:   Sat Feb 12 10:41:07 2022 +0200

    Add Neo NAS-WR01B(TS011F_plug) OTA file (Koenkk#94)

    Co-authored-by: zvldz <[email protected]>

commit 0d1566f
Author: TheJulianJES <[email protected]>
Date:   Sun Feb 6 13:58:46 2022 +0100

    Updated Hue images (Koenkk#93)

commit 7643c1b
Author: zvldz <[email protected]>
Date:   Fri Jan 28 18:08:27 2022 +0200

    Add QBKG40LM and QBKG41LM ota files (Koenkk#90)

    * Add lumi.switch.b1nc01(QBKG40LM) and lumi.switch.b2nc01(QBKG41LM) ota files

    * Add modelId for lumi.switch.b2nacn01, lumi.switch.b1nacn01 and lumi.switch.n0acn2

    Co-authored-by: zvldz <[email protected]>
    Co-authored-by: Koen Kanters <[email protected]>

commit 22ac482
Author: z-x-f <[email protected]>
Date:   Sat Jan 29 00:01:24 2022 +0800

    Add QBKG31LM OTA file (Koenkk#92)

commit ab3e5eb
Author: zvldz <[email protected]>
Date:   Thu Jan 27 17:21:29 2022 +0200

    Update lumi.ctrl_ln1.aq1(QBKG11LM) and lumi.ctrl_ln2.aq1(QBKG12LM) (Koenkk#89)

    * Update lumi.ctrl_ln1.aq1(QBKG11LM) and lumi.ctrl_ln2.aq1(QBKG12LM) ota files

    * Delete lumi.ctrl_ln1.aq1_20201206_v0092.ota

    * Delete lumi.ctrl_ln2.aq1_20201106_v0092.ota

    Co-authored-by: root <[email protected]>
    Co-authored-by: Koen Kanters <[email protected]>

commit 407c5c6
Author: Otnow <[email protected]>
Date:   Mon Jan 24 18:30:53 2022 +0300

    Added OTA files for RTCGQ12LM and RTCGQ13LM (Koenkk#88)

commit 14a80d1
Author: zvldz <[email protected]>
Date:   Sun Jan 23 14:47:04 2022 +0200

    Update lumi.plug(ZNCZ02LM) ota file (Koenkk#87)

    * Update lumi.plug(ZNCZ02LM) ota file

    * Delete OTA_lumi.plug_V90_20191220_E2AB53.20200106152408.ota

    Co-authored-by: zvldz <[email protected]>
    Co-authored-by: Koen Kanters <[email protected]>

commit d946ddf
Author: hb020 <[email protected]>
Date:   Sat Jan 22 10:58:31 2022 +0100

    update of lumi.airmonitor.acn01 (Koenkk#86)

commit b6d0578
Author: bsheepdiy <[email protected]>
Date:   Fri Jan 21 16:16:16 2022 +0100

    Firmware for Legrand Netamo devices (Koenkk#85)

commit e97d84b
Author: zvldz <[email protected]>
Date:   Wed Jan 19 12:32:47 2022 +0200

    Added new OTA lumi.relay.c2acn01 (Koenkk#84)

    Co-authored-by: root <[email protected]>

commit c23ebde
Author: Koen Kanters <[email protected]>
Date:   Thu Jan 13 19:08:12 2022 +0100

    Revert "Firmware for EasyAccess/Home Control/Wattle Door Locks HC-SLM-1 (Koenkk#78)"

    This reverts commit 640dd5a.

commit 2fd2906
Author: Koen Kanters <[email protected]>
Date:   Sun Jan 9 20:51:24 2022 +0100

    Add older firmware images for Hue devices. Koenkk/zigbee2mqtt#8719

commit 05b1b83
Author: Marius <[email protected]>
Date:   Tue Jan 4 09:04:12 2022 +0100

    new hue smartplug firmware (Koenkk#80)

commit 640dd5a
Author: heinekmadsen <[email protected]>
Date:   Mon Jan 3 09:41:20 2022 +0100

    Firmware for EasyAccess/Home Control/Wattle Door Locks HC-SLM-1 (Koenkk#78)

    * Firmware for EasyAccess/Home Control/Wattle Door Locks

    * Added modelId

    * Update index.json

    * Delete index.json.bak

    Co-authored-by: Koen Kanters <[email protected]>

commit 266d16b
Author: David Beitey <[email protected]>
Date:   Mon Jan 3 17:55:02 2022 +1000

    Update Philips Hue smart plug firmware (Koenkk#79)

    * Update Philips Hue smart plug firmware to 1.93.1

    * Update Philips Hue smart plug firmware to 1.93.5

    * Update Philips Hue smart plug firmware to 1.93.6

commit 5acb22a
Author: Marius <[email protected]>
Date:   Fri Dec 31 11:09:16 2021 +0100

    new hue firmware (Koenkk#76)

commit b306729
Author: z-x-f <[email protected]>
Date:   Fri Dec 31 02:32:04 2021 +0800

    Add QBKG34LM OTA file (Koenkk#75)

    Co-authored-by: Koen Kanters <[email protected]>

commit 516123f
Author: z-x-f <[email protected]>
Date:   Tue Dec 21 01:23:58 2021 +0800

    Add QBCZ15LM OTA file (Koenkk#74)

    * Add QBCZ15LM OTA file

    * Update index.json

    Co-authored-by: Koen Kanters <[email protected]>

commit a53edfd
Author: z-x-f <[email protected]>
Date:   Wed Dec 15 00:26:03 2021 +0800

    Update QBCZ14LM OTA file (Koenkk#71)

    * Update QBCZ14LM OTA files

    Version: 50

    * add modelID

    Co-authored-by: Koen Kanters <[email protected]>

commit 32d8cf6
Author: z-x-f <[email protected]>
Date:   Wed Dec 15 00:24:57 2021 +0800

    Update ZNCZ15LM OTA file (Koenkk#72)

    * Update ZNCZ15LM OTA file

    Version: 32

    * Add modelID

commit 70d4cf6
Author: z-x-f <[email protected]>
Date:   Wed Dec 15 00:01:43 2021 +0800

    Update QBKG19LM OTA file (Koenkk#73)

    Version: 26

commit 7f3800d
Author: Char-r <[email protected]>
Date:   Fri Dec 10 09:27:21 2021 +0100

    Added new Danfoss Ally firmware 1.18 (Koenkk#70)

    * Added new Danfoss Ally firmware 1.18

    * Delete 1246-0100-01080108.0002_(DF4ECCE1).ota

    Co-authored-by: Koen Kanters <[email protected]>

commit 620bcfb
Author: z-x-f <[email protected]>
Date:   Fri Dec 10 01:14:08 2021 +0800

    Update QBKG20LM OTA files (Koenkk#69)

    * Update QBKG20LM OTA files

    * Delete 20210426151721_OTA_lumi.switch.b2nacn01_0.0.0_0025_20210416_A81FC5.ota

    Co-authored-by: Koen Kanters <[email protected]>

commit 7090ff1
Author: TheJulianJES <[email protected]>
Date:   Wed Dec 8 08:37:59 2021 +0100

    Updated Hue images (Koenkk#68)

commit 715490e
Author: Koen Kanters <[email protected]>
Date:   Tue Nov 30 19:11:05 2021 +0100

    Add new hue firmwares. Koenkk#67

commit 4cc4014
Author: Whiterat <[email protected]>
Date:   Mon Nov 29 18:06:34 2021 +0000

    Add lumi.curtain.acn002 v0.0.0_1425 (Koenkk#66)

    * Add lumi.curtain.acn002 v0.0.0_1425

    Change log simply shows "Optimize the Homekit experience"

    * Add modelId

    Add modelId attr to lumi.curtain.acn002

commit 3229070
Author: Koen Kanters <[email protected]>
Date:   Fri Nov 19 19:34:07 2021 +0100

    Revert "Add GL-C-006P firmware (Koenkk#64)"

    This reverts commit d492f90.

commit d492f90
Author: Sineos <[email protected]>
Date:   Wed Nov 17 22:48:32 2021 +0100

    Add GL-C-006P firmware (Koenkk#64)

    Version: 10276801
    Date: 2021-07-19

commit b2a3f09
Author: Koen Kanters <[email protected]>
Date:   Wed Nov 17 19:39:27 2021 +0100

    Add modelId for GL-D-005P. Koenkk#60

commit e7138f0
Author: Koen Kanters <[email protected]>
Date:   Tue Nov 16 18:56:36 2021 +0100

    Fix manufacturerName removed by updateall.js. Koenkk#62

commit 0431775
Author: zvldz <[email protected]>
Date:   Tue Nov 16 13:21:19 2021 +0200

    Added OTA for lumi.switch.n0agl1 (Koenkk#61)

    Co-authored-by: root <[email protected]>

commit fafa171
Author: TheJulianJES <[email protected]>
Date:   Tue Nov 16 12:20:26 2021 +0100

    Update Hue images (Koenkk#63)

commit db0ead7
Author: cemonneau <[email protected]>
Date:   Thu Nov 11 20:12:06 2021 +0100

    Fix image parsing when the upgrade file identifier is not at position 0 (Koenkk#59)

commit 0d90c97
Author: zvldz <[email protected]>
Date:   Thu Nov 11 21:04:30 2021 +0200

    Added new OTA for ctrl_ln1.aq1 and ctrl_ln2.aq1 (Koenkk#58)

    Co-authored-by: zvldz <[email protected]>

commit 01d304d
Author: InsaneGriever <[email protected]>
Date:   Wed Nov 10 21:36:12 2021 +0300

    Add GL-D-005P OTA file (Koenkk#57)

    * Add GL-D-005P OTA file

    * Add GL-D-005P OTA file

commit e4cfe36
Author: z-x-f <[email protected]>
Date:   Sat Nov 6 00:02:01 2021 +0800

    Add DLKZMK11LM OTA file (Koenkk#56)

commit 8185119
Author: Vladimir <[email protected]>
Date:   Mon Nov 1 19:02:06 2021 +0100

    In the case of Tuya end Moes, additional identification is carried out through the manufacturerName. (Koenkk#50)

    * Update add.js

    * Update index.json

    * Update index.json

    * Update add.js

    * Update index.json

    * Update index.json

    * Update index.json

    * Update index.json

commit 223eb4e
Author: z-x-f <[email protected]>
Date:   Sat Oct 30 14:50:40 2021 +0800

    Add QBKG19LM OTA file (Koenkk#54)

commit 0c609af
Author: z-x-f <[email protected]>
Date:   Thu Oct 21 01:16:00 2021 +0800

    add qbkg20lm ota file (Koenkk#52)

commit 576e062
Author: Ole Myhre <[email protected]>
Date:   Sat Oct 2 10:51:52 2021 +0200

    Added OTA for EMIZB-132, version 4.0.1 (Koenkk#51)

commit 2ee5d02
Author: TheJulianJES <[email protected]>
Date:   Fri Sep 3 20:48:31 2021 +0200

    Update Hue images (Koenkk#47)

commit 4af6b2a
Author: Koen Kanters <[email protected]>
Date:   Thu Aug 26 19:47:52 2021 +0200

    Disable TS0601_thermostat update. Koenkk/zigbee2mqtt#7941

commit ecd0ea9
Author: TheStigh <[email protected]>
Date:   Mon Jun 28 17:49:07 2021 +0200

    Added OTA for Develco SMSZB-120, fw 4.02 (Koenkk#46)

    Co-authored-by: Stigh <[email protected]>

commit 3c18d00
Author: Koen Kanters <[email protected]>
Date:   Wed May 12 18:28:22 2021 +0200

    Remove OTA for lumi.relay.c2acn01 (LLKZMK11LM). Koenkk/zigbee2mqtt#7112

commit 8c90178
Author: Artem Sedykh <[email protected]>
Date:   Wed May 12 19:21:37 2021 +0300

    TS0601_thermostat firmware v1.1.7 (Koenkk#43)

commit 9e2a256
Author: kds69 <[email protected]>
Date:   Wed May 12 18:17:05 2021 +0200

    Add OTA for LUPUS LS12128 (Koenkk#42)

    * Add manufacturer 10132: ClimaxTechnology, Add OTA for LUPUS LS12128, update all

    -Add.js: add manufacturer 10132: ClimaxTechnology (resold by LUPUS)
    -Add OTA for LUPUS LS12128 image
    -update add.js, index.json, images (updateall.js)

    * Update add.js

    * Update add.js

    * Create 12128_OTA_3.18.ZIGBEE

    Co-authored-by: Koen Kanters <[email protected]>

commit 3a44e44
Author: Pedro Lamas <[email protected]>
Date:   Wed Apr 7 17:50:53 2021 +0100

    Adds OTA image for GL-B-007P and GL-B-008P (Koenkk#39)

commit c97b398
Author: Ilya Kirov <[email protected]>
Date:   Tue Apr 6 18:51:20 2021 +0300

    Xiaomi/Aqara OTA-firmware (Koenkk#38)

    * fix for relative path (for windows). no throw error when no file.

    Co-authored-by: Киров Илья <[email protected]>

commit 41b4f68
Author: TheStigh <[email protected]>
Date:   Sat Mar 27 19:43:51 2021 +0100

    Added manufacturer 4919 - Datek and OTA file for HAN adapter v0.4 (Koenkk#36)

commit 0014500
Author: Ilya Kirov <[email protected]>
Date:   Sun Mar 14 18:55:42 2021 +0300

    Revert "Xiaomi/Aqara OTA-firmware (Koenkk#28)" (Koenkk#34)

    This reverts commit 293b99e.

commit 6e5d393
Author: Koen Kanters <[email protected]>
Date:   Sat Mar 13 10:48:02 2021 +0100

    Fix GL-C-008P OTA. Koenkk#30
@ReX1983
Copy link

ReX1983 commented Jun 21, 2024

I think so. Is not a bad relay. Is more that for some reason something breaks it. I've three relays and one of them started to work "bad". I replaced it. After some time of use, the same relay broke again. So it seems to me that something breaks it.

I am having the same issue: it works perfectly, it is very responsive, but it keeps restarting due to power outage.

No other device in the same room has this issue, so I doubt it is related to an actual outage.

This is the history of the outage counter today
image

Has anyone found out what could be the issue? Mine was just installed and the firmware date is 9-22-2021.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working stale Stale issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.