How to send notifications about low battery to Telegram?

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
Dan
Posts: 38
Joined: 01 May 2019 11:39

How to send notifications about low battery to Telegram?

Post by Dan »

Hi
Is there any way to check low battery status and send it to Telegram?
Unfortunately low battery notification are not included into "warnings" or "errors", so I can't sent it to Telegram using "Notification Filtering" app
Is there any other way? Looking all events by eyes in web interface is not a solution
piet66
Posts: 266
Joined: 04 Feb 2017 17:00

Re: How to send notifications about low battery to Telegram?

Post by piet66 »

Have a look in module MxBatteries. Maybe this is what you need.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v3.2.3 from 2022-04-06 04:56:23 +0300
aivs
Posts: 68
Joined: 04 Mar 2011 15:26

Re: How to send notifications about low battery to Telegram?

Post by aivs »

Hi!

I use Easy Scripting for all notifications . You can set up any case for notification.
In this case, the telegram bot sends a notification if the battery is less than 20 %

Code: Select all

### ZWayVDev_zway_2-0-128

if (vdev("ZWayVDev_zway_2-0-128").value() < 20) {
	var req = {method: "GET", async: true}
	req.url = "https://api.telegram.org/bot5071110907:AAE49V-Xt2Y8WrNvBaPxbAX3luuHcw_Rkzc/sendMessage?chat_id=-781159907&text=Sensor Battery: " + vdev("ZWayVDev_zway_2-0-128").value() + " %"
	http.request(req)
}
ToryBlaker
Posts: 1
Joined: 11 Jan 2022 16:59

Re: How to send notifications about low battery to Telegram?

Post by ToryBlaker »

Telegram battery bot. Monitors laptop battery level and sends a message on Telegram when it drop below specified threshold.
Dan
Posts: 38
Joined: 01 May 2019 11:39

Re: How to send notifications about low battery to Telegram?

Post by Dan »

aivs wrote:
11 Jan 2022 14:10

Code: Select all

### ZWayVDev_zway_2-0-128

if (vdev("ZWayVDev_zway_2-0-128").value() < 20) {
	var req = {method: "GET", async: true}
	req.url = "https://api.telegram.org/bot5071110907:AAE49V-Xt2Y8WrNvBaPxbAX3luuHcw_Rkzc/sendMessage?chat_id=-781159907&text=Sensor Battery: " + vdev("ZWayVDev_zway_2-0-128").value() + " %"
	http.request(req)
}
Vitaly, Is there any way to check all ZWayVDev_zway_***-0-128 devices?
Not to name them literally like 2-0-128, 3-0-128, 4-0-128, 5-0-128, but run all over 0 to 100, find all battery devices and check their battery status?
Post Reply