Xiaomi Cube-Piston for 6 faces


#1

This piston I came up with, was just a little bit of fun and webcore practice after getting one of these cubes out of curiosity.
The bulbs of course could be substituted with any device. There could be an easier way to do this as I am no expert and would welcome any feedback.


#2

Your case statement is nullified by doing the if statement inside the cases
Essentially your statement is:

Watch for keypad 1 to change. When it does match the case. Ok found it! It’s case 4. Then you check again if it changes to side 4.


#3

which DH are you using for this?

thanks!


#4

Sorry for the delay, I use this dh for it


#5

no worries, thanks much for sharing. is there a github link to this? copying it from this format will sort of require me to reformat it in the ST IDE and i wouldnt look forward to that. :slight_smile:

also, does it work consistently? hows battery life?


#6

It shows 78% battery and been stable for about 2 weeks, from what I read most of the Xiaomi stuff doesn’t report the battery status correctly.


#7

Sorry I don’t understand, could you provide an example for me to look at?

Thanks


#8

thanks again. dont think any of the zigbee devices report battery accurately, just a relative measure. :slight_smile:


#9

So I highlighted your statement. I highlighted the things that are the same In the same color

Blue - switch (keypad 1’s face) is the same as if keypad 1’s face changes to

The rest of the colors - case # is the same as the if keypad 1’s face changes to #


#10

I’ve re-written the piston, is this what you are explaining?
It does work ok

Thanks


#11

Exactly what I was explaining!! Looks good


#12

Many thanks for this piston, saved me a lot of time.

An now looking at a knock trigger. Got the knock working but would like my Hue bulbs to all change to a different colour to each other. At the moment they change to a random hue but are in sync to each other. Any ideas:

57


#13

Change request around button limits in Webcore:

I currently have a piston using this device. The device has the ability to have 3 levels of control driven by buttons - Simple (6 buttons), Advanced (36 buttons) and Combined (43 buttons). Details of DH:

I currently use the Advanced option however when selecting the buttons in Webcore, I’m only able to select a maximum of 32 buttons however need 36 in total:

Would it be possible to extend the number of buttons which can be selected in Webcore to 43 so all options can be used? At the moment if I try to trigger buttons beyond 32, the expected behaviour is ignored as it isn’t understood by my piston:

Thanks


Increase number of buttons for devices