Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for Local Push #539

Merged
merged 4 commits into from
Jun 20, 2021
Merged

Documentation for Local Push #539

merged 4 commits into from
Jun 20, 2021

Conversation

zacwest
Copy link
Member

@zacwest zacwest commented Jun 7, 2021

No description provided.

Copy link
Member

@TomBrien TomBrien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From me this is good to go when you decide on local vs direct

zacwest added a commit to home-assistant/iOS that referenced this pull request Jun 8, 2021
Refs #1382 and home-assistant/core#50750.

## Summary
Uses (and requires) the core-2021.6 local push handling to subscribe to notification calls and show notifications without going through the Apple Push Notification Service.

## Screenshots
| Light | Dark |
| -- | -- |
| <img width="712" alt="Screen Shot 2021-06-06 at 18 08 59" src="https://user-images.githubusercontent.com/74188/120946730-57a8d600-c6f2-11eb-8dde-b03b42a0a03a.png"> | <img width="712" alt="Screen Shot 2021-06-06 at 18 09 09" src="https://user-images.githubusercontent.com/74188/120946737-5d9eb700-c6f2-11eb-8563-8d9b8d8e075b.png"> |

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#539

## Any other notes
- Only works on macOS for this first round. The iOS implementation will be the same manager, but needs extensions scaffolding that I have to put together separately.
- iOS will also likely have a setting to control this behavior, since it has potential battery implications; macOS doesn't have such concerns.
- Adds tests around the parsing of the raw notification payloads that uses the same tests introduced in home-assistant/mobile-apps-fcm-push#55.
- Shows the state of the local push connectivity in Notifications. With multi-server support, this will probably need to be broken down by server, or moved into the server-specific configurations.

This also sets us up to support encrypted notifications, since we're now able to handle the service call's data without any kind of remote manipulation. Unfortunately Apple declined the entitlement which makes this extremely easy, so we'll still need to handle the "commands are unencrypted" nonsense.
zacwest added a commit to home-assistant/iOS that referenced this pull request Jun 20, 2021
Refs #1570 and home-assistant/core#50750. Fixes #1382.

## Summary
Adds a new app extension to do local push notifications on iOS 14 when connected to internal SSIDs.

## Screenshots
Adds a default-on setting to Internal URL:

| Light | Dark |
| -- | -- |
|  ![Simulator Screen Shot - iPhone 12 Pro - 2021-06-19 at 23 13 04](https://user-images.githubusercontent.com/74188/122664142-5cd73d80-d154-11eb-8378-600f0b82b3e4.png) | ![Simulator Screen Shot - iPhone 12 Pro - 2021-06-19 at 23 13 06](https://user-images.githubusercontent.com/74188/122664145-62cd1e80-d154-11eb-840d-0a0e86255bcb.png) |

## Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#539

## Any other notes
- Updates the "you need always permission" warning in Internal URL editing to be vibrantly red, to really point out its importance.
- Sets the code signing for the app and the push target to 'manual' on device, hopefully for our internal team only. Special entitlements really do not play well with open source. Worth noting that it is not possible to test this feature without being on the HA team since it does not work in simulator (as far as I can tell) and running on-device requires entitlements.
- Moves commands into Shared in a slightly-easier registration mechanism, so we can share them in the local push extension.
@zacwest zacwest merged commit 800040f into master Jun 20, 2021
@zacwest zacwest deleted the local-push branch June 20, 2021 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants