The Google Voice Notification service for Vera controllers, allows you to broadcast notifications from your Vera controller to alert users of events or actions, for example announce that someone has opened a door, or that a door is still open after an amount of time.
Please note that this broadcast feature uses the native ChromeCast function of the Google platform, and as such, will stop any currently playing media to make the announcement. Once the announcement has completed, the previously playing media will not restart. This is a limitation of the Google Cast function.
To set this up, please follow the steps below.
1. On the Settings page of the bridge, enable the service.
2. This will then start up the service, and scan for available Google Assistant devices, when complete the following screen will display. It will also discover any speaker groups you have defined in the Google Home app.
3. Enable/disable the devices you wish to use for the Announcement service
If you add or remove more Assistant devices, just click the Re-Scan button to have these found and enabled (or removed if no longer online). Please note that Google speaker groups are not currently supported, if you need to send to multiple speakers, just add more than one LUA command below.
From here the settings page, you can also perform a 'Test Announcement.
You can also change the language by clicking the 'Change Language' button, and select from the following (Italian, Dutch,German,Swedish,Spanish,French,Danish & Norwegian)
4. To use the service from your Vera controller, the following setting needs to be enabled, to allow your controller to send the required HTTP command to the bridge, navigate to the Users & Account Info section, and then select Security.
5. Click the checkbox beside 'Enable potentially unsafe lua code'
Now you are ready to go, the basic steps are create a scene with the triggers you want, as you would normally do, then at the end we just add the required code into the 'Also, execute the following Luup code' section
For example, how to send a voice notification when a temperature is greater than 30 degrees.
- Create a new scene, and click 'Select a device'
- Choose the trigger device
- Choose the desired trigger points, then click Validate.
- Click the Next Step link to proceed.
- Add in any other actions you wish to perform into 'Device Actions' and then click the Next Step link.
- In the section 'Finish the Scene' click the link to define the Luup code
- Now enter the following code into the entry field
luup.inet.wget("http://{ipaddress}/speak/?text={your text here}")
Replacing the {ipaddress} with the IP address of your bridge, and the {your text here} with the text you wish it to announce.
You also need to replace all the spaces in the text with %20 (otherwise Vera will not treat it as a valid URL address to call)
You will also find the exact syntax for this on the Settings page of the bridge, at the bottom of the Voice Notifications section.
There are two options, the first will broadcast to the default enabled devices, the second option will allow you to direct the announcement to a specific speaker
eg,
When done, click the Save lua button to save and return to the Scene page.
Assign the scene a name, and a room as required, then click Finish to complete the process, you now have a scene that will run and announce your message when the temperature is higher than 30 degrees.
Just follow this process for any other scenes you need, adding in the LUUP code at the end, and adjusting the text to suit.