Some Pistons Not Working


#1

I have some individual pistons that are setup to alert me if lights or locks are on for 5, 10, 30, 60 minutes, etc and then another piston setup to alert me if the light or lock then turns off or becomes locked. The initial alert for the time intervals is working fine, but the alerts telling me that the status has changed to locked or off is not working. Both pistons are set up identically as far as sending push notifications and storing in messages. This was working fine for a few years up until about a few weeks or maybe a month ago. I don’t remember exactly when it stopped working. See samples below:

Working fine:

Not working (no notifications):

Thanks in advance for any help.


#2

any logs for the piston that is not working?


#3

Looks like this repeatedly for one of them. However some of the others that aren’t working have no logs at all:

EDIT: just noticed this log is from earlier in the year. So no recent logs for anything.

EDIT 2: nevermind, it was for November so it’s fairly recent

11/29/2020, 11:34:17 AM +583ms
+5095ms ║Error calling comparison comp_was: java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException: Request timed out to historianv2-na01-useast1.api.smartthings.com/3.130.19.73:443 of 5000 ms


#4

Looking at that error it seems as if the “was” condition is no longer permitted or erroring? Is there another method to accomplish what I’m doing or a fix for this?


#5

Changes were made to device event history about a month or so ago, removing anything that wasn’t compliant with a capability schema. People have reported unexpected behaviour with was since but that is the first time I’ve seen that error.


#6

Thanks for the info. Do you know of any workarounds or different options to still get it to do what I want without the “was” condition?


#7

This, or something similar?

Expression:
previousAge([$currentEventDevice : unlocked])

is greater than

Value:
500,000


#8

could i get an example or where exactly I would place that expression?

Also, how do I manually enter in that text?


#9

Sure!

While in this case, I am using the condition to check for presence, in editing your condition, use this as an example, substituting unlocked (or whatever you want to check for…) for presence :


#10

Sorry, reviving this thread to get a solution to my problem. I’ve tried the code you gave me but I’m not sure I did it correctly. How does it know to check for only if the lock was unlocked for 5 minutes or more with the previousAge expression? Here’s what I have, but I have a feeling it’s wrong:

Edit: In testing this, I get a notification even if I unlock the door and immediately lock it right after or waiting 30 seconds and locking. It’s not waiting for the door to be unlocked for at least 5 minutes.