This may take a bit of explaining so let me see if I can be concise… So I’ve been using a workaround to enable my 12 Hue Taps to control more than just the lights in the room. I’ve been using this trick in HomeKit but now I’m making the switch to ST completely if possible. I’m making a piston to do the trick that I’ve been using. I used the SmartApp “Hue Connect (Advanced)” to link my Hue bulbs to ST because of the group import feature. Basically, what I do is I use iConnectHue app to program a Hue Tap button to set the BRIGHTNESS % of a Hue Bloom that I keep out in the garage to a value between 1-99% and then have a trigger (now a piston) looking at this Hue Bloom and waiting to perform an action based on that percentage and then ending with a reset of the Hue Bloom to 100% thus allowing me to repeat the request if needed. It works like a charm with HomeKit because it has instantaneous awareness of a change in brightness to each Hue bulb. What I’m finding is that Hue Connect (Advanced) and maybe all Hue SmartApps in ST seem to “poll” the hub for changes every 5 minutes. If you change the bulb attributes using ST then of course WebCoRE will get an update almost instantaneously and thus trigger the piston but if the bulb is controlled by a non-ST source (such as a Hue Tap) then you have to wait the 5 minutes for ST to poll the Hue Bridge and then trigger the piston. This isn’t very useful. I’ve installed Pollster and the best it can do is poll every 1 minute. Still not great when I want to walk into my daughters room and hit the tap and have it open the window blinds and turn off the white noise and fade on the lights to wake her up. As it stands, I’m walking in there and waiting at least a minute for any of this to happen. Any advice on how to address this? Am I doing something wrong with my piston? Here’s a copy of my (incomplete) piston so far. It’s a great trick when it works because essentially every smarthome platform can set a brightness % for a hue bulb essentially allowing any platform to control a piston (i.e. Hue Tap, Flic, Alexa, possibilities are endless really). Thanks for any help. Sorry for the not so concise explanation.
Hue Tap Piston Help?!
your piston isn’t subscribing to any events so it will never fire (unless you manually press the test button in webCoRE). Look out for the lighting bolts in the left gutter, you have none so no subscriptions.
Put the whole lot inside an ‘on event’:
on events from {triggerLamp}'s Level
do
switch ({triggerLamp}'s Level)
case 7:
…
okay, cool I’ll give this a try. This is my first attempt at making a “Switch”. Obviously I screwed it up. Let me see if I can figure out how to modify it like you’re saying.
Do I have to remake the whole piston and start with an “If” block or is there another way to get to this “On Event” setting?
No need to rebuild.
When in the piston editor, go to options and tick ‘show advanced statements’
Now, at the bottom of your piston, click ‘add a new statement’ and you’ll see lots of extra options, incuding ‘on event’
Create the ‘on event’ as desired
Click the button with the two arrows at the top of the page, and you will see the two arrow icons appear in the left gutter of the piston.
Click and hold the two arrow icon on the row to the left of ‘switch’ and you can drag and drop the whole switch case into the ‘do’ section of the new ‘on event’ you just created above.
@Robin that didn’t seem to make a difference. I know you’re the man with this stuff so I must be doing something wrong still. Keep in mind, the piston was working when I originally posted this but it was just taking a minute for it to fire (probably when pollster polled the Hue Bloom light every 1 minute). It is still working after your recommended modification and still having the same delay issue. Perhaps I’m missing something but is it possible that its because I’m controlling the Hue light from an external source (ie Hue Tap) and ST/WebCoRE simply isn’t aware of the brightness change until it polls? Thanks again.
If so, would it be possible to poll this one light more frequently (say every 3 seconds when mode is Home) without it being detrimental to the servers? Could I use this WebCoRE piston to do it?
I can’t see how it worked before without any triggers / subscriptions… but I’ll take your word on it
It will only know of a change when ST does so yes, if you’re having to poll every minute then it could have up to a minutes delay.
I wouldn’t reccomend a 3 second poll rate… not so much for ST servers (though that is a factor) but for your own network… DDoS springs to mind!
Have you considered using IFTTT to run a piston on Hue tap events?
Otherwise… perhaps just sell your Hue taps on eBay and invest in some Zwave switches / buttons…
Okay well it was as I suspected but I solved it in a very convoluted way. I used a raspberry pi and the Homebridge-SmartThings hack to import the Hue Bloom from ST to HomeKit thus having two of the same bulb in HomeKit. Then, since Philips recently made the Taps HomeKit compatible, I programmed the button press to set a brightness % on the ST version of the Hue Bloom bulb in HomeKit. This notifies smartthings that a change has been made via the Hue Tap and the piston runs fairly instantaneously.