Send myself specific info (last activity) for devices stored in a variable


#1

1) Give a description of the problem
I don’t know how to send specific info from a group of sensors, stored in a variable to myself.

2) What is the expected behaviour?
After listing a group of devices in a variable (motion sensors without activity the last 24 hours) - I would like to send myself a notifikation with each of these sensors latest activity.

3) What is happening/not happening?
I cannot figure it out.

4) Post a Green Snapshot of the pistonimage
I don’t know how to do it.

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Are you using Hubitat?


#3

Have you made any start on this e.g getting the list of devices?

I have a health check piston I can share, it’s quite complex if you’re new to webcore. I use it to check all battery sensors for any activity. It reports by turning on virtual switches which are displayed on a hubitat dashboard. It could easily be amended to send alerts to your HE app on your phone.


#4

@Paul1964, have you tried the Battery Activity Check app on Hubitat?


#5

I wasn’t aware of it, what does it do/how does it work?

My battery devices are the original samsung smartthings ones, and I find their battery reporting very dodgy. New batteries can be 60%, almost dead batteries can still be 100%. I’m not sure if it’s the devices or the barberries themselves. Some seem to last just weeks, others months.


#6

I have had similar battery level problems with my Smarthings water leak sensors in particular. The new Aeotec versions work very well. But they are quite expensive. The app works by just adding all of the battery devices that you want to monitor. You can set up notifications based on battery level, activate a switch, or get battery reports from a button push. I have mine set to notify me at noon of any battery <25%. It works very well except when I get those <25% battery level when I know that I just changed that battery.


#7

That sounds useful, do you have a link? I’ve had a look and there seem to be a few similar apps available.


#8

And it is in HPM.


#9

Thanks for that, it looks good. I’ve installed and will see how it works.

For anyone else trying this, after installing via HPM, you need to go in to apps/add user app and select the app to set it up. Once configured, it shows under apps.


#10

Paul1964 & Pantheon - Thank you for your kind replies.
Yes - I’m on Hubitat. As a way to see which of my sensors were still present - I wanted to list devices that hadn’t had their ‘last activity’ in the past 24 hours. I could do that - using theBeardedtechGuy’s piston for health check. Next - I wanted to display the ‘last activity’ for each of the devices that hadn’t had a ‘last activity’ in the past 24 hours. In a single device notification to myself.
I couldn’t figure that out. I copied and modified a solution. Couldn’t get it to work, unless I send myself emails with the results (instead of a notification) - but I get several individual emails - I want a single email (notification) with all the ‘last activities’ for the sensors.
Do notice that the piston I’ve attached is divided into motion sensors, contact sensors etc. And that it’s in Danish :slight_smile:
I will try the ‘Device Activity Check’ though


#11

If you want a notification to your phone, rather than an email, assuming you have hubitat installed on the phone and setup to receive notifications. You can use the “send push notification” command in WC. Ensure you have the “store in messages” section selected too. You will need to add the phone into the WC devices too.


#12

Did you mean “Send Device Notification”? That is what I use to send notifications to my phone.


#13

No, I’ve not come across that one, had a quick look in WC and couldn’t see it?

I’ve always used “send push notification on smartthings & hubitat. It sends the message to any device running the HE app and added in the WC settings “Notification device for push message”


#14

This has worked perfectly for years.


#15

Interesting, I’ve never done it that way. I wonder if there are any technical differences?

Your method lets you target particular devices. I assume they have the WC app running on them & they have been added to WC as a device. My method sends the message to all devices setup within the WC settings to receive the messages. The WC app has to be installed on the devices.


#16

Nope. Just have the Hubitat app installed on each device.


#17

Here’s how I did it. It provides info on the piston state and saves the data in a global variable. I have another piston for the batteries for my cameras, etc. Then I have a different piston collect the data from the globals and sends me 1 email with all battery data (every other day).


#18

Looks great - I’ll try this :slight_smile:


#19

I already do - have a look in the piston :slight_smile: