# Global battery monitoring

**URL:** <https://community.homey.app/t/global-battery-monitoring/48043>\
**Category:** Questions & Help\
**Created:** [June 1, 2021, 8:54pm UTC](https://community.homey.app/t/global-battery-monitoring/48043 "2021-06-01T20:54:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Bittner](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_bittner/32/16698_2.png) [@Peter\_Bittner](https://community.homey.app/u/Peter_Bittner)\
**Post date:** [June 1, 2021, 8:54pm UTC](https://community.homey.app/t/global-battery-monitoring/48043/1 "2021-06-01T20:54:01Z")

</div>

I have read what I can (topics in english) but I cannot determine how battery levels are monitored. I know Homey sends a message to advise a sensor battery is flat, but how can you instrument this in some way? Such as starting a flow if a sensor battery is flat without including one for every sensor.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [June 1, 2021, 10:43pm UTC](https://community.homey.app/t/global-battery-monitoring/48043/2 "2021-06-01T22:43:14Z")

</div>

Hi Peter. One way is to start a flow with Zone \> Home \> “a sensor’s value has changed” \> select Sensor Type “Battery level”.

As condition you can add a logics card type “is smaller than” and select the local variable “Value” and set it to 20% f.i.  
Then you can choose to send a notification, or a push message to a users’ phone f.i.

You can add the local tags (variables) “Name” and “Zone” in the message text.  
This way, the message reports f.i.:  
Battery of Window Luxmeter in zone Livingroom is below 20%

Example notifications:

 ![Screenshot_20210602-020117_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/f/6f861ffe62c696346dbd20c4e1e29a8b69fb52c8.jpeg)

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [June 2, 2021, 4:53am UTC](https://community.homey.app/t/global-battery-monitoring/48043/3 "2021-06-02T04:53:29Z")

</div>

Someone made a [post](https://community.homey.app/t/get-a-notification-on-your-phone-on-battery-level-change/8973) about this alr a long long time ago.

---

<div class="post-metadata">

**Author:** ![Peter\_Bittner](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_bittner/32/16698_2.png) [@Peter\_Bittner](https://community.homey.app/u/Peter_Bittner)\
**Post date:** [June 2, 2021, 7:28pm UTC](https://community.homey.app/t/global-battery-monitoring/48043/4 "2021-06-02T19:28:14Z")

</div>

Thanks all for your input. I hadn’t wanted to use the Email App as it seemed that you had to reduce the security of the email service in order to use it.

Still seems that there is no way to simply provide a battery monitoring flow with the offending sensor being provided as a parameter. I do understand that homey sends notifications.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [June 2, 2021, 8:19pm UTC](https://community.homey.app/t/global-battery-monitoring/48043/5 "2021-06-02T20:19:42Z")

</div>

@Rocodamelshekima Appearantly! I didn’t search for it while Peter wrote

> [@Peter\_Bittner](#):
>
> I have read what I can (topics in english)

and I trusted him on that one 😁

@Peter_Bittner  
Idk where ‘the email app’ came from? Wasn’t mentioned.

> [@Peter\_Bittner](#):
>
> Still seems that there is no way to simply provide a battery monitoring flow with the offending sensor being provided as a parameter.

I don’t really get your point, but it can be me. To me this is the simplest way possible; It monitors the batteries of all of your battery powered devices and, it even tells you which batter(y)(ies) from which zone is below x % and tells you it’s / their % of juice left.

The offending batter(y)(ies) report themselves this way imho

---

<div class="post-metadata">

**Author:** ![John\_Lesage](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/john_lesage/32/16576_2.png) [@John\_Lesage](https://community.homey.app/u/John_Lesage)\
**Post date:** [August 28, 2023, 11:32am UTC](https://community.homey.app/t/global-battery-monitoring/48043/6 "2023-08-28T11:32:32Z")

</div>

maybe I overlooked something, but this is what I want;

I want to sent the results from the image below directly to my whatsapp weekly.

 ![2023-08-28_13-25-08](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/d/cddc97e53c305ac79650ce00ccd4156a424391bd.png)

for now I have created a quite complex flow to check each battery and then create a flow per day when the level is below 5% and evey Thursday a complete overview of all of the batteries.

 ![2023-08-28_13-31-33](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/8/c87dee6e91d9a9bf660da75e153b6b74bd050910.png)

Thanks for helping me out

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 28, 2023, 11:36am UTC](https://community.homey.app/t/global-battery-monitoring/48043/7 "2023-08-28T11:36:49Z")

</div>

1. Hit the `v` on the right to view the post:

> [@The Flow Exchange(r) - Exchange Your Flows with Others!](https://community.homey.app/t/the-flow-exchange-r-exchange-your-flows-with-others/68981/36):
>
> Send a report with all battery levels When you’d like to receive an overview, with the battery levels of all battery powered Homey devices Apps used: [HomeyScript](https://homey.app/nl-nl/app/com.athom.homeyscript)[CallMeBot](https://homey.app/a/com.gruijter.callmebot/) - You can replace it with your own messaging app [Email sender](https://homey.app/nl-nl/app/email.sender) - Optional - just an example messaging app you can use HomeyScript code used (it’s included in the flow): (Updated @ March 2nd 2025) const devicesObject = await Homey.devices.getDevices({ filter: { class: 'sensor' …

.

1. By the way, the flow you showed can be done like this  
 ![Screenshot_20230828-134326_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/b/1b1146de4b21caa6e5be48756e86f558255ea9c1.jpeg)

---

<div class="post-metadata">

**Author:** ![John\_Lesage](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/john_lesage/32/16576_2.png) [@John\_Lesage](https://community.homey.app/u/John_Lesage)\
**Post date:** [August 28, 2023, 11:56am UTC](https://community.homey.app/t/global-battery-monitoring/48043/8 "2023-08-28T11:56:33Z")

</div>

Hi Peter,

Thanks I will check and try to create it tonight. Everyday my Home(y) get a little smarter (not only the Homey) 😉

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 28, 2023, 12:11pm UTC](https://community.homey.app/t/global-battery-monitoring/48043/9 "2023-08-28T12:11:16Z")

</div>

The first part is an importable advanced flow, and it can send an battery overview at days / times you prefer, just replace the trigger card with ‘When time is 15:00’ and condition ‘And day is Thursday’

---

<div class="post-metadata">

**Author:** ![John\_Lesage](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/john_lesage/32/16576_2.png) [@John\_Lesage](https://community.homey.app/u/John_Lesage)\
**Post date:** [August 29, 2023, 1:08pm UTC](https://community.homey.app/t/global-battery-monitoring/48043/10 "2023-08-29T13:08:04Z")

</div>

> [@The Flow Exchange(r) - Exchange Your Flows with Others!](https://community.homey.app/t/the-flow-exchange-r-exchange-your-flows-with-others/68981/36):
>
> ```auto
> // battery-report
> let array = [];
> 
> const devices = await Homey.devices.getDevices({ filter: {capabilities: 'measure_battery'} });
> _.forEach(devices, device => {
> array.push( device.name + ': \n' + device.capabilitiesObj?.measure_battery.value + '%' );
> });
> 
> //oldest date on top sort array = ["time_stamp device", "time_stamp device", "time_stamp device"]
> const array_sorted = array.slice().sort(function(time_stamp, device) { 
> const firsttime_stamp = time_stamp.split(" ")[0];
> const secondtime_stamp = device.split(" ")[0];
> if(firsttime_stamp < secondtime_stamp) return -1;
> if(firsttime_stamp > secondtime_stamp) return 1;
> return 0;
> });
> 
> return("Battery levels:\n" + array_sorted.join('\n') + "\n");
> 
> ```

Hi Peter,

Thanks, this works perfectly for me!
