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

Issue with Aqara wall switch QBKG12LM (Double with L+N) #405

Closed
Fabiancrg opened this issue Apr 17, 2019 · 12 comments
Closed

Issue with Aqara wall switch QBKG12LM (Double with L+N) #405

Fabiancrg opened this issue Apr 17, 2019 · 12 comments

Comments

@Fabiancrg
Copy link
Contributor

Hi,
I am trying to configure the Aqara switch using the 'decoupled' option so pressing the button on the siwtch does not action the relay authomatically.
I tried that with the Xiaomi gateway and it's working as expected but using Zigbee2mqtt, as soon as I decouple the switch from the relay, I don't get any message when I press the switch, so I cannot use rules to control the relays.
Could anyone help me with this ?
I am using CC2531 with FW 20190223 with zigbee2mqtt version 1.3.1 (latest dev branch update).
Thank you,
Fabian

@Koenkk
Copy link
Owner

Koenkk commented Apr 18, 2019

Can you provide the log_level: debug log when pressing the buttons? http://www.zigbee2mqtt.io/configuration/configuration.html

@Fabiancrg
Copy link
Contributor Author

Hi, here is the log output

For a decoupled button, I get always the following message

Apr 19 08:53:03 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 8:53:03 AM Received zigbee message of type 'attReport' with data '{"cid":"genMultistateInput","data":{"presentValue":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 6

For info, when button is actioning the relay, I get these messages

Apr 19 08:54:36 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 8:54:36 AM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"61440":66521088,"onOff":0}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 1
Apr 19 08:54:36 NUC npm[1172]:   zigbee2mqtt:info 4/19/2019, 8:54:36 AM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":25,"linkquality":139,"state_left":"OFF","state_right":"OFF","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay"}'
Apr 19 08:54:36 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 8:54:36 AM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 1
Apr 19 08:54:37 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 8:54:37 AM Received zigbee message of type 'attReport' with data '{"cid":"genMultistateInput","data":{"presentValue":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 5

When I press again:

Apr 19 08:54:43 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 8:54:43 AM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"61440":66521088,"onOff":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 1
Apr 19 08:54:43 NUC npm[1172]:   zigbee2mqtt:info 4/19/2019, 8:54:43 AM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":25,"linkquality":118,"state_left":"ON","state_right":"OFF","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay"}'
Apr 19 08:54:43 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 8:54:43 AM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 1
Apr 19 08:54:44 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 8:54:44 AM Received zigbee message of type 'attReport' with data '{"cid":"genMultistateInput","data":{"presentValue":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 5

Koenkk added a commit that referenced this issue Apr 19, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@Koenkk
Copy link
Owner

Koenkk commented Apr 19, 2019

should be fixed with the latest zigbee2mqtt dev branch, can you check?

@Fabiancrg
Copy link
Contributor Author

Thank you @Koenkk
I retried and now when I press the decoupled button, I get this:

Apr 19 21:24:56 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:24:56 PM Received zigbee message of type 'attReport' with data '{"cid":"genMultistateInput","data":{"presentValue":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 6
Apr 19 21:24:56 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:24:56 PM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":27,"linkquality":144,"state_left":"OFF","state_right":"OFF","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay","click":"right_single"}'

So I can see the "click" now with value right_single (or left_single)

I tried to set the right relay on/off using topic "zigbee2mqtt/Aqara_Switch/right/set" and value:
{"state": "ON"} or {"state": "OFF"}
it's working but there is something wierd.
When "ON" is sent, I have this:

Apr 19 21:31:19 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:31:19 PM Received MQTT message on 'zigbee2mqtt/Aqara_Switch/right/set' with data '{"state": "ON"}'
Apr 19 21:31:19 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:31:19 PM Zigbee publish to device '0x00158d0002f9871a', genOnOff - on - {} - {"manufSpec":0,"disDefaultRsp":0} - 2
Apr 19 21:31:19 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:31:19 PM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":27,"linkquality":131,"state_left":"OFF","state_right":"ON","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay","state":"ON"}'
Apr 19 21:31:19 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:31:19 PM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"61440":117440682,"onOff":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 2
Apr 19 21:31:19 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:31:19 PM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":27,"linkquality":131,"state_left":"OFF","state_right":"ON","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay","state":"ON"}'
Apr 19 21:31:19 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:31:19 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"61440":117440682,"onOff":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 2
Apr 19 21:31:19 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:31:19 PM Received zigbee message of type 'readRsp' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 2
Apr 19 21:31:19 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:31:19 PM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":27,"linkquality":134,"state_left":"OFF","state_right":"ON","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay","state":"ON"}'
Apr 19 21:31:19 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:31:19 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 2

when "OFF" is sent, I have this:

Apr 19 21:31:27 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:31:27 PM Received MQTT message on 'zigbee2mqtt/Aqara_Switch/right/set' with data '{"state": "OFF"}'
Apr 19 21:31:27 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:31:27 PM Zigbee publish to device '0x00158d0002f9871a', genOnOff - off - {} - {"manufSpec":0,"disDefaultRsp":0} - 2
Apr 19 21:31:27 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:31:27 PM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":27,"linkquality":134,"state_left":"OFF","state_right":"OFF","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay","state":"ON"}'
Apr 19 21:31:27 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:31:27 PM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"61440":117440685,"onOff":0}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 2
Apr 19 21:31:27 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:31:27 PM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":27,"linkquality":134,"state_left":"OFF","state_right":"OFF","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay","state":"ON"}'
Apr 19 21:31:27 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:31:27 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"61440":117440685,"onOff":0}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 2
Apr 19 21:31:28 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:31:28 PM Received zigbee message of type 'readRsp' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 2
Apr 19 21:31:28 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:31:28 PM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":27,"linkquality":141,"state_left":"OFF","state_right":"OFF","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay","state":"ON"}'
Apr 19 21:31:28 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:31:28 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 2

In both case, I have the correct status for "state_right" but I also have a "state":"ON".
Not sure what this "state" is, it appeared only after setting the relay ON or OFF but it's now displayed even when I pressed any button (left or right):

Apr 19 21:36:57 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:36:57 PM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"61440":66521088,"onOff":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 1
Apr 19 21:36:57 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:36:57 PM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":27,"linkquality":128,"state_left":"ON","state_right":"OFF","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay","state":"ON"}'
Apr 19 21:36:57 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:36:57 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"61440":66521088,"onOff":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 1
Apr 19 21:36:58 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:36:58 PM Received zigbee message of type 'attReport' with data '{"cid":"genMultistateInput","data":{"presentValue":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 5
Apr 19 21:36:58 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:36:58 PM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":27,"linkquality":134,"state_left":"ON","state_right":"OFF","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay","state":"ON","click":"left_single"}'
Apr 19 21:36:59 NUC npm[22700]:   zigbee2mqtt:debug 4/19/2019, 9:36:59 PM Received zigbee message of type 'attReport' with data '{"cid":"genMultistateInput","data":{"presentValue":1}}' of device 'lumi.ctrl_ln2.aq1' (0x00158d0002f9871a) of endpoint 6
Apr 19 21:36:59 NUC npm[22700]:   zigbee2mqtt:info 4/19/2019, 9:36:59 PM MQTT publish: topic 'zigbee2mqtt/Aqara_Switch', payload '{"power":0,"consumption":0,"temperature":27,"linkquality":134,"state_left":"ON","state_right":"OFF","operation_mode_right":"decoupled","operation_mode_left":"control_left_relay","state":"ON","click":"right_single"}'

@Koenkk
Copy link
Owner

Koenkk commented Apr 19, 2019

Can you clear data/state.json and restart zigbee2mqtt?

@Fabiancrg
Copy link
Contributor Author

I have just removed the the "state": "ON" for this device from state.json and restarted zigbee2mqtt and it's working perfectly now/
Thank you very much for your help!

@Koenkk
Copy link
Owner

Koenkk commented Apr 22, 2019

great!

@Koenkk Koenkk closed this as completed Apr 22, 2019
@zvldz
Copy link
Contributor

zvldz commented Apr 23, 2019

Maybe need to do the same fix for QBKG11LM. Because I have the same problem with it.

Apr 23 23:26:12 Khadas npm[4738]: zigbee2mqtt:debug 4/23/2019, 11:26:12 PM Received zigbee message of type 'attReport' with data '{"cid":"genMultistateInput","data":{"presentValue":1}}' of device 'lumi.ctrl_ln1.aq1' (0x00158d000211434a) of endpoint 5

@Koenkk
Copy link
Owner

Koenkk commented Apr 24, 2019

@zvldz can you try with the following fromZigbee converter:

    QBKG11LM_click: {
        cid: 'genMultistateInput',
        type: ['attReport', 'readRsp'],
        convert: (model, msg, publish, options) => {
            if ([1, 2].includes(msg.data.data.presentValue)) {
                const times = {1: 'single', 2: 'double'};
                return {click: times[msg.data.data.presentValue]};
            }
        },
    },

@zvldz
Copy link
Contributor

zvldz commented Apr 24, 2019

Works. I also added fz.QBKG11LM_click to the devices.js file.

Thanks!

@Koenkk
Copy link
Owner

Koenkk commented Apr 24, 2019

Can you make a PR?

@zvldz
Copy link
Contributor

zvldz commented Apr 24, 2019

Created

xmow49 pushed a commit to xmow49/zigbee-herdsman-converters that referenced this issue Jun 14, 2024
Adds support for setting calibration value (time) on MOES Curtain modules, solution for Koenkk/zigbee2mqtt#7128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants