Home Assistant for iOS 2.0 Beta Testing

Hi @robbiet480
I’m afraid this doesn’t appear to be resolved.
It has worked in the past and I’ve not changed my config except for the addition of mobile_app: !include iOS.yaml
I’m on 0.91.3 and 0.40b, I can arm the alarm, the disarm action doesn’t appear to do anything.
Here are both automations:

- alias: Alarm - Arm Alarm from iOS Notification
  initial_state: true
  trigger:
    # iOS 1.5 App Support
    - platform: event
      event_type: ios.notification_action_fired
      event_data:
        actionName: ARM_ALARM
    # iOS 2.0 App Support
    - platform: event
      event_type: ios.action_fired
      event_data:
        actionName: ARM_ALARM
  action:
    - service: alarm_control_panel.alarm_arm_away
      entity_id: alarm_control_panel.alarm
      data:
        code: !secret alarm_code

- alias: Alarm - DisArm Alarm from iOS Notification
  initial_state: true
  trigger:
    # iOS 1.5 App Support
    - platform: event
      event_type: ios.notification_action_fired
      event_data:
        actionName: DISARM_ALARM
    # iOS 2.0 App Support
    - platform: event
      event_type: ios.action_fired
      event_data:
        actionName: DISARM_ALARM
  action:
    - service: alarm_control_panel.alarm_disarm
      entity_id: alarm_control_panel.alarm
      data:
        code: !secret alarm_code

Here are HA logs when mobile_app is set to debug:

2019-04-12 10:01:44 DEBUG (MainThread) [homeassistant.components.mobile_app.helpers] Successfully decrypted mobile_app payload
2019-04-12 10:01:44 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type fire_event: {'event_type': 'ios.action_fired', 'event_data': {'actionName': 'ARM_ALARM', 'actionID': '1DB38935-7AAB-45C0-802D-YYYY95DC9CE2', 'sourceDeviceName': "Lolo's iPhone", 'triggerSource': 'watch', 'sourceDeviceID': 'lolos_iphone_beta', 'sourceDevicePermanentID': '8582D724-xxxx-43A1-97DC-5F0F79F44CF0'}}
2019-04-12 10:01:47 DEBUG (MainThread) [homeassistant.components.mobile_app.helpers] Successfully decrypted mobile_app payload
2019-04-12 10:01:47 DEBUG (MainThread) [homeassistant.components.mobile_app.webhook] Received webhook payload for type fire_event: {'event_data': {'actionID': '7A3251F1-FBEC-40CD-8011-ZZZZDCD808C3', 'triggerSource': 'watch', 'sourceDevicePermanentID': '8582D724-xxxx-43A1-97DC-5F0F79F44CF0', 'sourceDeviceName': "Lolo's iPhone", 'sourceDeviceID': 'lolos_iphone_beta', 'actionName': 'DISARM_ALARM '}, 'event_type': 'ios.action_fired'}

Only thing I can see is the order of the JSON values which I would have thought would not have any impact?

[EDIT]
the actionName for teh DISARM_ALARM has a trailing space, probably from a previous time when I created it, as the current action doesn’t have the trailing space
Editing actions is an issue i’ve had since the first release of the beta. I can add actions, remove actions, and can edit them in the app, but can only add actions to the app. It seems editing or deleting them does not get reflected in the watch app. I need to delete both apps and restart from scratch…

Usually in middle of zone… I’ve changed my home zone radius from 75m to 200m and it still hits outside at least once a day. I’m also confused because when it does occur it looks as if the accuracy is horrible (think the default accuracy acceptance range for a point is 200m in the app) it still publishes as valid. The acc. of the screenshot above is listed at ~6000m but I still get an exit/entry?

Hi. My NGINX configuration is for something like 6 subdomains.
I run all my system on an Unraid server with a custom docker from Linuxserver.io maybe it’s a bug in there custom container or at my config or networking rules.

I been try so many things to fix this error. And this one is the only that fix it. I generally its 90% as the NGINX config on Home-Assistant website.
My config setup listed here: https://github.com/VirtualL/HomeAssistant-Config

I you want to get deep into it, PM Me and I will send you all my Nginx config files including SSL /PROXY CONFIG
Thank you for all the great work!

That GPS accuracy sounds pretty terrible. I’m currently at work sat in a metal box surrounded by tall buildings and I am getting 65 m. To me it sounds like a hardware issue, how do Google Maps etc. perform?

@pplucky I get this issue too. I even tried an entirely clean version of HASSIO.

When I was was writing the iCloud3 device tracker, I kept running into the GPS wandering problem that was causing zone exits which started automations in the middle of the night. The problem, from what I could tell, was caused by Background Fetch notifications that contained old location data or data with poor GPS accuracy that was then processed by several components in HA that just assumed that all of the data is accurate.

A very detailed description of how HA processes these notifications is here.

The solution to eliminating this problem is to not trigger automations based on device state changes but to trigger them on zone changes that are not tied directly to HA. iCloud3 discards notifications that are old or have poor GPS accuracy and puts the device back into the zone. It also creates ‘zone’ and ‘last_zone’ template sensors That are only updated by iCloud3 and are not effected by incorrect device state changes,

ICloud3 is tightly integrated with the ios app, minimizes battery usage, uses the Waze Route Calculator service to determine drive times to home, creates Dynamic Stationary Zones, eliminates the need for other location components (Owntracks, Nmap, etc) and provides a lot of other features.

Check out iCloud3 here.

Is this what I should be putting in !secrets in place of the device ID?

If not, where should I be using it?

Desperately trying to get push notifications running again.

I have mobile_app: in my config.

You should only need to load mobile_app:. Then in you should see a service in the form of notify.mobile_app_DEVICE_NAME_SET_IN_iOS. It can take couple of restarts to get it to show. I found that losing the component followed by a HA restart, then connecting with the iOS app and pushing location followed by a final restart of HA works nicely.

This will cease to be true after build 41, when the service will switch to notify.mobile_app_DEVICE_ID_SET_IN_APP

1 Like

I have this notify.mobile_app_ash_x and after several restarts the app is still showing that the component is not loaded.

The appstore (1.5) version is working fine though. I understand they can exist side by side.

Well, one more restart did it. Component now loaded.

Do I have to replace all of my old ios notification service calls with the new one then?

Brilliant. Yes you do, bit of short-term pain for long term gain, as is beta life. One thing to note is that sounds are not played by default anymore and you need to include them in the payload. For example I use this in one of my automations:

      - service: notify.mobile_app_toms_iphone
        data:
          title: "Washing Machine"
          message: "The washing machine has now finished"
          data: 
            push: 
              sound: default

Thank you. That fixed it.

Are there sound options? What is the default?

Default is what I think of as the normal notification sounds, same as previous app defaulted to and messages uses by default. There are more, there is a list here:

So I have all my notifications set up on the new beta and set up the sounds and all works great…for a short period of time. Notifications, for a reason I can’t figure out stop working randomly. I’ll get an error in the log that says “Requested Entity not found components/mobile_app/notify.py”. When I go into the dev panel it still shows my mobile app in the notify list but won’t display any test notifications until I go into settings and “push configuration settings from server”. Why does the config settings keep changing randomly requiring it to be imported again? Anyone else experiencing this? I’ve uninstalled and reinstalled, rebooted and nothing seems to fix it. Any suggestions? Thanks

I am getting the same as you. Spent over 2 hours this morning getting notifications to work and then tonight when lights and fireplace turn on ALL notifications that were working have now stopped and throw the same error as you.

Glad you posted this as I was starting to tweak my settings again trying to make them work.

I just tried a manual alert to my iPad and that works OK but not to my phone

{ "message": "ALARM TEST!", "data": { "push": { "category": "alarm", "sound": { "critical": 1, "name": "default", "volume": 1.0 } } } }

**** UPDATE ****
Managed to get notifications working by deleting the iphone integration in HA, reset the config on the beta app, logging back in on the app then restarting HA.

I’ve done that a few times but I’ll try again. Let me know if it continues to work or fails again

Have you pressed the “import push configuration from server” in the App?

Yes, that’s how I always get notifications working again. Push that and they instantly start working again for a few hours

1 Like

I had it again today. Imported the server again and after force closing the app they started working again. Have got all the old style iOS notifications from a backup so may remove these if they keep causing an issue and revert back to the old iOS ones for now.

If I use my WireGuard VPN I get these error messages:

image

If I ignor them and say ok and „fertig / ready“ I am able to connect. If I close the app full and try it again I am getting the same error.

If I using the App and at home without VPN it works perfect.

Home Assistant 91.1
App 2.0.0 (40)
Home Assistant in Docker with haproxy as Reverse proxy.