[DEPRECATED THREAD: visit community.webcore.co for assistance] WebCoRE - Example Pistons

@anon36505037 @ady624

Further to my issue with previousAge()…
Using previousAge([$currentEventDevice : presence]) doesn’t work; never saves

Using the ACTUAL device previousAge([$Pres - Tacoma TRD : presence]) DOES work!! It saves just fine!

I also tried with the 3 main browsers at my disposal (Chrome, IE & Edge) & they all exhibit the same behaviour.
Not being a smart-ass here, but I think there is a newly introduced issue with previousAge([$currentEventDevice : presence]), specifically that $currentEventDevice isn’t “recognized” as valid (for lack of a better description) when used in conjunction with PreviousAge()…

Thanks
J

show use the full screen shot (GREEN BUTTON) of your piston

@c1arkbar… If you look at the chain of these comments [start reading at post 150] then you’ll see that if FAILS to save the piston when using previousAge([$currentEventDevice : presence]) ; all you get is the never ending spinning boxes in the lower right corner, so sorry, not physically possible to give a Green Button screen shot… ady624 has confirmed this to be an an (occasional) issue, although this is now 2 days that the issue is present for me.

Thanks
J

Here is a piston that tell me how many times a door has been open today, and then grand total opens. I feel happy to make a contribution to this thread.

@anon36505037 and @alanrosesf Thanks for your help!!!

3 Likes

This would be a great piston to convert to a dashboard status to see direct in WebCoRE

1 Like

Anyone have a “laundry done” piston that monitors the washer or dryer’s power consumption to tell if it’s running?

@eric182 I gave it a go for updating piston status:

I also took into account that the ‘total since’ is only displaying total up to yesterday instead of total up to yesterday + todays value

Nice work!

good catch on the totalcount updating correctly.

I never thought to use door emojis. Nice.

To think, for the last 30 something years of my life, i never knew how many times my front door opened daily (life was rough!!) Now I know for my front door, kitchen window, Patio door and garage door.:call_me_hand:

1 Like

This is my piston which controls outside lights and door open counts

1 Like

Just set up this piston, but I get these warning messages. Am I doing something wrong? The log looks ok, but it hasn’t actually ran at the specific time yet. I am ignoring the timers one.
Thanks for all your examples. I’m starting to figure all this out.

Thanks

You’ve missed a " somewhere

In the “define”?

"Low battery on these devices: " deviceList ". The percentages are: " [deviceList:Battery]

You only need curly brackets inside the value field. In the expression field everything is evaluated already. So you need quotes (double or single just be consistent) around everything you just want it to say. You can use plus (+) signs to add things like you did but it isn’t necessary.

Edit: Looks like you have the same error in your log to console too. Copy the thing above into both. Don’t worry about the timer error.

Now… in my notifications it does this.

Or from WebCoRe

The battery attribute uses a lower case b. Not upper case. Try with [deviceList:battery] instead of [deviceList:Battery]

Java, Groovy, and webCoRE are all case sensitive.

Ah Ha!! Thanks @ady624, @c1arkbar, for the help. Still trying to get a handle on variables. Appreciate it!!

Didn’t catch that. Damn iPhone haha

1 Like

Many eggs. One basket. :frowning:

This a piston that adjust ceiling fan speed in response to temperature change

1 Like

That’s a weird way to do the fan based on temps lol

Edit: Original post edited. Was a laundry piston

2 Likes