Monitor Devices battery with Node Red?

I would like to monitor the battery status of my z wave devices and also all my Iphones.

In Hass I have working sensors for these devices. How would I do a flow to send a notification if the batteries are getting low? Say at 20% battery left it would send me a message.

1 Like

This is my flow: every week I check sensors status, I check with switch node if “data.attributes.battery_level” is below 10% and if true I send a notify with telegram.

I do this with the cell phones in my household. When someone’s cell phone goes from 26 to 25%, they get an alert on Telegram.

Just use the Event State node, and right after that, a function that compares current battery state to previous battery state, and when it hits your threshold, send a message.

Would you share you function code with me. I’m new to Node Red and still learning.

Super simple code:

if (msg.data.old_state.state == "26" && msg.data.new_state.state == "25"){
    return msg;
} else { return null;}

Hello,

I tried to make the same like you, but i failing getting there :frowning:

Your ‘Ogni’, i have no idea what to fill in/ what node to select.

I can’t seem to find the same icons like you have for the current state?
image

For the switch, i just guessed:
image

I’m sure my notify will work (already using that node in other flows).

Any help would be nice.

Hey guys, created this flow for my battery check.
The messages will be send to my Pushover app on my phone if the battery is less then 30%.

Can you share this flow? Curious to play around with this.