to enable verification in google cloud messaging i need to verify the domain two options available to me are a meta tag in the home page or adding a verification file to the root directory of hass’s web server.
is there a simple way to serve the verification file directly or add a tag to the head section before the first section
like this;
<html>
<head>
<meta name="google-site-verification" content="fbfdgbvbdg__7wfbsdfbvfkAdEYobLfBQfgesrgher" />
<title> My title </title>
</head>
<body>
page contents
</body>
</html>
I’m unsure how it’s working internally but checking the component I see the verification content is one of the parameters you need to include so I understand somehow in the implementation a meta will be written with your code.
have you tested it?
looking forward for your results to implement it here
I have been doing some testing … it’s easy to configure just include this:
- name: HTML5
platform: html5
gcm_api_key: 'Api Key provided in the Google page when you create it'
gcm_sender_id: 'This is the Project # ID'
I’ve somehow been able to fire 1 notification by adding it in a testing script:
cams_send_notification:
alias: "Send Testing Notification"
sequence:
- service: notify.html5
data:
title: "Title of the Notification"
message: 'Content'
But now I’m having another issue.
When a browser is registered an entry shows in the file ‘html5_push_registrations.conf’ as per the config. The problem comes when the browser unregister. The file gets completely empty which is not making JSON very happy and you see errors like this in the log:
16-09-09 13:03:58 homeassistant.components.notify.html5: Saving config file failed: b'browserKEYID==' is not JSON serializable
So, no longer works and you can’t register a new one.
if you stop the service, remove the file and register a new browser it works. Little bit unstable …
if you have time later and you can check would be great to learn if you have the same experience.
It vibrates by default if it is a new notification. If you look at the HTML 5 page there is a link to what is valid in the data payload and there is a field which allows you to adjust the vibration pattern.
If your phone doesn’t vibrate it is either do to a system setting or you repeated a notification with the same tag before it was dismissed.