Increase number of buttons for devices


#1

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
#2

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()
}

#3

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


#4

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:


#5

Hi!

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?