Off Line Notification


#21

Everything else works great. Other pistons fire instantly - or nearly instantly. ST routines trigger WC pistons.

That outlet can be turned off manually, and will report off. I think the problem with the outlet and having no power is that it cannot report “anything” without power and ST must just retain the last known status.


#22

Okay-
So I think I may have solved my own problem.
1- ST hub has internal battery backup, (check)
2- Modem/router is on a UPS good for 2 hours use, 12 hours standby. (check)
3- I cannibalized a window sensor and figured out how to manipulate the tamper relay inside the sensor so I can use the “active”/“inactive” states as triggers.
4- I used a 5V relay and soldered NC to complete the window tamper circuit. (Tedious work).
5- I powered the 5V relay with an old USB cord. (red is positive, bare is negative)
6- I plugged the USB into an old 5V camera USB charger.
7- When plugged into wall power, the 5V relay will change to NO and trigger the window sensor to change to “Active”.
8- When the power goes off, the 5V relay will change to NC and trigger the window sensor to “Inactive”.
9- That’s where this piston comes in:

This all works great. However, since by default the door closes if the power is off, I don’t need notified between the times (after the door closes for the night and right before it opens for the day). That happens based on this piston:

How can I incorporate those variable times into my power notice piston above? The reason is because really don’t need a text message at 2AM when the door is already closed, but I would like it to check that window sensor for “active”/“inactive” just before the time that the Door Open Piston runs and all day during the times the door should be open based on the conditions in that piston.

Thoughts??


#23

Here is where I would start:

Power Off Notice

IF Sensor changes to 'active'        <-- Trigger
Then
    IF Time is between 9AM and 10PM  <-- Condition
    Then
        Send SMS notification
    END IF
END IF

IF Sensor changes to 'inactive'      <-- Trigger
Then
    IF Time is between 9AM and 10PM  <-- Condition
    Then
        Send SMS notification
    END IF
END IF

Chicken Coop Pop Door Open AM

Every day at 8:59AM                       <-- Trigger
Do
    IF Window Sensor is 'active'          <-- Condition
    Then
        Do stuff
    END IF
END EVERY

Every day at 9AM                          <-- Trigger
Do
    IF Sensor's temp is greater than 35°  <-- Condition
    Then
        Turn on Switch 15
        Send SMS notification
    END IF
END EVERY

I used the code “EVERY DAY AT(instead of “IF TIME”) so it only executes that one block


#24

Sometimes I just need to see what someone else does to make it click. I think the modification to the Power Off notification is the only one I need because the whole reason for this is that the power will be out. None of the other Pistons are going to work because none of the other sensors are going to work. We have 2 hours of internet after the UPS comes on. I don’t know if modifying the _“Chicken Coop Pop Door Open AM”_Piston will be of any value. It most likely won’t work without power. It just gives enough enough time to put things on manual. I think I violated my own rule of “simple is always better” on this project from the start…

Thank you @WCmore