Android app location tracking

i try to check the logs here and there when I suspect issues like recently my wifes phone started reporting valid locations with a lot higher accuracy so I had to adjust the sensor setting for it to get more frequent updates. I had hers at 600 and noticed a few valid reports getting skipped at 1000, you can tell by the logs when that occurs.

I also dont rely solely on the device tracker to detect if im home, I find the wifi connection sensor to update faster in some cases so I use that too.

Apologies for chaining onto this thread…

I have wifi in the car too (that doesn’t turn off immediately with the ignition). I assume that will exclude wifi detection for me? I don’t think wifi scanning runs very often, correct?

the wifi connection sensor updates as soon as it detects a state change

Mine stays connected to the car wifi until I’ve gone into the house. I was referring the Android wifi scanning. I think that’s still a thing anyway, right? Where it scans for other APs in the background.

yes but completely unrelated to the sensor I am referring to

Oh, I think I get it. But if I’m properly understanding you, that sensor won’t work in my case because I’m still connected to my car AP when I walk in the house. So I’ve got location as my only option. Other than maybe a Bluetooth beacon, but I had real trouble getting that to work when I tried a year or so ago.

thats correct my Subaru turns off the moment I shut down the car and open the driver door, at that point my phone switches to the house

a lot can change in a year!

1 Like

Yeah, give it a try. I wrote a post about it earlier this year here: Anyone else experience issues with iBeacons? - #5 by BlueCharmBeacons

If a HA newbie like me can do it, anyone can!

1 Like

so today I did another test and seems like I get the automation to notify me that I’m away, but it doesn’t turn off BLE tracker when away.
that’s the log:

log - Pastebin.com

In traces, it shows: Choose: Option 2 executed

that’s the yaml:

alias: BLE switch for Gil's phone
description: ""
trigger:
  - platform: state
    entity_id:
      - person.gil
    to: not_home
  - platform: state
    entity_id:
      - device_tracker.gil_galaxy_s23
    to: not_home
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: person.gil
            state: home
        sequence:
          - service: notify.mobile_app_gil_galaxy_s23
            data:
              message: command_ble_transmitter
              data:
                command: turn_on
      - conditions:
          - condition: not
            conditions:
              - condition: state
                entity_id: person.gil
                state: home
        sequence:
          - service: notify.mobile_app_gil_galaxy_s23
            data:
              message: command_ble_trasmitter
              data:
                command: turn_off
mode: queued
max_exceeded: silent
max: 2

And then I went into the sensor configuration in the companion app, and BLE tracker was still on.

Is there anything wrong with my automation yaml?

trasmitter != transmitter missing the n :wink:

edit: your sign the command did not work is that the notification will show up on the device instead of being executed.

ohh… wow… I feel so dumb right now :slight_smile:

thank you.

1 Like

Circling back to this, which is more battery efficient:

  • BLE transmitter
  • Beacon monitor

probably going to vary from device to device bug most likely BLE transmitter as its less chatty in terms of sending updates to HA…beacon monitor will scan and send updates to the server upon changes

1 Like

Ahhh yes! I didn’t think of the updates being the most battery intensive. Thanks!

where are you finding Configuration > Companion App > Manage Sensors

Sidebar on the left, scroll down to the cog, which shows the same settings page as you would see on the website, but with the addition of “companion app”

2 Likes

Thank you so much, I found it

1 Like

I’he this problem.
when I use smartphone on my car connect to android auto it’s ok…the tracker gps works
when don’t use smarphone …for example…when I ride my motorbike the tracker gps is off…

what are the exact configuration i must set? I’ve a note 20 samsung…thanks!

The steps in the troubleshooting that I linked.