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.
Xiaomi Cube-Piston for 6 faces
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.
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.
also, does it work consistently? hows battery life?
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.
thanks again. dont think any of the zigbee devices report battery accurately, just a relative measure.
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 #
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:
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