Minimize Battery Drain with Location Updating

mdman2021

New member
Here's a fairly easy slam dunk for those who know the answer...

I have a Macrodroid macro that fires on a geofence Entry/Exit. I need the trigger to fire as close to when it actually happens as possible. Therefore, I have the location update set to every 30 seconds.

I know this frequent update is a big battery drain -BUT- I only need to have this macro enabled when I arrive home.

So here's my question... Can I minimize the battery drain by DISABLING the macro when I do not need it? In other words, does the location updating by this macro stop if the macro is DISABLED??

Thanks in advance!
 

Pseudocyclic

Well-known member
My understanding is that a macro has exactly the same power consumption if you disable it as it would have if you deleted it - ie zero.
 

420

Active member
Here's a fairly easy slam dunk for those who know the answer...

I have a Macrodroid macro that fires on a geofence Entry/Exit. I need the trigger to fire as close to when it actually happens as possible. Therefore, I have the location update set to every 30 seconds.

I know this frequent update is a big battery drain -BUT- I only need to have this macro enabled when I arrive home.

So here's my question... Can I minimize the battery drain by DISABLING the macro when I do not need it? In other words, does the location updating by this macro stop if the macro is DISABLED??

Thanks in advance!
I have to admit that it is still not 100% clear to me, but this is what the macrodroid developer said;

If you have no macros that use any of the relevant triggers (e.g. Cell tower) then this will disable the regularly checking and there will be zero battery impact from the disabled macro.

In this thread; https://www.macrodroidforum.com/index.php?threads/does-a-disabled-macro-use-battery.1200/#post-6772
 

mdman2021

New member
@mdman2021,

I recommend you to set your screen brightness 20 to 30% lower instead.
Yes, I know that reducing screen brightness will lower battery drain, but I don't see how lowering my screen brightness is going to lower battery drain which is caused by Macrodroid's "Location Updating".

Here is my slightly reworded question:
Can I FURTHER minimize the battery drain -- which is caused by Macrodroid's "Location Updating" -- by DISABLING my macros which use a Geofence trigger?

Maybe a better example might help...
In Macrodroid, I created a "geofence" around my workplace. Next, I created a Macrodroid macro called "At_Work" which uses this geofence as a Trigger. Now, when I physically ENTER this geofence, the geofence trigger (in the "At_Work" macro) will cause my "At_Work" macro to run which will then send an SMS message to my wife telling her I have arrived at my workplace. In order for Macrodroid to know when to run the macro, it must must constantly update where my phone is located. Obviously, this constant location updating causes a certain amount of battery drain. When I arrive home, there is no need for Macrodroid to continue to constantly update my location (until the next morning). I was hoping that if I DISABLE the "At_Work" macro (when I am home) it will tell Macrodroid to stop updating my location UNTIL the next morning when I RE-ENABLE the "At_Work" macro. Meanwhile, Macrodroid would continue to use Location Services for all OTHER macros which require Location Services.
 

tanutanu

Well-known member
Yes, I know that reducing screen brightness will lower battery drain, but I don't see how lowering my screen brightness is going to lower battery drain which is caused by Macrodroid's "Location Updating".

Here is my slightly reworded question:
Can I FURTHER minimize the battery drain -- which is caused by Macrodroid's "Location Updating" -- by DISABLING my macros which use a Geofence trigger?

Maybe a better example might help...
In Macrodroid, I created a "geofence" around my workplace. Next, I created a Macrodroid macro called "At_Work" which uses this geofence as a Trigger. Now, when I physically ENTER this geofence, the geofence trigger (in the "At_Work" macro) will cause my "At_Work" macro to run which will then send an SMS message to my wife telling her I have arrived at my workplace. In order for Macrodroid to know when to run the macro, it must must constantly update where my phone is located. Obviously, this constant location updating causes a certain amount of battery drain. When I arrive home, there is no need for Macrodroid to continue to constantly update my location (until the next morning). I was hoping that if I DISABLE the "At_Work" macro (when I am home) it will tell Macrodroid to stop updating my location UNTIL the next morning when I RE-ENABLE the "At_Work" macro. Meanwhile, Macrodroid would continue to use Location Services for all OTHER macros which require Location Services.
I just told more effective option:) It isn't better to be sensitive.

The geofence trigger is just working at the moments when you enter/exit it. The location checking frequency it based on is very small impact to battery draining as my testings. Because it couldn't set to less than 30 seconds. 30 sec. is not so frequent for me but seems different for you, so you can tweak it up to you:)
If you want to know lower level features of geofence and unified location logging mechanism, these Google's documents help you.

 

mdman2021

New member
I have to admit that it is still not 100% clear to me, but this is what the macrodroid developer said;

If you have no macros that use any of the relevant triggers (e.g. Cell tower) then this will disable the regularly checking and there will be zero battery impact from the disabled macro.

In this thread; https://www.macrodroidforum.com/index.php?threads/does-a-disabled-macro-use-battery.1200/#post-6772
I have several Macrodroid macros that use a Geofence as a Trigger. Most of those macros are configured with the "Location Update Rate" set to 30 minutes so my phone's location is updated every 30 minutes -- for these macros the battery drain is not that bad. However, I have another macro configured with the "Location Update Rate" set to 1 minute. There a times (of often a week or more) when I do not need this macro to be draining my battery by constantly updating my location every 1 minute. Therefore, I was hoping that if I DISABLE this "1-minute" macro then Macrodroid would stop updating my location every 1 minute -- and only do the Location Update every 30 minutes for the other "Geofence" macros. Of course, this battery saving won't be realized if Macrodroid continued to update my location every 1 minute EVEN THOUGH I have the 1-minute location update macro DISABLED.
 

420

Active member
I have several Macrodroid macros that use a Geofence as a Trigger. Most of those macros are configured with the "Location Update Rate" set to 30 minutes so my phone's location is updated every 30 minutes -- for these macros the battery drain is not that bad. However, I have another macro configured with the "Location Update Rate" set to 1 minute. There a times (of often a week or more) when I do not need this macro to be draining my battery by constantly updating my location every 1 minute. Therefore, I was hoping that if I DISABLE this "1-minute" macro then Macrodroid would stop updating my location every 1 minute -- and only do the Location Update every 30 minutes for the other "Geofence" macros. Of course, this battery saving won't be realized if Macrodroid continued to update my location every 1 minute EVEN THOUGH I have the 1-minute location update macro DISABLED
I don't use any location based triggers myself so i did not know that you could even set a different update rate per trigger (i thought you were talking about the update rate in MD settings trigger options), if this is true then i would say it's safe to assume that it stops updating your location at that interval the moment you disable that macro.
 

420

Active member
I have a Macrodroid macro that fires on a geofence Entry/Exit. I need the trigger to fire as close to when it actually happens as possible. Therefore, I have the location update set to every 30 seconds.
Wait a minute, i think you were talking about having the update rate in MD settings trigger options set to every 30 secconds after all!

If this is set to every 30 seconds then i have no idea what these different update rate options on individual triggers are about.. :ROFLMAO:

Will changing these update rates on individual triggers even make any difference in battery consumption when the MD update rate is set to 30 seconds anyway?

It is all only becoming more unclear to me 😅
 

tanutanu

Well-known member
OP might recognize the differences of the frequency between OS location service and MD location/geofence.
Now all apps can just make receivers to get a specific location data, and couldn't initiate to work of GPS, Cell towers, Wifi and looking up the Google stored data via Internet connection. These are managed by the location service by itself, so its refresh rate is out of MD concerns. MD is just waiting the renewal events via receivers, so if no data coming, no waking up and no processing, even though you set it up every 30 seconds MD main process never calls the triggers as you know. The mechanism is similar to alarm, based on system tick as my understandings.

On the others hand, the checking frequency of MD location/geofence is still a factor of battery draining, but it's very small. If you have timer base triggers such as interval, stopwatch and longer wait(above 5 seconds when ticked depending on alarm option), they consume battery at the same level.

You don't get outside while working, the geofence trigger is never fired. It means the trigger handler of MD main process is working correctly and well filtering effectively. It was proceeded before each macro calling and only when MD main getting location change event from OS service, and then triggers are called as the conditions. That's why you don't need to be sensitive:)

If you still worry about it, you can turn on airplane mode to make sure all location sources such as GPS, Cell, and WiFi are NOT working, however it is not realistic. So, Wifi only might be good option for you.
In my opinion, modern Google location service is improved enough intelligent,reducing the frequency just still on the same places, turning off unreliable GPS inside the buildings, so don't care about it.
 
Last edited:

tanutanu

Well-known member
Wait a minute, i think you were talking about having the update rate in MD settings trigger options set to every 30 secconds after all!

If this is set to every 30 seconds then i have no idea what these different update rate options on individual triggers are about.. :ROFLMAO:

Will changing these update rates on individual triggers even make any difference in battery consumption when the MD update rate is set to 30 seconds anyway?

It is all only becoming more unclear to me 😅
I think the value on MD settings menu is the default. It is preset to trigger option when you add each trigger, and the option can be override on the trigger setting.
I'm not sure the MD internal code itself, but the frequency value passes to location service when MD register the receiver object as its required frequency, according to Google documents. However, it doesn't seem guaranteed, just a request. The location service determine by itself, and send the renewal on its decisions.
 
Top