How to use new iOS app features?

Did you find a fix for this? As I am experience the same issue

Not yet. I still donā€™t have an ios.conf file and still see those errors in the log. However, I am getting notifications ā€¦ I just havenā€™t figure out what they are yet and how to customize them.

Iā€™m getting ā€œgenericā€ notifications on my iPhone from Home Assistant:

Location change
Current location delivery triggered via background fetch

or

Location change
Home exited

But I still see this in the log and have no ios.conf file:

17-04-28 21:46:49 ERROR (Thread-11) [homeassistant.components.notify.ios] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information
17-04-28 21:46:49 ERROR (MainThread) [homeassistant.components.notify] Failed to initialize notification service ios

I tried adding this to my configuration.yaml:

notify:
  - platform: ios
    name: iOSApp
    target: '<id>'

But that didnā€™t seem to change anything. Why wonā€™t the notification module load for me? Iā€™m guessing itā€™s because of the lack of the ios.conf file? Whatā€™s the format for this so maybe I can create it manually?

Thanks.

So out of the box I think everyone at a minimum might want to do home not_home tracking with the app, here is what must be configured as a minimum and is NOT spelled out in the docs so wellā€¦

Home must be defined with GPS latitude: and longitude: while this can be set via zones by default it can be set in the homeassistant object in the configuration.yaml file. You can use google maps to get the coordinates of anything you want.

configuration.yaml

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 37.4219999
  longitude: -122.0862515

Next you should make sure your http component is setup so that discovery works correctly, I will assume you have made your home assistant internally and externally accessible and that you have a internally and externally working friendly name for it via dyndns or something else (assumes your router supports loopback), I also assume you have setup https. Home assistant will advertise the base_url for discovery, otherwise it will use the current local IP which isnā€™t that useful for the iOS app unless you keep a vpn open to home all the time. You should also look at the other http component options for password attempts ETC for your own config, these are just the two minimums I would suggest configuring.

configuration.yaml

http:
  api_password: [your password here]
  base_url: https://myhost.dyndns.org

Donā€™t forget to enable the ios: component.

configuration.yaml

ios:

Save and restart home-assistant to ensure the zones and other components load.

Now open the ios app while connected to wifi on your home network, it should discover the server, tap on the discovered server and it should fill in the URL field, put your API password in the Password Field and Save.

Now scroll down and set the Device ID, this is what will appear in known_devices.yaml. You can match this to an existing device discovered via another device tracker if you want to combine the updates however I will assume you have non. Lets call it ios_bob, scoll up and save again.

Lastly, tap on location, and follow the prompt to enable, if it freezes, delete the app and start the app setup again. Then Tap notification and follow the prompt to enableā€¦ You donā€™t need to turn anything else on. Scroll up and hit done.

Now open known_devices.yaml and look for the device, in our case ios_bob, for me it was not enabled by default.

known_devices.yaml

ios_bob:
  hide_if_away: false
  name: My iPhone
  track: true

If you had to change track from false to true, save and restart home assistant.

After home assistant starts, open the ios app and tap the force location update button (bottom left on the main screen).

At this point going to the developer states screen in home assistant, you should now see device_tracker.ios_bob with its attributes and you are done.

Note there is a bug for the sensor nameā€¦ The device tracker uses the custom Device ID however the sensor that gets created for battery will use the device name there is an open bug on this https://github.com/home-assistant/home-assistant-iOS/issues/30 .

6 Likes

Those instructions are good, though Iā€™ve already done all of that and have basic home/not home tracking working. What Iā€™m trying to get working is push notifications.

Well that is next on my list of things to figure outā€¦ I suspect much like the basic setup and location information there are bits and pieces in the docs that have gaps to fill.

Iā€™m on version 0.43.2 of HASS and the latest version for the app and Iā€™ve noticed in the last few days that when I am off WiFi there arenā€™t any updates but as soon as connect to a WiFi connection I start getting updates. Is this a setting that has changed or did I change something by mistake?

iOS low power / background location updates are triggered by major movement events or changes such as changes in cellphone towers or changing wifi networks.

Just as a followup after ensuring the base platform was working correctly I didnā€™t have any issue with basic notifications.

First make sure you have notify in your configuration.yaml and you have restarted since making any changes.

notify:

You can verify the device name / that the device has registered.

  • Go to the Developer Tools ->Services.
  • Select Domain: Notify
  • Look for your device in the list under Service, it should appear as ios_[device ID you set in iOS App]
  • It should pre-populate a test message for you that you can then test send to the device.

In your automation you action will look fairly similar to other notification types.

action:
  - service: notify.ios_[device ID you set in iOS App]
    data:
      title: Title text
      message: Message body

Edit: to add notify a prerequisite

1 Like

ā€œnotifyā€ doesnā€™t appear as a domain under developer tools for me. And I still get these messages in the log:

2017-05-08 15:07:55 ERROR (Thread-4) [homeassistant.components.notify.ios] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information
2017-05-08 15:07:55 ERROR (MainThread) [homeassistant.components.notify] Failed to initialize notification service ios

And now Iā€™ve noticed the tracker doesnā€™t seem to be working. All of my devices show ā€œhomeā€ even though none of them are home.

I ā€œSuspectā€ that you need to go into your known_devices.yaml and make sure the device ā€œas you named the device ID in the appā€ is set track: true

Edit: Also go into the APP and hit save settings again after that to ensure it registersā€¦ If I recall correctly NONE of the iOS device sensors appear until the device is tracked in known_devices.yaml .

Yes, the Device ID in the app matches known_devices.yaml. Basic home/not home tracking used to work, even after I started playing around with the iOS notification stuff. Maybe I need to start over ā€¦

Did you go back into the iOS app and hit SAVE again and get all three checkmarks? Right after that happens you should see some sensors appear for the device in the developer tools confirming the device is being tracked

Got the checkmarks in the app, and the devices appear under States under the Developer Tools. But I still donā€™t have ā€œNotifyā€ as a Domain under Services and still have the ā€œfailed to initialize notification service iosā€ in my log.

Thanks for sticking in there with me, BLinkyLights ā€¦ really not sure whatā€™s amiss here.

Do you have notify enabled in your configuration.yaml?

At least an empty block would be needed for the service to exist. I forgot as I have other notification services.

notify:

Edited my earlier post as well.

Yep, notify: block is there.

I had the same issue as windracer, however, when I added the port number to the base_url it started to register

Since Iā€™m running via https, based on your suggestion I tried adding 443 to my base_url but that didnā€™t do anything. Still seeing in the log:

> Aug 07 08:11:28 nucleus hass[17161]: ERROR:homeassistant.components.notify.ios:The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information
> Aug 07 08:11:28 nucleus hass[17161]: ERROR:homeassistant.components.notify:Failed to initialize notification service ios

Hi all.

Very new to home assistant, just having some issues logging in to the IOS app.

Iā€™m using the following to log in:
URL: http://raspberrypiipadress:8123
password: my password

Note that i donā€™t need to access outside of my local network (yet)

I click save and nothing seems to happen!

Any help greatly appreciated.

Cheers.

Try putting this in your configuration.yaml file:
iOS:

That might do the trick. For me the app then recognises an active home-assistant instance on your network and then it is just a matter of clicking ok.

What youā€™re doing should work though. Is the same link working from your browser? Maybe copy the link directly from your browser to make sure itā€™s exactly the same?

1 Like