HTML5: step "Getting ready for Chrome", pls help!

Hi,

I can see that there is a new instruction Getting ready for Chrome for HTML5 notification.

Go to https://console.cloud.google.com/apis/credentials/domainverification and verify your domain

The problem is that you need to verify your ownership of https://xxxxxxxxx.duckdns.org/ and there are several options, e.g. “you can upload an html-file to your server”, so it will be something like https://xxxxxxxxx.duckdns.org/googledjdk5265365366xxx.
Or you can add html tag in “meta name” etc.
Could someone explain how to do it?

Could someone help me with my question above, please? :confused:

You should make that html file available on the system on which you run home assistant. So it would be, usually, in the folder homeassistant/components/frontend/www_static if you set up duckdns correctly the file would then be reachable via xxx.duckdns.go/htmfile.html

Thank you, @fversteegen

Unfortunately, it doesn’t work.

When you go to https://xxxxxxxxx.duckdns.org/googledjdk5265365366xxx do you see the html file? And if you locally go to IPadress:port/googledjdk5265365366xxx do you see the html then?

I cannot see the file if I use https://xxxxxxxxx.duckdns.org/googledjdk526 or if I use my local ip

404: Not Found

@fversteegen, does it work for you?

I’ve temporarily solved the issue on domain verification by adding the meta tag in \Python35-32\Lib\site-packages\homeassistant\components\frontend\templates\index.html however, I don’t think that it is a good solution.

Were you able to get this working end to end? I’ve gotten as far as you have (domain verification through metatag and duckdns) but I could get the notifications slider to activate. I wonder if I used the right gcm/api keys, since the directions were a little unclear and did not match what was available in gcm.

I managed to work it.
Make sure that you use:
„ Firebase Cloud Messaging token“ as gcm_api_key (not the server key!)
„Sender ID“ as gcm_sender_id

Btw, if you are also struggling with the instructions, it would be good if you could contribute to this issue:

Is there a value specifically called Firebase Cloud Messaging token? I see the following:

  • Settings
  • General
    • Project ID
    • Web API Key
  • Cloud Messaging
    • Server Key
    • Server ID
    • Legacy Server Key

Am I missing something? Should I use Cloud Messaging > Server Key and Cloud Messaging > Server ID

Server key is gcm_api_key
Sender ID is gcm_sender_id

Im using Apache proxy so I added a proxy exclusion for the file then an alias to the file which worked fine.

I understand that it is much easier to solve the issue running the proxy, however, I believe that a solution should be implemented in HASS itself.

I agree. The push component should have a property for the Google verification token and expose it via hass ui.

1 Like

Great idea!
Do you know how to suggest it, as an issue on GitHub or as a future request on this forum? It would be very helpful.

If I understood the structure of the code some more I’m sure I could do the work and do a pr for it. Not use to all the open source stuff. I use git daily however lol

Thanks to this thread I was able to get the domain verified in Google by manually editing my index.html

Now, I’m running into a problem where when I try to enable push notifications in my browser (tried both Chrome and FF), I get a “failed to register” error. I’m not seeing anything in home_assistant.log. Does anyone have a suggestion on where to start debugging this? I’m pretty confident that I’ve got the correct keys from firebase, etc.

I’ve got:

  - name: html5
    platform: html5
    gcm_api_key: 'long string of characters'
    gcm_sender_id: 'shorter string of characters'

I’ve tried triggering a notification via the services dev tool and also via a script:

htmlpushtest:
  alias: HTML5 push
  sequence:
    - service: notify.html5
      data: 
        message: "This is a test"

Though, I don’t think it’s my script that’s the issue, but likely something with my config.

I’m using the AIO install, secured with LetsEncrypt. No proxies or NGINX to deal with.

Have you checked that all dependencies have been installed?
I remember that I had a problem with that some of them were not automatically installed several versions ago. And I am not sure if the issue has been completely resolved in the current version.