Give a voice to a smarthome setup
At the beginning I was not so much interested about alert aspects, unless I’ve seen some useful tips done by Jean-Martin. I’m not able to do without them nowdays.
My voice alerts are made of different flavors, from “It’s time to go to school”, “Fish have to be fed”, to “Warning, server is disconnected”.
It’s useful, funny, and easy to setup using eedomus.
What do we need?
- An Android tablet located at a strategic place and being sufficiently loud. If tablet should be mounted on a wall, select one with a front loudspeaker. It doesn’t need to be top notch device. My personal choice ? Please have a look to this post.
- Imperihome android App. This is a smarthome interface App, but it includes also a small webserver we can use to send orders and particularly to read out text.
- A smarthome controller. In my case this is an eedomus.
- Optionnaly, Tasker App on the tablet.
Configuration, tablet side
Not much to say here compared to what have been already explained in previous post. Tablet have to be set with a fix IP address to be able to discuss with it easily. It can be configured in network parameters of the tablet, or using an advanced DHCP server that can serv fix IP addresses.
Loudness on tablet should remain constant, even if malicious people (my children) are changing volume or muting it. Tasker is the one to be used to do so by creating the following task that is resetting volume parameters every 30 minutes :
Also the embedded http server of Imperihome have to be activated and port verified :
Reading out a text by the tablet
It is then possible to read out a text, when Imperihome is active, by calling the following http address :
- 192.168.x.x has to be modified to correspond to IP address of your tablet
- text have to be entered after tts/
- Special characters have to be replaced by corresponding codes for URLs. Here are some useful codes :
Space %20 , Coma %2C . Mark %2E ! Exclamation mark %21 ? Interrogation mark %3F
For the first try, use the browser of your computer before setting the parameters in your smarthome controller.
Android speech synthesis have sometimes some difficulties to analyse complex spelling, at least with french language. In those case you should have to simplify phrase or word to have it spelled correctly. Apart from that, pronunciation is good and, in my case, sufficiently loud to be heard from all the rooms at first floor.
Voice alerts with eedomus
Let’s start using those alerts on the eedomus controller. We have to connect through eedomus.com portal. When logged, the configuration panel can be accessed at top right of th screen.
Select option “Add or remove a device”,
then “Add another type of device” :
There is no particular topic to underline in general configuration which is equivalent for all types of devices : name to be changed, assignment to a room, and eventually to a specific use, icon change.
The most interesting part is the value Tab in which are defined all the phrases that should be dictated :
For each phrase, add a new value with those parameters :
- Value : this one won’t appear lately, take care that there is a single value per line. The controller propose a default value that can be used directly.
- Image : optional but useful to find easily a phrase if you put an icon matching that one.
- Description : Description of the value. This description is the one that will be selected in rules.
- URL = http://
- Type = GET
- Parameters = ?text=
Don’t forget to save your new values with corresponding button at the bottom of the page, you never have to use the back button from your browser.
Et voilà, configuration is done.
It’s now possible to activate this new device from main panel, it is classified by function and by room. One clic on it and you can select one of the values, then the voice alert should activate.
Integrating a voice alert inside a rule
We already have done most of it. To trigger a voice alert from a rule, you have simply to add an Action, select this new peripheral and the correct value.