Home Assistant Companion Apps: New and Upcoming Features

Hi, it’s been a while since we let you know about all the great things you can do with the Home Assistant Companion Apps for Android and iOS, so let’s rectify that now as there are so many exciting updates. Before we get started on that though, iOS users should take a moment to read this blog post which has some important information about a small change coming up.

A note on privacy

Currently we use Google’s Firebase notification service for sending notifications to your device and also for tracking crashes. We did this because of simplicity, due to how notifications work on iOS we can’t use just any server to send notifications, in fact there is a pretty narrow choice. Using Firebase allowed use to provide notifications at no cost to you! However, many people were uncomfortable about this and would prefer an app that did not rely on Google’s servers. Well we hear you and we are actively looking at moving to other providers. While we have not completed this work yet, we just wanted to let you know it is something that is being actively developed and hopefully we will have more news very soon.

Android minimal app

On a related note, we are delighted to say we now offer a way to install a minimal version of the Android app that is completely free of any reliance on Google. This version of the app does not have location tracking or notifications. We hope that by providing this version of the app more developers will be excited about contributing to the app in general. For now, you can find the APKs in the GitHub Actions page from each pull request.

What’s New(ish)

The short answer is lots! The Android and iOS apps are developed by separate teams so while the features are similar, they are not identical and do not follow a common road map. Android changes are up next, click here to jump to the iOS update

Android

Notification Improvements

Throughout the past few releases Android notifications were greatly improved with new features and fixes.

Starting in 1.8.0 we enhanced our image notifications to allow for not only a relative path (i.e. storing in your www folder) but you can also request a snapshot using the Camera Proxy API. All authentication is handled via the app so you don’t need to worry about it. You can also use click action and actionable notifications to navigate to a specific lovelace view.

From 1.9.0 you can now create and remove notification channels on the fly. This is helpful so you can create channels that can override your do not disturb settings, specifically for notifications like the alarm while notifications for your laundry can continue to let you be undisturbed.

In 1.10.0 we further enhanced our notifications to allow for many new options. Users can now change the LED Color, vibration pattern and importance of a message. These options can also be used with a channel to help set defaults to allow you to further distinguish between notifications. You can now group your notifications to help declutter the notification pull down. Persistent notifications were also introduced so you can’t simply swipe away those important notifications, you can pair this with the sticky property so the notification does not disappear. The message now allows for HTML formatting so you can highlight the important parts. Users can also supply an icon much like they can with an image. For the unimportant notifications you can set a timeout so after x amount of seconds the notification is automatically dismissed.

automation:
  - alias: Alarm triggered
    trigger:
      platform: state
      entity_id: alarm_control_panel.home
      to: triggered
    action:
      service: notify.mobile_app_pixel_4_xl
      data:
        message: "Front alarm <b>triggered</b>"     # some HTML formatting to highlight the alert
        data:
          channel: Alarm             # creates a new channel called Alarm that you can manage from your device
          importance: high           # set the channel importance to high
          ledColor: red              # make the LED flash red for this notification
          vibrationPattern: "100,30,100,30,100,30,200,30,200,30,200,30,100,30,100,30,100"     # SOS vibration pattern
          persistent: true           # set to persistent
          sticky: true               # make sure it doesn't dismiss if selected
          clickAction: /lovelace/alarm    # navigate user to the lovelace alarm view
          icon: /local/alarm.jpg     # relative path to the icon
          color: red                 # set the color of the notification to red
          group: alarm               # the group name to group together notifications
          tag: alarm                 # tag is required in order to remove the persistent notification

In the above automation example a new channel with the name Alarm will be created with a default setting for vibration, LED and importance. This notification will also be persistent and part of a group and tag along with an icon amongst other changes.

Sensors

Starting with 1.8.0 we have introduced a new Geocoded sensor that helps translate your GPS location to an actual street address.

Screenshot of the Geocoded Sensor.

The battery level sensor was split in 1.9.0 to include a battery state sensor so you can see when your device is actively charging, not_charging, discharging and full. You can also distinguish whether its wireless, ac or usb. The state now updates immediately upon being plugged in and unplugged to allow for quicker automations.

Biometrics

Biometrics were introduced in 1.9.0 to allow the user to lock down the app when they are not using it. Upon launching the app you will see a lockscreen like below requesting for either your fingerprint or face to unlock the app. You can set this feature up by visiting the App Configuration screen inside the app.

Screenshot of Biometric Unlock.

Additional Improvements

We have also been hard at working making improvements in other areas of the app:

  • Widgets were enhanced to allow you to select from a list of valid and available services along with the ability to add additional data fields that the service may require.
  • In App Configuration the Home Network WiFi SSID option now allows the user to select multiple SSIDs.
  • A Cookie Manager was added to our WebView that will allow you to save cookies from sites that you may use in the webpage card.
  • More descriptive SSL error messages were added to help users resolve local issues they may encounter while setting up the app.
  • Device ID is now sent with the event data for actionable notifications.

iOS

Firstly, we should say a hello to Zac (@zacwest) who has joined the iOS team and contributed a huge amount of code in the last couple of months. In fact, Zac has rewritten much of the underlying code of the app in that time, so while it may look much the same, behind the scenes it’s almost a new app! Some features that are now in the iOS app are:

Stability

Making the app reliable and eliminating bugs was a big focus. You won’t have to pull-to-refresh as often, sensors update more reliably, and editing things like actions and notifications won’t accidentally delete them.

Whether it is to turn on the lights when you get home at night, or send a someone a notification that you’re leaving work and how long the journey should take, we know that this is what a lot of people use the app for the most and we also know the performance has not been 100 % and that changes in recent versions of iOS seem to have made this work. There have been a huge number of changes to work around these issues (unfortunately Apple’s CoreLocation framework is something of a black box), we now sanity check the location data before sending it to Home Assistant, checking if the accuracy is acceptable or if an update from a minute ago has better accuracy. We also try and get a new update when accuracy is bad. While we still use significant location changes (such as changing cell tower) to wake the app up from the background, we now automatically discard the data they provide and attempt to get a higher accuracy GPS location.

Empowering Notifications

Notifications are some of the more powerful ways you can interact with the app, and they are now even more powerful. Camera notifications will now stream via HTTP Live Streaming (HLS) instead of the older MJPEG standard when you have the stream integration enabled, giving you a more live experience; camera notifications also show up in the right aspect ratio; you can add per-action URLs that should be launched for each action of a notification; relative URLs (like /lovelace-tacos/0) will now open within the app without kicking you out to Safari.

Screenshot of example triggers and service calls for notifications.

More frequent sensor updates while using the app

A lot of people have asked for the sensors to be updated more frequently. The problem we have is while the app is in the background it is asleep as part of iOS’s efforts to preserve battery. However, while you’re using the app it should be able to send data frequently. You can now set a desired frequency of sensor updates while you have the app open. This can be as slow as every hour or as fast as every 20 seconds! Hopefully this will be a huge improvement for people using iPads as wall-mounted kiosks.

No more duplicate integrations

Previously when you removed and reinstalled the app you would get a new ..._2 integration in Home Assistant along with a new set of sensors like sensor.freds_iphone_2. This was a pain! Especially for our amazing beta testers who often went through the app’s onboarding process several times in a day to check for bugs (THANK YOU!). Now the app registers its unique ID with Home Assistant, this means in most cases when you reinstall or reset up the app it should just pick and use the old integration and entities.

Usability

Another avenue of improvement is making things a bit easier. You’ll now find example triggers and service calls when configuring notification categories and actions within the app; theme color choices should always come through; you can adjust things like the zoom factor of the pages or how often sensors update if the app remains open; and more! You will definitely want to dig into the releases or play around in the app’s settings.

A look ahead at iOS 14

Coming to iOS 14 is Widgets, and no doubt there’s some huge potential here. A good analogy for what they can do is to think of them as Apple Watch complications; relatively static displays that can be updated with a multitude of data. One thing we’d love is to get an idea of the information and displays you’re interested in seeing here as Widgets get built out over the next few months. Please let us know any ideas you have on this thread.

iOS 14 is also introducing Local Push Connectivity, which adds support for push notifications on your local network that do not require a trip to the cloud. This, like Critical Alerts, requires explicit approval from Apple, but we’re hopeful about improving the experience with your boats and RVs!

That’s it, almost

Wow, thanks for reading all the way down here! Everything you’ve read about wouldn’t be possible without a very dedicated team of volunteers. In addition to the highlights above, we’ve also fixed a good amount of bugs and made other improvements across the board. Thanks goes to JBassett, KBerstene, chriss158, timmmeeeh, timmoo001, craftykoala, jeroenseegers, yoxjames, and neopilou on the Android side and robbiet480 and zacwest on iOS.

Two last things, firstly a reminder that you can find our complete docs for the apps on their own site. Secondly, as you’re the kind of person that reads whole blog posts (well done again!) you might be the perfect beta tester for our apps, if you think you could help out, you can sign up for the Android app here or the iOS app here.


This is a companion discussion topic for the original entry at https://www.home-assistant.io/blog/2020/08/05/mobile-apps-new-features/
16 Likes

Awesome work y’all!! Thank you!!!

2 Likes

Thanks team!

Can anyone tell me why my android companion app (installed from Play Store) claims to be version 2.0.0.235-full?

So the actual app version is 2.0.0 the 235 is the actual build number and full is because you are not using the minimal version but the full which is only available via google play.

if you are on the beta builds you would also have the commit hash as part of the version.

well that is a bit confusing because the blog post only talks about up to 1.10 (unless me eyes deceive me).

Yea I had some updates to add to the minimal portion. We actually had another release cut today for 2.1.0 so I added that note here: https://github.com/home-assistant/home-assistant.io/pull/14172 I knew I forgot to mention the version. This is the biggest change in version 2.0, version 2.1 contains a new Entity State widget :slight_smile:

1 Like

what about location on iOS. it’s turned on and the app has access to it, but it always says at home even if i’m away from home

iOS beta isn’t accepting new testers. :cry:

1 Like

It will be soon once the move to nabu-casa is finished.

Check the entities and devices in the integration are working and installed and it’s not just restoring an old state…

They are installed, but how can i test they are working.
When i leave home the just keep on ‘home’ and do not change to ‘not_home’ as they do on the Android phone entitleis

1 Like

if you go to the integration page and check the entities no red circles etc?
mine are working perfectly.

Thanks for all the improvements!!

same here, hopefully they open it back up soon

Apple are being nagged about this, there’s a pile of cool stuff in the works that needs testing. Unfortunately Apple have noticed they’re a little bit bigger than us and are going to take their sweet time.

I have no red circles.
Under integrations i have 3 mobil apps.
One for Samsung, one for iphone, and one for iPad.
The iPhone always stands to be at home even if it is far from home .

Perhaps try resetting the app and the whole mobile app setup according to the manual… so far as I know its supposed to work and does for me…

Does this section relate only to iOS? I’m sure you already know this, bit on Android, everything must go via firebase cloud messaging. There is no other choice

However, many people were uncomfortable about this and would prefer an app that did not rely on Google’s servers.

Please fix the link at the end of the blog post…

The link at the end of the sentence
Two last things, firstly a reminder that you can find our complete docs for the apps on their own site.
points to
https://companion.home-assitant.io/
instead of
https://companion.home-assistant.io/

1 Like

i dont have the line in my config that is written here.


Do i have to do this?

I’d love to use the official HA Android mobile app. Unfortunately I’m not the typical guy who switches smartphones every half year or so but use them for 5–10 years. Google Play Store says the app isn’t compatible with any of my devices. (It probably requires a newer Android version.)

Anyway, keep it up. I think it’s a good move to offer Android/IOS apps to integrate with HA.