Background:
I setup mosquitto and verified that it is running and able to see my devices. I’m also able to view battery information.
Issue:
I setup an automation based on @brusche OwnTracks Refresh example. It is supposed to refresh the location and battery information every 15 minutes, but it does not seem to work. There is also a button to do a manual refresh, but my battery information doesn’t refresh using that as well. The only time it updates my info is when i enter a zone. Any ideas?
I removed my commented out my mosquitto config to disable the ACL file in case that was the issue, but it still doesn’t update. I see a change in HA when i manually publish my location using the OwnTracks app on my iPhone or if i enter or exit a zone (from my configuration.yaml file).
Is there something on the owntracks ios app i need to enable for it to receive the messages? is there somewhere i can test to make sure my device is seeing the publications from HA?
I think the option is in preferences -> advanced -> Remote Commands (make sure it’s enabled). Not sure what the default state is, though. If it’s not that, I’d check your MQTT sub/pub topics and make sure you don’t have an extra slash or something. Hope you get it working!
Ok I looked everywhere on the IOS app where I can modify any preferences. The only way i found where I can enable cmd: true is by exporting my current otrc file, modifying it and then re-importing it. so far it is working now. If anyone has been able to find where to modify preferences please let me know.
Well I may just go back to iCloud monitoring and live with the notifications about someone tracking me every time I restart HA. iPhone just doesn’t play nice with owntracks. It doesn’t reliably update locations and other data the way I would like. Maybe my next phone should just be an android.
I’m not sure is relevant to your problem, but I also have a very poor experience with OwnTracks on iPhone 5c. I can reproduce a bug almost daily but I couldn’t find any help yet from the community yet, nor a way to troubleshoot this.
Basically, from MQTT and HA perspective all is good, and even OwnTracks app seems reacting ok to region enter/exit events (I get push notification at the right time and place), but the actual message gets published into the MQTT topic only when I bring the application in foreground, hence invalidating the whole automation process.
I can can reproduce this with 50% accuracy more or less, i.e. one time works and one time doesn’t. I wonder if it’s something related with my iPhone version or if it’s affecting every iOS installation. Personally I’m really looking forward to drop OwnTracks at all and just use HA mobile app (still waiting for the beta so I couldn’t test it yet)
Yes I would like to get my hands on the iOS beta as well. I created an otrc file last night and it does seem to be a little better but still not automation worthy.
I do get the updates but yes OwnTracks needs to be active and in the foreground. It really does not work otherwise unless i setup regions on the app. also, i was able to get the steps counter up and running, but again it needs to be in the foreground or it will never update on HA. really useless IMO.
Are you saying that you have Owntracks in the background responding when it feels like doing so. If that is case are you sure it’s the automation triggering it or just Owntracks doing its thing. To be sure put it in manual mode and see if it responds. Mine will respond in manual mode when I send a reportLocation CMD but again app needs to be foreground and open etc.
Before the only time it was working was when I called the script and I had OwnTracks running in the foreground at the same time the script was called. Now, when i call the script and OwnTracks is running in the background, it will report my steps as soon as i switch the OwnTracks app to the foreground. Also, if it is running in the background, I can confirm without a doubt that when OwnTracks “wakes up” it reports the steps as well.I just don’t know the “wake” interval for the app.
Yes but again this relies on having Owntracks open and on the foreground. As far as I have tested it does nothing until it becomes the foreground app and you’ve confirmed that. It’s almost kind of pointless, or at least for my use it is. If it responded whilst in the background it would have been very useful.