Request location update, does it ever work?

So, i am trying to get an updated location status from iOS devices when HASS restarts.

I have the following notification setup to run 1 minute after the system restarts. I do see the notification come into my device showing the text specified, but no location update ever reaches HASS from any of mine or my wife devices.

#get updated locations from iphones
update_locations:
  sequence:
  - delay:
      minutes: 1
  - service: notify.ios_###_6_plus
    data:
      message: "request_location_updates"
  - service: notify.ios_###_iphone
    data:
      message: "request_location_updates"

So, should i be expecting this to work ever, or is it too reliable it’s not worth relying on in this way?

Thanks

Gareth

Never seemed to work for me either, did a few tests with it.

I’ve been wondering this for awhile as well. This answer doesn’t help much either https://github.com/owntracks/ios/issues/377

Finally got around to trying this out on my setup. I have my script formatted just like yours @gazzer82 and I get the following error in my logs:

16-11-21 17:27:52 homeassistant.components.notify.ios: No target parameter was found in the notification payload.

So it seems like it is looking for a target field, but I thought that putting the device name after notify.ios did exactly that. I’m guessing it is a formatting issue.

I have been planning to modify sosumi so that it will provide my ios location to mqtt by simulation owntrack. Sosumi has worked great for me for many years providing location to my webpages and Alexa.

https://github.com/tylerhall/sosumi

Try dropping the “s” it now works for me.

message: “request_location_update”

My script for this is as follows:

alias: 'Refresh Devices'
sequence:
  - service: mqtt.publish
    data:
      topic: "owntracks/Bob/S7/cmd"
      payload_template: '{"_type":"cmd","action":"reportLocation"}'
  - service: notify.ios_iphoneHA
    data:
      message: "request_location_update"

The refresh for my OwnTracks device works just fine, but the iOS one does not. In my logs I get the following error:

homeassistant.components.notify.ios: No target parameter was found in the notification payload.

I assume I’m missing something stupid here but I’m not sure what it is.

are you using the custom_component or the built in ios notify component?

Do any of your notifications work?

Finally got it working. Turns out my push notification token had expired or changed since I last tested iOS notifications. I am now able to force a location update when needed.

Thanks!

Just noticed in the original post that it was sending request_location_updates. The server only supported request_location_update (singular) until just now when I made it support either.

So I still need to with ios app 2.0?

Need? No. But you can still use it regardless. Hasn’t changed.