[DEPRECATED Thread: visit community.webcore.co for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)

I’ve found pausing the piston and resuming the piston will reset the times.

In the previous release of WebCoRE I noticed that the time triggers were 4 hours off. I had a piston that was supposed to fire at 12:40AM but the actual set time was 4:40AM. I updated to the latest version and the time discrepancy resolved.

I’m trying to keep my pistons organized, and one way I want to do that is by having global variables that are the source of truth for lists of devices so I don’t have to update every piston when I add a new device. For example, I have a @DEVICE_RESIDENT_PRESENCE variable that has all my device presence sensors so that I can easily add and remove sensors without worrying about updating all the pistons that use it.

In the piston details page, I see the lightning bolt for the conditions indicating that event subscriptions are active for this variable. However, at the top of the page I get a message that says “This piston does not subscribe to any events. Unless executed by other means, it will never run on its own.” and the list of subscriptions is empty. The piston also never executed when I arrived or left, despite the SmartThings event log showing my phone correctly left and arrived.

Can subscriptions not be created on global variables?

wonder why I cant get this to work on my Amazon Echo.

get rid of the last IF statement and change the first two “presence is” to “presence changes to”

The last “if” was accidentially left in when I was messing with it this morning and taking the screenshot, but it’s already gone. Is it the “changes to” that actually creates the event subscription?

EDIT:

After changing the condition to “changes to”, I still get that same warning and it still shows “no subscriptions”, despite having the lightning bolt.

EDIT 2:

Looks like local variables do setup the triggers properly, but global variables do not.

Make them all ranges. TIME is between 5:00:00 am and 8:30:00 am then set mode xx

I have 2 locations setup: 1 is my home with a hub and the 2nd is my work that just has my phone as a presence sensor. When I try and do tests for the current state of my presence sensor in webCoRe it just says that I am not present since I am not at home, how do I trigger a true condition for my presence sensor that I am at work?

Hello, I just started playing with webCoRE and I need help understanding what I’m doing wrong here.
I have the following test piston:

The goal of the piston is when the Virtual switch is turned ON, it should change the color of the Hue light called Upstairs to Red with level 20% and turn it off. When the Virtual switch is turned OFF it should change the color of the bulb to Warm White with level 80% and turn it off.

Initially the bulb is OFF. I start with the Virtual switch ON and I switch it to OFF - it works as expected. If I switch it back ON - it changes the color but does’t switch the bulb off. There is a message in the log that says “Skipped execution of the physical command because it would make no change to the device.”

Now, at this point, the Virtual switch is ON as I started, but the bulb is ON. If I keep pushing the Virtual switch it will keep changing colors and switch OFF on white, then change color to red and leave it ON.

If at that point I manually switch the bulb OFF, the behavior reverses - it leaves it ON on white and OFF on red.

How can I make sure it stays OFF after both color changes?

If you turn off command optimization in the piston settings, then does it work as expected?

1 Like

Yes! I didn’t know about this setting. Is that a good solution or just a temporary workaround?

Good solution … till @ady624 chimes in and says update to new version of app. May not be bug, might just be latency of updates for Hue lights.

Is there a reason this is not triggering when I turn on a light?

That is the only solution. Assuming ylou started with the light off, when using setLevel you inherently turn the bulb on. ST is not aware of the change until later, because of the time it takes for that whole procedure:

webCoRE command > cloud > hub > physical device > reply > hub > cloud > webCoRE (new event)

So to webCoRE the light is still off even though a setLevel command was issued. This explains why the command optimization does its job and skips the off task. Command optimizations are there to ease the load on ST and your local z-networks, but it is still not a problem disabling them.

1 Like

Yeah, you are not subscribing to their events because the for cannot subscribe (does not know which attribute to subscribe to) and the if references $device which is empty at initialization time. Use an “on event” to subscribe to the required events and use the IF inside. Then you can use is instead of changes to inside that for.

Any chance you could give me an example?

@c1arkbar Do you have the piston for your HVAC? I want to have a look at the piston states you used. Thanks!

@kpdillon not an example but general format

on event from
Boys Bedroom Fan’s switch
or
Boys Bedroom Light’s switch
or
Porch Light switch
do
… for each
… if $device switch is on
… … turn off $device
… end if
… end for each
end on

You could also define a device variable and place all the switches in it, then use it in both the on event and the for each, saves time

that makes sense.

btw, just noticed arrays (lists) are available now. nice! when i get time i am going to switch from using 3 different pistons controlling bedroom AC temps with different settings to one AC piston and arrays will come in very handy. thanks!

1 Like