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

So, I was having a problem with a piston using a motion sensor and a timer to turn on then off a light. Someone suggested setting the cancelation for the ‘when’ statement (the on-wait-off execution) to never cancel, which did the trick nicely…however…the piston would only fire every other time the motion sensor was tripped. Long story short, I was using a mode restriction (night) for the whole piston, when I removed the restriction and moved that same restriction to only the ‘when’ statement, the piston started firing every time…anyone know why that would be?

Thanks. I did try stays away from but that throws an undefined exception in groovy, found in piston logs.

I have a few different automations based on SmartThings routines. For example, the “Good Night” routine will turn off all lights, synchronize SHM with my alarm system and adjust the Ecobee schedules for 2 thermostats. Everything except the Ecobee schedule adjustment is working great. These are the default Ecobee schedule names, so I’m not sure if I need to be attempting something else for the automation.

Trying to get an understanding on the “was” open comparison condition on line 38 as it is not working for me… What I’m trying to accomplish is if a door is opened between a certain time and it was open for less than 30 seconds if it is closed, turn on a switch.

Any reason why occasionally this outlet will quickly switch on, then off when Switch 7 is turned on?

I’m guessing because time is changing, notice the bolt, the piston is subscribed to the time change.

Not sure I follow…

Click on the condition sunset to nextSunrise, select do not auomtically subscribe (or something similar) and then try it.

But if the switch is on before sunset, I do want the outlet to turn on at sunset. Will that still be possible?

At what number of pistons should I be creating a separate instance of webcore?

I don’t think it will turn on as there’s nothing triggering it. If the switch is turned off and then on, then Outlet 2 will be switched

Maybe I didn’t explain it properly. The ‘switch’ is a virtual switch for my Harmony activities. Sometimes when I turn on an activity, the outlet switches on for about half a second, then switches off.

Some additional testing. I created a virtual switch along with this piston to turn off one of the systems and it seems to work fine. Does anyone know what string / variable to set one of the schedules upon executing a routine?

Interesting idea; thanks!

I’m automating my lights based on motion (and temporally using the LUX level from a sensor in another room - additional sensor for this room is on order).

What I have find is that I need to adjust the LUX level depending on if it’s morning or evening.

I’ve created a local variable which will set a value depending on the time of day. I’ve added an IF statement at the bottom of my existing piston as I can’t work out how to move it to the top.

However, on line 30 when I try to compare illuminance level I can only select a system variable and not the local variable I have created.

Any ideas how to resolve that? And any other comments on improvements would be welcomed. It’s a little complex only so I can get a live view on the piston dashboard.

p.s. great work Ady and all - really loving webcore.

Try changing it to an integer instead of dynamic. If you know the data type that is going to go in there then go ahead and define it as such.

1 Like

Thanks Dustin! Setting the variable type to integer did the trick. So simple, can’t believe I missed it. Cheers.

1 Like

Just read the thread, thanks for the suggestion.

I may end up still rolling my own service (partially intrigue/challenge, partly paranoia, partly needing to look at multiple calendars…) but it’s a good starting point…and inevitably probably the solution I stick with once laziness kicks in :slight_smile:

More generally though is consuming a web request response into a variable something people are doing?

This is from a piston log. Do we have a way to lookup what other methods are not yet implemented? Thanks!

+132ms ║║Error calling comparison comp_stays_away_from: groovy.lang.MissingMethodException: No signature of method: script14954497229941263624459.comp_stays_away_from() is applicable for argument types: (java.util.LinkedHashMap, java.util.LinkedHashMap, java.util.LinkedHashMap, null, java.util.LinkedHashMap, null) values: [[enabled:true, attributes:[acceleration:[…], …], …], …]

I believe it is doable now, I just haven’t dabbled into it much… save the reply into a variable and call it with $args… let me see if I can find my notes when I get back to a pc.