Off Line Notification


#5

Maybe I don’t know enough about how this works. Couldn’t a piston watch for “plug1” to go offline and then send me an SMS message? How about if the whole hub goes offline, (power outage), can the piston still send me a text message?


#6

Possibly. I have seen a thread here in the forums covering this question…

Maybe try searching here.


Most definitely YES, since all SMS messages come from outside our home network.
BUT…
The trigger cannot be a local device, since it’s obviously offline in your scenario.


IE:
This works without power:
Every day at noon, send SMS

This won’t work unless powered:
IF Bulb turns off, send SMS


#7

Thanks for the help. I now better understanding what I’m asking for. I’ve been searching the forum for a couple of days. It seems the question has been asked many times, but no real answers. I’ll keep looking. Alternatively, I’m wondering if SmartThings could be set to send a text message when the hub goes offline instead of the push notification it sends. The push notification gets lost, or most of the time is unnoticed. A text could continue to alert me until I read it.


#8

I use Tasker on my Android. When important notifications come in, Tasker can make a unique sound, or alert me many other ways to make sure I get notified ASAP.


#9

Oh wow!
I use Tasker for several things, but never thought about that.
I’ll give it a go.


#10

Here is a few ideas for quick alerts:

When an important notification comes in, Tasker can:

  • Turn off Silent mode
  • Play music or a sound effect
  • Change your wallpaper
  • Popup a scene that covers your screen until you click a button
  • Send a SMS to your spouse (or self)
  • Vibrate a specific pattern
  • Flash a certain color using your notification LED etc

…and many many more!!


#11

That’s great. Not my perfect solution, but might get me by until something better comes along. How do I make Tasker see the notification from SmartThings?


#12

Tasker can see anything that comes in to the Notification tray.

I have another thread showing how I do it. (almost identical for your task)

Scroll down a bit and check out Step 6 Detailed Instructions in my other thread.
(ignore that part about ®, replace it with the keyword in your notification)

Also, replace lines 1 thru 6 with whatever you want to happen when that notification comes in


Pro Tip:
You could even have Tasker read out loud the Text in the notification. (as shown in step 6)


#13

So I learned today that I can get an internal battery backup for my modem/router, and the ST hub has 4 AA batteries in it. I’m thinking that if they both stay up when the power goes off, I should be able to get a text when the hub goes on battery. That would indicate the power has gone out. That is unless a storm takes out the cable as well…
Anyone know how long the ST hub can run on those 4 little batteries?


#14

I’ve never tested but 4 AA batteries should last a long time with ST HUB


#15

Thanks!
I just need long enough to determine it is on battery and get the text message.


#16

…Continuation of the original post!

So testing out the suggestion of using UPS backups to alert me of the power being off, I decided to see if this would work “before” I bought the UPS backups.

I created these 2 pistons to watch for the hub changing to battery power, and changing to mains power. I unplugged the hub from the wall to see if it would trigger a message. It did not. Instead, the hub just goes “offline”. Could this be a problem with the hub? I replaced the 4 AA batteries before testing…



#17

UPDATE—
I have rebooted the hub and verified on SmartThings that it shows when the hub is on battery power and when it is not. So,… the hub is working properly.
It must be my Piston.


#18

I’ve never tried creating a piston with HUBs status so I don’t know what’s going on there (And I don’t use the batteries either) BUT
my understanding was you have a outlet called plug1 and you want to see if that goes OFF.

If that plug is never to be turned on or off manually, status of that outlet would show you if there is power outtage or now. The piston can be something like this:

IF plug1 changes to OFF
Then
Send SMS “Power is OFF”

IF plug1 changes to ON
Then
Send SMS “power is ON”


#19

Tried that. Problem is that if “plug1” is on and power goes out, it is still being reported as “ON” in ST. I have “plug1” unplugged beside me for 2 hours now. Still showing “ON” in ST. I would have thought it would be “offline”, but nope…


#20

himmmm
I wonder if your ST App/devices/Webcore is having communication issues?

My last recommendation would be testing something simple with another device
and turnning that device OFF and see if that triggers anything in webcore (just to test the connection between three legs)

EDIT : one more thing, can you turn that outlet OFF via switch on the device instead of unplugging it?


#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