New Aqara OPPLE switches

Has anyone tried integrating those new switches from Aqara OPPLE brand? They are brand new, and already available on Banggood and Aliexpress. They come with pure Chinese manual.

There are 2, 4 and 6 button versions which support: single, double and long click. This sums up to 18(!!) different actions for the 6 button version. :slight_smile:

They use Zigbee 3.0 protocoll. I received them today, but haven’t done any testing yet.

This is an Aliexpress link: https://www.aliexpress.com/item/4000314385479.html?spm=a2g0s.9042311.0.0.27424c4d9Cg2QM

Capture

2 Likes

Hey man, i ordered the 6 button version and will receive it today or tomorrow, i’ll try to write a few lines here when i get to play with it for a little!

This is what i receive when i press any buttons:

zigbee2mqtt:debug 2019-11-27T15:56:34: Received Zigbee message from '0x04cf8cdf3c75b7a1', type 'commandStop', cluster 'genLevelCtrl', data '{}' from endpoint 1 with groupID 0
zigbee2mqtt:warn  2019-11-27T15:56:34: Received message from unsupported device with Zigbee model 'undefined'
zigbee2mqtt:warn  2019-11-27T15:56:34: Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
zigbee2mqtt:debug 2019-11-27T15:56:34: Received Zigbee message from '0x04cf8cdf3c75b7a1', type 'commandStop', cluster 'genLevelCtrl', data '{}' from endpoint 1 with groupID 0
zigbee2mqtt:warn  2019-11-27T15:56:34: Received message from unsupported device with Zigbee model 'undefined'
zigbee2mqtt:warn  2019-11-27T15:56:34: Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
zigbee2mqtt:debug 2019-11-27T15:56:34: Received Zigbee message from '0x04cf8cdf3c75b7a1', type 'commandStop', cluster 'genLevelCtrl', data '{}' from endpoint 1 with groupID 0
zigbee2mqtt:warn  2019-11-27T15:56:34: Received message from unsupported device with Zigbee model 'undefined'
zigbee2mqtt:warn  2019-11-27T15:56:34: Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
zigbee2mqtt:debug 2019-11-27T15:56:36: Received Zigbee message from '0x04cf8cdf3c75b7a1', type 'commandMove', cluster 'genLevelCtrl', data '{"movemode":1,"rate":15}' from endpoint 1 with groupID 0
zigbee2mqtt:warn  2019-11-27T15:56:36: Received message from unsupported device with Zigbee model 'undefined'
zigbee2mqtt:warn  2019-11-27T15:56:36: Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
zigbee2mqtt:debug 2019-11-27T15:56:36: Received Zigbee message from '0x04cf8cdf3c75b7a1', type 'commandMove', cluster 'genLevelCtrl', data '{"movemode":1,"rate":15}' from endpoint 1 with groupID 0
zigbee2mqtt:warn  2019-11-27T15:56:36: Received message from unsupported device with Zigbee model 'undefined'
zigbee2mqtt:warn  2019-11-27T15:56:36: Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
zigbee2mqtt:debug 2019-11-27T15:56:36: Received Zigbee message from '0x04cf8cdf3c75b7a1', type 'commandMove', cluster 'genLevelCtrl', data '{"movemode":1,"rate":15}' from endpoint 1 with groupID 0

Funny note aside: I pressed the PAIR button a bit too long maybe and it binded to my nearby IKEA tradfri lamp instantly. Now I can turn on/off and dim my LED with the switch w/o home assistant at all. :slight_smile:

Yeah same, the interesting part should be this one right here:

Device ‘0xxxxxxxxxxxxxxx’ with Zigbee model ‘lumi.remote.b686opcn01’ is NOT supported, please follow https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html

I’ll try to get it to work and will report back

edit: first 4 buttons work, bottom 2 dont seem to send anything. troubleshooting this…

devices.js looks like this:

{
zigbeeModel: [‘lumi.remote.b686opcn01’],
model: ‘WXCJKG13LM’,
vendor: ‘Xiaomi’,
description: ‘Aqara OPPLE 6btn Switch’,
supports: ‘6 buttons, single, double and long click’,
fromZigbee: [ , fz.tint404011_on, fz.tint404011_off, fz.tint404011_brightness_updown_hold, fz.tint404011_brightness_updown_click, fz.tint404011_brightness_updown_release, fz.WXKG02LM_click_multistate ],
toZigbee: [],
},

That would be great. Unfortunately working with this stuff together with HASSIO is next to impossible as everything is runnings in dockers and that makes debugging very hard and uncomfortable. I don’t even have an idea how to add something to devices.js as i can’t find it haha

This is from my log, after I managed to add devices.js with the help of this russian site:

First it failed to connect, then it did work the third time i tried it, somehow. And now i get these “undefined” messages when I press any buttons. And I get those messages for ALL SIX buttons.

info  2019-11-28T18:09:17: Starting interview of '0x04cf8cdf3c75b7a1'
info  2019-11-28T18:09:17: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_started","meta":{"friendly_name":"0x04cf8cdf3c75b7a1"}}'
error 2019-11-28T18:09:32: Failed to interview '0x04cf8cdf3c75b7a1', device has not successfully been paired
info  2019-11-28T18:09:32: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_failed","meta":{"friendly_name":"0x04cf8cdf3c75b7a1"}}'

.....

info  2019-11-28T18:10:46: Device '0x04cf8cdf3c75b7a1' joined
info  2019-11-28T18:10:46: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":{"friendly_name":"0x04cf8cdf3c75b7a1"}}'
info  2019-11-28T18:10:46: Starting interview of '0x04cf8cdf3c75b7a1'

.....

warn  2019-11-28T18:15:04: Received message from unsupported device with Zigbee model 'undefined'
warn  2019-11-28T18:15:04: Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
warn  2019-11-28T18:15:04: Received message from unsupported device with Zigbee model 'undefined'
warn  2019-11-28T18:15:04: Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
warn  2019-11-28T18:15:04: Received message from unsupported device with Zigbee model 'undefined'
warn  2019-11-28T18:15:04: Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.

adding new devices seems to work differently on docker, i cant read russian so i cant really tell what you did there :stuck_out_tongue: the link in the messages tells you what to do, even with docker stuff iirc

I use Chrome and it auto translates pretty well. So it was no problem to follow and understand. It’s just a hassle to do debugging with HASS.IO, so i have for others to wait for the work to be done :frowning: and can’t really help.

ok i dont use hassio so i cant really help you there :frowning: do you have a manual or anything of the switch in english? i cant find one and im not sure if im resetting my switch correctly :smiley:

No. Only Chinese. It’s one of those devices that come in FULL CHINESE. From the packaging to the manual. They are so brand new and targeted to the Chinese market only (at the moment).

@rulah Have you found out about the two missing buttons? Are they working now?

@iz3man hey man, i tried digging into the zigbee-herdsman converter but gave up yesterday because i didnt really have time. just looked back at it and im pretty sure i have a solution! will try to implement it today and i will let you know :slight_smile:

edit: fully functional now with the following lines

i added my own converter for the 2 bottom buttons, everything works now but im thinking about re-doing the other 2 buttons from scratch so i can get a uniform payload-format.

my 2 files look like this now:

devices.js:

{
    zigbeeModel: ['lumi.remote.b686opcn01'],
    model: 'WXCJKG13LM',
    vendor: 'Xiaomi',
    description: 'Aqara OPPLE 6btn Switch',
    supports: '6 buttons, single, double and long click',
    fromZigbee: [ fz.WXCJKG13LM_raw, fz.tint404011_on, fz.tint404011_off, fz.tint404011_brightness_updown_hold, fz.tint404011_brightness_updown_click, fz.tint404011_brightness_updown_release, fz.WXKG02LM_click_multistate ], 
    toZigbee: [], 
},

fromZigbee.js:

WXCJKG13LM_raw: {
        cluster: 'lightingColorCtrl',
        type: 'raw',
        convert: (model, msg, publish, options) => {
            // i dont know yet what all the numbers do, the ones i know are below. other ones are not neccesary imo?
			// #2 is a counter that increments with each click
			// #4 is the button, 1 is left and 3 is right
			// #5 is the action, 69 as single click and 15 as hold.
			// if #5 is 15 and the button is 0 it means the last button was released 
			const deviceID = msg.device.ieeeAddr;
			const btn_lookup = {
			0: 'btn_rls',
                     1: 'btn_l',
                     3: 'btn_r', 
                  },
                  act_lookup = {
                     69: 'click',
                     15: 'hold',
                  },
                  button = btn_lookup[msg.data[3]],
                  action = act_lookup[msg.data[4]];
				  
			
            if (button && action) {
				// Save last button for release event if action is hold, but not if its released
				if (action == 'hold' && button != 'btn_rls'){
					if (!store[deviceID]) {
						store[deviceID] = {};
					}
					store[deviceID].button = button;
				}
				if (button == 'btn_rls'){
					if (!store[deviceID]) {
						return null;
					}
					return {'button': store[deviceID].button, 'action': 'release'};
				}
				return {'button': button, 'action': action};
            }
        }, 
    },

i know the formatting is messed up right now but i see no point in fixing it if im gonna mess it up again :wink: will fix it once im done

No. Only Chinese. It’s one of those devices that come in FULL CHINESE. From the packaging to the manual. They are so brand new and targeted to the Chinese market only (at the moment).

Can you post it. I can ask co-worker to translate.

Thanks. Here you go …






I guess the important part is this, about the pairing/reset procedure:

Press and hold for 5s = RESET
Press 5x or click the reset button = PAIR

Only the fotos 1 and 2 are meaningful. The rest is just warranties, safety warnings and physical installation. My Chinese co-worker says to quickly press the reset button 5x to connect and press 1x to reset.
Anyway, it looks like you already have your answer. I hope this gets cheaper in time. I can get the ikea 5 button remote for less.

Thanks for translating the photo.

The translation is a bit wrong thou.

Holding the C button for 5s resets/pair.
Click it 5 times or single click: Check connection and distance (This is to check if the aqara hub can communicate with the switch after pairing and moved to the installation site.)

Hope this help.