"command_high_accuracy_mode" sometimes not turned off

I have an automatism to turn high accuracy mode on and off on a phone (if I’m not at home and I’m driving fast turns on). Sometimes (!) when I get home high accuracy mode is not turned off. In this case something is wrong, because I send it any number of turn_offs, but it does nothing, only if I send a turn_on first, then the turn_off. I just noticed two strange things:

  1. The turn_off command that doesn’t turned off is not a websocket one, but a FCM one. But on the phone’s persistent connection is permanently on.
  2. The turn_off command that doesn’t turned off does not contain the parameters ttl:0 and priority:high.

This happens with two other phones sometimes also.

It usually takes at least 10 minutes when I realized the error, the log has already run out of that part, but I finally caught it, but the message that caused the error is still not there. I couldn’t paste the log because it’s too big, so it’s on the Google Drive share below.

All Home Assistant component versions are up to date.

Any idea?





what are your high accuracy settings?

All location sensors enabled, High accuracy mode sensor enabled,
High accuracy interval enabled and 5 s.

high accuracy mode settings meaning did you select a bluetooth device and/or zone to turn on automatically.

Sorry, I didn’t know there is such a setting, the “High accuracy mode (May drain battery fast)” is completly disabled. High accuracy mode is turned on/off by my automatism, and I have a simple switch like this:

switch:
  - platform: template
    switches:
      csabapontoshely:
        unique_id: csabapontoshely
        value_template: "{{ is_state('binary_sensor.csaba_nord3_high_accuracy_mode', 'on') }}"
        turn_on:
          service: notify.mobile_app_csaba_nord3
          data:
            message: command_high_accuracy_mode
            data:
              command: turn_on
              ttl: 0
              priority: high
        turn_off:
          service: notify.mobile_app_csaba_nord3
          data:
            message: command_high_accuracy_mode
            data:
              command: turn_off
              ttl: 0
              priority: high

Hi @dshokouhi
I’m sure the root cause must be there when the first turn_off message arrives, but when I realise the problem, the log has already run out of that part.
Is there any way to automatically save the log on the phone on the first message that causes the error? Or by any other way, with trigger, etc.
Or can the log size, which available in the Troubleshooting menu be increased significantly? Because then it might even include the affected part. In the Android’s Developer settings the log buffer is set to the maximum 8MB, but it has not effect.
Thanks

you can use an app like logcat reader to read historical logcat

1 Like