Any Device Offline Piston


#11

The notification piston just sends PushOver notifications again to increase WAF.

Daily checks are okay but ideally I would like a move live method, as well as a last event per device monitoring, I have yet to figure out either though!


#12

Yet to get WAF :wink:

How did you adjust it for a push notification?

I am just playing with it now, I don’t have any tiles set up yet, so I am attempting to strip bits out…
But I am messing around on an android pad, I need a pc which I will get to soon…

Just looking at the piston, it’s a clever bit of work


#13


#14

Son of a… so apparently I’m a moron! :see_no_evil:


#15

Here is what it should look like with everything stripped out you don’t need:

Here is the original with lots of extra tile stuff:

It’s worth noting that this will only check ST device health status, it won’t monitor for missing devices or last contact with a device.


#16

@faze… thanks, this is as far as I had got

I am going to import yours :slight_smile:

I set mine to run every hour
How do you test it?? I mean I can’t tell if mine works or not


#17

You are pretty much there to be honest! To test wait for a device to go offline, or change the status comparison to one listed here: Device Offline Monitoring and set to run ever couple of minutes, just make sure this is changed back when its working.

I would suggest once a day would be sufficient other wise you will get spammed every hour when something goes offline.


#18

Great… cool, I enjoyed doing this

I want to say thanks to you @faze and @jsinderb

Tremendous help … thankyou

Ste

PS spent all this time on this piston … I wanna get spammed :smile:


#19

Tested… Works… Push notification (Yep)

Thanks!


#20

I imported the piston for “cnhb” in @faze’s post and had unplugged a device to test, but I’m not seeing any notification when the device went to OFFLINE, so I fear that I made a rookie mistake. Here’s my piston to laugh at:

After looking at it again and the other examples in this thread, it seems like I may be missing the “when” to execute. I assume there isn’t a mechanism that would sniff out when a status changes without me saying “check this every hour”. My text history shows a few messages in there, but I suspect that was because I hit the test button (which I can’t recall) and I may have had 1 or 2 devices offline at the time. It was pretty cool how it stored the device names under devicesNotResponding.

The goal was to get a notification when a device goes offline, but just the one time, not once per day or every hour or whatever. I’m sure setting an hourly check would seem a bit excessive, right? Also, is there an easier way to say “check all available devices” versus having to specify each one?

Any suggestions for how to adjust this to make it more efficient and meet my goal?


#21

$status does not update immediately. Unplug it and let it sit for awhile


#22

Thanks for the reply, @c1arkbar. Do you know how often $status would update within WebCoRE? I have one device that went gone offline apparently between last night and noon today, but I had not received a notification so I suspect I’m missing something entirely within my piston. Any suggestions for how to modify it to meet my intended goal? I imagine the lack of a timer statement is my downfall here.

Any suggestions for the other questions? Not sure if I should have just set up a new topic in the Design Help section versus continuing this thread.


#23

$status probably won’t trigger an update. Don’t know the frequency it gets updated either. I believe it’s something ST updates after the device can’t be reached after x amount of tries.

Just setup a once a day timer. If anything reports then you’ll know. I don’t have anything like this in my setup


#24

Here’s how I had updated my piston:

I have two devices showing offline as of now and I haven’t received any notification. It doesn’t seem like the piston is running based on the timer statement. Did I do something wrong?

My questions to make this meet my needs even better:

  • How should I change it so that it would notify me once a device has been added to the devicesNotResponding list but not more than once?
  • Is there a way to get more immediate notification versus having to run a timer statement?
  • Is there a way to say “check all available devices” rather than specifically adding each one to the $devicesToCheck variable?

#25

curious, @ line 30 your index is only checking 16 items. It appears you have defined many more items above the traditional limit. please confirm, are you getting notifications for items beyond the 16th?


#26

@rfmurphy81 @faze is “Unavailable” and “offline” the same thing?


#27

That only clears the tile contents which is limited to 16 (or was?). Notifications are sent for everything.


#28

Not sure, its not one of the $status’s I got when I ran a test Device Offline Monitoring


#29

Edit: I had to change the device status is OFFLINE to make it work.

I’m using user piston and couple of my devices are in Unavailable state but I’m not getting any notifications. Is the code still valid and working for others?

This is what I see on the log but not all the devices are online at this time.

Calculating (string) All devices are online as of Thu, Dec 27 2018 @ 6:01:00 PM CST + (string) ! >> (string) All devices are online as of Thu, Dec 27 2018 @ 6:01:00 PM CST!


#30

is OFFLINE works OK, BUT not for Presence sensor…

Piston is reporting it OK but its in my pocket and hub is 130 miles away.
Is it because its a battery device?

F