I am trying to use WebCore to turn off a Zooz Zen 15 Ver 2.0 smart plug (using version 2.2 of krlaframboise device handler) if my shallow well pump stays running for more than an hour to prevent the pump from burning up. I could not find an app that will look for power exceeded for a period of time before turning off the plug (Smart Lighting will just turn off the plug after a period of time being on and does not take into account if there is load on the plug or not) so I decided to take the plunge and give WebCore a try.
I am new to WebCore but found a piston that was close enough to what I needed and got it set up. The code works perfect when testing using a Fan and a simple Neo Zwave switch using just the built in SmartThings Power Metering Switch Device Handler.
The problem I am having is the code just loops with the Zooz Zen15 which I need to use to handle the higher power requirements of the shallow well pump. The code runs fine and will alert if the switch is turned on, will alert if the switch is turned off and will alert if the switch “stay greater” than X power for X minutes however with the Zooz device the code just loops at notifying and never makes it to the turn off part of the code. Looking at the trace in WebCore the stay greater part of the code will turn green as it should when the power exceeds the value for the defined time but then after a few seconds go back to red causing the loop. I have tweaked every reporting interval in the device handler for the Zooz device and even tried using just the power metering device handler with the Zooz plug with the same results.
Any suggestions would be greatly appreciated because I am really stumped and would be very bummed if my well pump ran all night and got fried because I can’t figure this out.
Attached is a picture of my piston. I have all the times turned down to seconds just for testing.