Page 1 of 1

How to send notifications about low battery to Telegram?

Posted: 09 Jan 2022 13:26
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

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

Posted: 10 Jan 2022 12:07
by piet66
Have a look in module MxBatteries. Maybe this is what you need.

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

Posted: 11 Jan 2022 14:10
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)
}

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

Posted: 14 Jan 2022 12:39
by ToryBlaker
Telegram battery bot. Monitors laptop battery level and sends a message on Telegram when it drop below specified threshold.

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

Posted: 24 Dec 2022 00:16
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?