I agree, that’s a complex topic. I realised that quickly.
The good news is (just for information): It works as stated in the location documentation if zone and bluetooth constraint set, bt/zone setting enabled, trigger range set to 500 and as long as no notification commands are involved.
Arriving home zone:
- Entering
zone.home_expanded
→ High accuracy mode enabled
- Entering
zone.home
, therefore exiting zone.home_expanded
→ High accuracy mode disabled
Leaving home zone:
- Exiting
zone.home
, therefore entering zone.home_expanded
→ High accuracy mode enabled
- Exiting
zone.home_expanded
→ High accuracy mode disabled
Today I went jogging while bt headset was connected all the time and this happened:
- Leaving home
- Connecting bluetooth headset within home zone > nothing happened
- Leaving home zone and entering expanded zone > zone and bt constraint both met > high accuracy mode activated (1)
- Leaving expanded zone while bt headset still connected > high accuracy mode deactivated (2)
- Arriving home
- Entering expanded zone > high accuracy mode activated (3)
- Entering home zone > high accuracy mode deactivated (4)
What do you mean with “may still apply”? So, turn_on shouldn’t activate the notification if constraints are not met, should it? If I understand the documentation correctly then a sticky notification also shouldn’t stay when e.g. first a force_on command is sent and later a constraint goes from active to inactive (or do I get the documentation wrong?):
The difference between turn
and force
is only relevant if you have zone and/or bluetooth constraints set in the high accuracy mode settings. In this case force_on
will make high accuracy mode active until either force_off
is sent, or the constraints go from active to inactive. Similarly, force_off
will turn off high accuracy mode until either force_on
is sent, or the constraints go from inactive to active.
I also just found out (this is what I noticed, anyway, but I’m not sure if it’s intended), that turn_off disables the main high accurracy mode setting, while with a force_off the setting stays enabled. Until now I assumed that also a force_off will disabled the mode as the turn_off does. This might be a helpful information in the documentation. I currently even don’t know whether turn_on should activate the notification even if constraints aren’t met. Thus, it might be worth to better understand how things work before I go on testing. I noticed that you are one of the active developers for the companion app. Would you please explain more detailed how these commands are intended to be used and what they do exactly respectively how they work in detail (maybe with some examples)?
However, I owe you at least some log lines at this stage. I sent a turn_on at 23:01:00 and turn_off 23:02:00. The log is filtered by search pattern “high accuracy”. I’ve never posted logs here and upload of txt files is not allowed, hopefully i did it correctly (I had to omit some line due to the body limit):
10-05 23:01:00.515 27119 27119 D LocBroadcastReceiver: Forcing of high accuracy mode enabled
10-05 23:01:00.536 27119 27282 D LocBroadcastReceiver: High accuracy mode enabled, because command_high_accuracy_mode was used to turn it on
10-05 23:01:00.538 27119 27282 D LocBroadcastReceiver: High accuracy mode parameters changed. Enable high accuracy mode.
10-05 23:01:00.541 27119 27282 D HighAccLocService: Try starting high accuracy location service (Interval: 5s)...
10-05 23:01:00.548 27119 27119 D HighAccLocService: High accuracy location service created -> onCreate
10-05 23:01:00.549 27119 27119 D HighAccLocService: High accuracy location service (Interval: 5s) started -> onStartCommand
10-05 23:01:00.583 27119 27280 D LocBroadcastReceiver: High accuracy mode appears to have stopped, restarting high accuracy mode
10-05 23:01:00.586 27119 27280 D HighAccLocService: Try stopping high accuracy location service...
10-05 23:01:00.588 27119 27119 D HighAccLocService: High accuracy location service stopped -> onDestroy
10-05 23:01:00.608 27119 27280 D LocBroadcastReceiver: High accuracy mode enabled, because command_high_accuracy_mode was used to turn it on
10-05 23:01:00.611 27119 27280 D HighAccLocService: Try starting high accuracy location service (Interval: 5s)...
10-05 23:01:00.622 27119 27119 D HighAccLocService: High accuracy location service created -> onCreate
10-05 23:01:00.622 27119 27119 D HighAccLocService: High accuracy location service (Interval: 5s) started -> onStartCommand
10-05 23:01:00.661 27119 27219 D LocBroadcastReceiver: High accuracy mode appears to have stopped, restarting high accuracy mode
10-05 23:01:00.664 27119 27219 D HighAccLocService: Try stopping high accuracy location service...
10-05 23:01:00.672 27119 27119 D HighAccLocService: High accuracy location service stopped -> onDestroy
10-05 23:01:00.672 27119 31214 D LocBroadcastReceiver: High accuracy mode appears to have stopped, restarting high accuracy mode
10-05 23:01:00.675 27119 31214 D HighAccLocService: Try stopping high accuracy location service...
10-05 23:01:00.690 27119 27219 D LocBroadcastReceiver: High accuracy mode enabled, because command_high_accuracy_mode was used to turn it on
10-05 23:01:00.699 27119 27219 D HighAccLocService: Try starting high accuracy location service (Interval: 5s)...
10-05 23:01:00.702 27119 31214 D LocBroadcastReceiver: High accuracy mode enabled, because command_high_accuracy_mode was used to turn it on
10-05 23:01:00.702 27119 27119 D HighAccLocService: High accuracy location service created -> onCreate
10-05 23:01:00.702 27119 27119 D HighAccLocService: High accuracy location service (Interval: 5s) started -> onStartCommand
10-05 23:01:00.792 27119 27280 D LocBroadcastReceiver: High accuracy mode appears to have stopped, restarting high accuracy mode
10-05 23:01:00.796 27119 27280 D HighAccLocService: Try stopping high accuracy location service...
10-05 23:01:00.799 27119 31214 D LocBroadcastReceiver: High accuracy mode appears to have stopped, restarting high accuracy mode
10-05 23:01:00.803 27119 27119 D HighAccLocService: High accuracy location service stopped -> onDestroy
10-05 23:01:00.804 27119 31214 D HighAccLocService: Try stopping high accuracy location service...
10-05 23:01:00.833 27119 27280 D LocBroadcastReceiver: High accuracy mode enabled, because command_high_accuracy_mode was used to turn it on
10-05 23:01:00.834 27119 31214 D LocBroadcastReceiver: High accuracy mode enabled, because command_high_accuracy_mode was used to turn it on
10-05 23:01:00.844 27119 27280 D HighAccLocService: Try starting high accuracy location service (Interval: 5s)...
10-05 23:01:00.851 27119 27119 D HighAccLocService: High accuracy location service created -> onCreate
10-05 23:01:00.851 27119 27119 D HighAccLocService: High accuracy location service (Interval: 5s) started -> onStartCommand
10-05 23:01:00.876 27119 27282 D LocBroadcastReceiver: High accuracy mode appears to have stopped, restarting high accuracy mode
10-05 23:01:00.888 27119 27282 D HighAccLocService: Try stopping high accuracy location service...
10-05 23:01:00.894 27119 27119 D HighAccLocService: High accuracy location service stopped -> onDestroy
10-05 23:01:00.915 27119 27282 D LocBroadcastReceiver: High accuracy mode enabled, because command_high_accuracy_mode was used to turn it on
10-05 23:01:00.918 27119 27280 D LocBroadcastReceiver: High accuracy mode appears to have stopped, restarting high accuracy mode
10-05 23:01:06.041 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:01:10.050 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:01:13.435 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:01:19.061 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:01:24.040 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:01:29.050 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:01:34.051 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:01:39.049 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:01:44.047 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:01:49.855 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:01:50.053 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:01:54.045 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:02:00.049 27119 27119 I NotificationManager: io.homeassistant.companion.android: notify(-561227077, null, Notification(channel=High accuracy location shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0xa color=0xff888888 category=service actions=1 vis=SECRET semFlags=0x0 semPriority=0 semMissedCount=0)) as user
10-05 23:02:00.709 27119 27119 D LocBroadcastReceiver: Forcing of high accuracy mode disabled
10-05 23:02:00.713 27119 31212 D LocBroadcastReceiver: High accuracy mode parameters changed. Disable high accuracy mode.
10-05 23:02:00.714 27119 31212 D HighAccLocService: Try stopping high accuracy location service...
10-05 23:02:00.720 27119 27119 D HighAccLocService: High accuracy location service stopped -> onDestroy
10-05 23:02:01.195 27119 27119 D MessagingService: Creating notification with following data: {webhook_id=44726931d0d1f4309d9dcb826f7a6f78fe4a92e9c7ab5e6818c8ba4493700bd0, message=High Accurcy Mode inaktiv, server_id=1}
10-05 23:02:45.474 27119 31491 D LocBroadcastReceiver: High accuracy mode disabled, because defined ([C0:86:B3:9A:C1:FD, 64:D4:BD:CE:BF:BD]) bluetooth device(s) not connected (Connected devices: [BluetoothDevice(address=70:BF:92:E0:D0:EC, name=Jabra Evolve2 85, paired=true, connected=false), BluetoothDevice(address=00:22:D0:01:03:A2, name=Polar iWL, paired=true, connected=false), BluetoothDevice(address=C0:86:B3:9A:C1:FD, name=OpenFit by Shokz, paired=true, connected=false), BluetoothDevice(address=64:D4:BD:CE:BF:BD, name=Golf VII, paired=true, connected=false)])
10-05 23:02:45.573 27119 31560 D LocBroadcastReceiver: High accuracy mode disabled, because defined ([C0:86:B3:9A:C1:FD, 64:D4:BD:CE:BF:BD]) bluetooth device(s) not connected (Connected devices: [BluetoothDevice(address=70:BF:92:E0:D0:EC, name=Jabra Evolve2 85, paired=true, connected=false), BluetoothDevice(address=00:22:D0:01:03:A2, name=Polar iWL, paired=true, connected=false), BluetoothDevice(address=C0:86:B3:9A:C1:FD, name=OpenFit by Shokz, paired=true, connected=false), BluetoothDevice(address=64:D4:BD:CE:BF:BD, name=Golf VII, paired=true, connected=false)])
I couldn’t find a line similar to this in the logs when sending the turn_on command:
10-05 22:38:23.489 27119 27263 D LocBroadcastReceiver: High accuracy mode disabled, because defined ([C0:86:B3:9A:C1:FD, 64:D4:BD:CE:BF:BD]) bluetooth device(s) not connected (Connected devices: [BluetoothDevice(address=70:BF:92:E0:D0:EC, name=Jabra Evolve2 85, paired=true, connected=false), BluetoothDevice(address=00:22:D0:01:03:A2, name=Polar iWL, paired=true, connected=false), BluetoothDevice(address=C0:86:B3:9A:C1:FD, name=OpenFit by Shokz, paired=true, connected=false), BluetoothDevice(address=64:D4:BD:CE:BF:BD, name=Golf VII, paired=true, connected=false)])'
It just says:
Forcing of high accuracy mode enabled
PS: While testing today and yesterday I sometimes noticed that the high accuracy mode sensor switched to true but no notification was shown and no high accuracy location updates were written to the location history. I had to open the background location sensor for example and suddenly the sticky notification appeared. In addition I had the situation that with only a zone and no bluetooth constraint configured but the notification appeared even though I was within the configured zone what should equal “constraint isn’t met”. After a reboot it went to normal again. However, I just wanted to mention it, but we can focus on that later if needed because I currently don’t want to mix up multiple issues, it’s already complex enough.