niceboygithub / AqaraGateway

Aqara Gateway/Hub integration for Home Assistant
515 stars 66 forks source link

unsupported modell: lumi.remote.rkba01 #11

Closed miniknife88 closed 3 years ago

miniknife88 commented 3 years ago

description:https://zigbee.blakadder.com/Aqara_ZNXNKG02LM.html Smart Knob H1 [ZNXNKG02LM] model: lumi.remote.rkba01

This device has single-click, double-click, long-press, and rotate functions Try to add support for this model: edit utils.py add: `{

button switch

'lumi.remote.rkba01': ["Aqara", "Smart Knob H1", "ZNXNKG02LM"],
'params': [
    ['13.1.85', None, 'button', None],
    [None, None, 'switch', 'binary_sensor'],
    ['8.0.2001', 'battery', 'battery', 'sensor'],
]

},`

edit const.py add 22 23 in button field:

BUTTON = { 1: 'single', 2: 'double', 3: 'triple', 4: 'quadruple', 16: 'hold', 17: 'release', 18: 'shake', 22: 'clockwise', 23: 'counterclockwise', 128: 'many', }

Rotation angle attribute is now missing, debug log: "0.50.85" represents the angle of rotation,or '0.24.85'? positive number means clockwise rotation, negative number means counterclockwise rotation

clockwise

2021-03-07 01:35:50 DEBUG gateway 192.168.1.111: MQTT on_message: zigbee/send {"cmd":"report","id":2000057931,"did":"lumi.54ef44100003828e","time":1615052150044,"rssi":-29,"zseq":148,"params":[{"res_name":"0.50.85","value":24},{"res_name":"0.24.85","value":24},{"res_name":"0.25.85","value":500},{"res_name":"13.1.85","value":22}],"dev_src":"0"} 2021-03-07 01:35:50 DEBUG gateway 192.168.1.111: lumi.54ef44100003828e lumi.remote.rkba01 <= {'0.50.85': 24, '0.24.85': 24, '0.25.85': 500, 'button': 22} [1615052150.5448558] 2021-03-07 01:35:50 DEBUG gateway 192.168.1.111: sensor.0x54ef44100003828e_battery | battery <= {'0.50.85': 24, '0.24.85': 24, '0.25.85': 500, 'button': 22, 'switch': 'unknown'}

counterclockwise

2021-03-07 01:27:33 DEBUG gateway 192.168.1.111: MQTT on_message: zigbee/send {"cmd":"report","id":2000057828,"did":"lumi.54ef44100003828e","time":1615051653410,"rssi":-28,"zseq":146,"params":[{"res_name":"0.50.85","value":-48},{"res_name":"0.24.85","value":-48},{"res_name":"0.25.85","value":700},{"res_name":"13.1.85","value":23}],"dev_src":"0"} 2021-03-07 01:27:33 DEBUG gateway 192.168.1.111: lumi.54ef44100003828e lumi.remote.rkba01 <= {'0.50.85': -48, '0.24.85': -48, '0.25.85': 700, 'button': 23} [1615051653.917402] 2021-03-07 01:27:34 DEBUG gateway 192.168.1.111: sensor.0x54ef44100003828e_battery | battery <= {'0.50.85': -48, '0.24.85': -48, '0.25.85': 700, 'button': 23, 'switch': 'unknown'}

Please add this attribute!

miniknife88 commented 3 years ago

unsupported modell: lumi.sen_ill.agl01

Light Sensor T1 [GZCGQ11LM] model: lumi.sen_ill.agl01

Try to add support for this model:

{ 'lumi.sen_ill.agl01': ["Aqara", "Light Sensor T1", "GZCGQ11LM"], 'params': [ ['0.3.85', None, 'illuminance', 'sensor'], ['8.0.2001', 'battery', 'battery', 'sensor'], ] },

After testing, is good!

niceboygithub commented 3 years ago

Thanks for update.

miniknife88 commented 3 years ago

Rotation angle attribute not display Light Sensor T1 is Aqara, not XiaoMi

niceboygithub commented 3 years ago

Rotation angle attribute not display

Not know 0.24.85, 0.25.85, 0.50.85 for which attribute. Need more test results to check and verify. I assume they are rotation_1, rotation_2, and button_pressure first. ['0.24.85', '0.24.85', 'rotation_1', None], ['0.25.85', '0.25.85', 'rotation_2', None], ['0.50.85', '0.50.85', 'button_pressure', None],

miniknife88 commented 3 years ago

debug.log

"13.1.85" is action, value:

1 = single click 2 = double click 16 = hold 17 = release 21 = ? 22 = clockwise 23 = counterclockwise 24 = hold_clockwise 25 = hold_counterclockwise 26 = rotate 27 = hold_rotate

"0.51.85" and "0.29.85" is hold_rotate angle ? "0.50.85" and "0.24.85" is rotate angle ?

niceboygithub commented 3 years ago

image

what did you do when action is 21?

miniknife88 commented 3 years ago

debug.log

Every time you press and rotate, 21 will appear,don't know what it really means

miniknife88 commented 3 years ago

The test still has bug after the update(The action displayed when triggered is different from the actual action, the rotation angle is still not displayed), I did a test carefully and recorded the log:

Rotate clockwise once: clockwise.txt

Rotate once counterclockwise: counterclockwise.txt

Hold and rotate clockwise: hold_clockwise.txt

Hold and rotate counterclockwise: hold_counterclockwise.txt

niceboygithub commented 3 years ago

Let me buy one Smart Knob H1 to test