Increase number of buttons for devices


I previously posted this in a different thread discussing piston examples and feel it’s better placed in this thread…

Aqara Cube number of buttons

WebCoRE defaults to 32 buttons when not defined properly by the device handler.

The handler does appear to be sending the correct numberOfButtons event though… triggered by def updated().

Perhaps try opening the preferences page in the device handler, change something and click done.

From DTH:

def updated() {
	if ( state.lastUpdated && (now() - state.lastUpdated) < 500 ) return
	switch(settings.cubeMode) {
		case "1": sendEvent(name: "numberOfButtons", value: 36); break
		case "2": sendEvent(name: "numberOfButtons", value: 43); break
		default: sendEvent(name: "numberOfButtons", value: 7); break
	state.lastUpdated = now()


Thanks for the advice @Robin - I’ll give that a go and feedback how things go…


Just checked, in my piston I had the device as a variable and therefore was defaulting to the 32 buttons. Once I swapped out the virtual device for the actual device, it displayed the additional buttons.

Appreciate the nod in the right direction :1st_place_medal:



I have the exact same issue, but your solution doesn’t work for me, I use the cube as physical device in statement already.

I’m using the identical DTH … I tried re-loading the cube in Webcore, do some modification in DTH, change and revert back DTH but nothing seem to work. I use advanced in setting and therefore I should get 36 buttuns, but I get only 32 :frowning:

Any more ideas?