mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
Update notify.html5.markdown to add deprecation warnings (#9019)
* Update notify.html5.markdown * Undo removals, added warning * Update notify.html5.markdown * Typo * Update notify.html5.markdown * Extending browser step warning & fixing link
This commit is contained in:
parent
6e4d4e0757
commit
246e7438f8
@ -18,6 +18,10 @@ The `html5` notification platform enables you to receive push notifications to C
|
||||
HTML5 push notifications **do not** work on iOS.
|
||||
</p>
|
||||
|
||||
<p class='note warning'>
|
||||
The GCM configuration option is deprecated and will stop working in April 2019, see [https://developers.google.com/cloud-messaging/faq](https://developers.google.com/cloud-messaging/faq). If you are installing this platform for the first time, follow the VAPID configuration steps. To migrate your current installation from GCM to VAPID configuration, follow the instructions below. You can skip the first 3 steps and continue in step 4 with your existing project. You will also need to [re-enable the notifications in your browser](#setting-up-your-browser).
|
||||
</p>
|
||||
|
||||
## {% linkable_title Configuration %}
|
||||
|
||||
To enable this platform, add the following lines to your `configuration.yaml` file:
|
||||
@ -35,7 +39,8 @@ notify:
|
||||
Or
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
# Example configuration.yaml entry.
|
||||
# Warning: this option will be deprecated soon!
|
||||
notify:
|
||||
- platform: html5
|
||||
name: NOTIFIER_NAME
|
||||
@ -49,52 +54,52 @@ name:
|
||||
required: false
|
||||
type: string
|
||||
default: notify
|
||||
vapid_pub_key:
|
||||
description: The VAPID public key generated by Google (this is the key that is immediately visible under "webpush certificates").
|
||||
required: true
|
||||
type: string
|
||||
vapid_prv_key:
|
||||
description: The VAPID private key generated by Google.
|
||||
required: true
|
||||
type: string
|
||||
vapid_email:
|
||||
description: The e-mail account associated with your Firebase project.
|
||||
required: true
|
||||
type: string
|
||||
gcm_api_key:
|
||||
description: The API Server key provided to you by Google for Google Cloud Messaging (GCM). Required to push to Chrome.
|
||||
description: The API Server key provided to you by Google for Google Cloud Messaging (GCM).
|
||||
required: true
|
||||
type: string
|
||||
gcm_sender_id:
|
||||
description: The sender ID provided to you by Google for Google Cloud Messaging (GCM). Required to push to Chrome.
|
||||
description: The sender ID provided to you by Google for Google Cloud Messaging (GCM).
|
||||
required: true
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
### {% linkable_title Getting ready for Chrome %}
|
||||
|
||||
1. Make sure you can access your Home Assistant installation from outside your network over HTTPS ([see docs](/docs/configuration/remote/)).
|
||||
2. Create a new project at [https://console.cloud.google.com/home/dashboard](https://console.cloud.google.com/home/dashboard).
|
||||
3. Go to [https://console.cloud.google.com/apis/credentials/domainverification](https://console.cloud.google.com/apis/credentials/domainverification) and verify your domain via Google Webmaster Central / Search Console - [instructions](#verify-your-domain).
|
||||
4. With the domain verified, go to [https://console.firebase.google.com](https://console.firebase.google.com), select import Google project and select the project you created.
|
||||
5. Then, click the cogwheel on top left and select "Project settings".
|
||||
6. Select 'Cloud Messaging' tab.
|
||||
7. If using VAPID: Generate a new key pair under the Web configuration listing at the bottom of the page. To view the private key click the three dots to the right and 'Show private key'.
|
||||
8. If using GCM: Listed beneath Project Credentials will be your 152 character 'Server Key' and 12 digit ID 'Sender ID' you need for configuring this component. Notice: GCM is deprecated and will stop working in April 2019, see https://developers.google.com/cloud-messaging/faq
|
||||
|
||||
#### {% linkable_title Verify your domain %}
|
||||
|
||||
Follow these steps to verify domain ownership with Google Webmaster Central/Search Console:
|
||||
1. Enter your domain and add `/local` at the end, e.g., `https://example.com:8123/local`
|
||||
2. Select HTML file verification and download the google*.html file.
|
||||
2. Create a directory named `www` in your Home Assistant configuration directory (`/config/` share from Samba add-on).
|
||||
3. Place the downloaded `google*.html` file in the `www` directory.
|
||||
4. RESTART Home Assistant. **This is important!**
|
||||
5. Verify the file can be accessed in the browser, e.g., **https://example.com:8123/local/google123456789.html** (change filename). You should see a plain text message saying "google-site-verification: ...". If you see "404: Not Found" or something else, retry the above steps.
|
||||
6. Go back to Google Webmaster Central/Search Console and proceed with the verification.
|
||||
|
||||
### {% linkable_title Requirements %}
|
||||
|
||||
The `html5` platform can only function if all of the following requirements are met:
|
||||
|
||||
* You are using Chrome and/or Firefox on any desktop platform, ChromeOS or Android.
|
||||
* Your Home Assistant instance is exposed to the world.
|
||||
* Your Home Assistant instance is accessible from outside your network over HTTPS.
|
||||
* If using a proxy, HTTP basic authentication must be off for registering or unregistering for push notifications. It can be re-enabled afterwards.
|
||||
* If you don't run Hass.io: `pywebpush` must be installed. `libffi-dev`, `libpython-dev` and `libssl-dev` must be installed prior to `pywebpush` (i.e. `pywebpush` probably won't automatically install).
|
||||
* You have configured SSL/TLS for your Home Assistant. It doesn't need to be configured in Home Assistant though, e.g., you can be running [NGINX](/ecosystem/nginx/) in front of Home Assistant and this will still work. The certificate must be trustworthy (i.e. not self signed).
|
||||
* You are willing to accept the notification permission in your browser.
|
||||
|
||||
### {% linkable_title Setting up %}
|
||||
### {% linkable_title Configuring the platform %}
|
||||
|
||||
Assuming you have already added the platform to your configuration:
|
||||
1. Make sure you can access your Home Assistant installation from outside your network over HTTPS ([see docs](/docs/configuration/remote/)).
|
||||
2. Create a new project at [https://console.cloud.google.com/home/dashboard](https://console.cloud.google.com/home/dashboard).
|
||||
3. Go to [https://console.cloud.google.com/apis/credentials/domainverification](https://console.cloud.google.com/apis/credentials/domainverification) and verify your domain via Google Webmaster Central / Search Console - [see below](#verify-your-domain).
|
||||
4. With the domain verified, go to [https://console.firebase.google.com](https://console.firebase.google.com), select import Google project and select the project you created.
|
||||
5. Then, click the cogwheel on top left and select "Project settings".
|
||||
6. Select 'Cloud Messaging' tab.
|
||||
7. Generate a new key pair under the Web configuration listing at the bottom of the page. To view the private key click the three dots to the right and 'Show private key'.
|
||||
|
||||
### {% linkable_title Setting up your browser %}
|
||||
|
||||
Assuming you have already configured the platform:
|
||||
|
||||
1. Open Home Assistant in Chrome or Firefox.
|
||||
2. Load profile page by clicking on the badge next to the Home Assistant title in the sidebar. Assuming you have met all the [requirements](#requirements) above then you should see a new slider for Push Notifications. If the slider is greyed out, ensure you are viewing Home Assistant via its external HTTPS address. If the slider is not visible, ensure you are not in the user configuration (Sidebar, Configuration, Users, View User).
|
||||
@ -313,3 +318,15 @@ If you still have the problem, even with mentioned rule, try to add this code:
|
||||
proxy_set_header Authorization $http_authorization;
|
||||
proxy_pass_header Authorization;
|
||||
```
|
||||
|
||||
#### {% linkable_title Verify your domain %}
|
||||
|
||||
If you need to verify domain ownership with Google Webmaster Central/Search Console while configuring this component, follow these steps:
|
||||
|
||||
1. Enter your domain and add `/local` at the end, e.g., `https://example.com:8123/local`
|
||||
2. Select HTML file verification and download the google*.html file.
|
||||
2. Create a directory named `www` in your Home Assistant configuration directory (`/config/` share from Samba add-on).
|
||||
3. Place the downloaded `google*.html` file in the `www` directory.
|
||||
4. RESTART Home Assistant. **This is important!**
|
||||
5. Verify the file can be accessed in the browser, e.g., **https://example.com:8123/local/google123456789.html** (change filename). You should see a plain text message saying "google-site-verification: ...". If you see "404: Not Found" or something else, retry the above steps.
|
||||
6. Go back to Google Webmaster Central/Search Console and proceed with the verification.
|
||||
|
Loading…
x
Reference in New Issue
Block a user