Piston to turn off plug after power is restored


#1

Hello,

I am new to the community and recently installed webcore, so I am still in the learning stages.

The issue that I am trying to solve is the following: I am trying to get an outlet to stay turned off once the power is restored.

It seems like it should be a simple piston, but I can’t figure out how to do it.


#2

I have an outlet that doesn’t turn itself on after a power cut.
I get round it by turning it on every 15 minutes.
You could try the same.
Ignore the only when option. This is for disabling certain pistons.


#3

All of my plugs seem to return to the same state they were in when the power went out. I am not normally concerned,but I have an aquarium that if we lose power, the outlet needs to stay off until I re prime the filter to avoid causing a flood and burning out a pump.


#4

You can try this by flipping the breaker they’re on, but assuming they report OFFLINE to SmartThings within a small period of time, you could do something like this:

Define Boolean variable: PowerFail

Execute
Every 5 minutes (or whatever interval you’d like)

IF Plug $status is OFFLINE
THEN
Set PowerFail equal True

In the condition that turns your pump on, add an “AND PowerFail is False” condition.

IF
Your normal conditions to turn on pump
AND PowerFail is False
THEN turn pump on
ELSE turn pump off

To clear it, you can create an Automation in your ST App called “FilterPrimed” or something. Then in the same piston
IF Routine (found under virtual devices) executes FilterPrimed
Then set PowerFail equal false


#5

These you can configure so that they will stay OFF when the power comes back on.

As I see it, this is not a simple piston. Because you have to know if the power was off.

It’s one thing to turn an outlet back on if it is OFF, but it’s something completely different to not turn an outlet back on if it was off.

In order for any piston to work, you’d have to catch the status of the device while it is in the no power state. Then you’d know not to turn it back on again…but that does not help you if the power stays off for a shorter duration of time than you are testing against.

So you’d almost have to constantly poll the device to see if it’s lost power. Or just invest in one that has that functionality built in (or get an updated DTH for the one you have which might also have that feature in it).

Just my 2 cents worth here…