Disclaimer

Please, proceed carefully following the tips published in this blog, specially when Main Power is involved. I'm not responsible for any damages caused by what is written in this blog.
Thank you

Wednesday 20 February 2019

Home Automation System - Let's talk to OpenHAB...




Comando Vocale, I Comandi Vocali, Ok Google, Assistente


As I said before, I'm here to speak about my test with the vocal assistant...in particular, the setup and integration of Google Home Mini with OpenHAB.

In the previous post (see https://domoticsduino.blogspot.com/2019/01/home-automation-system-welcome-to-our.html) I spoke about my recent purchases: a Google Home Mini and a Google Chromecast. Now I'm ready to integrate them in OpenHAB in order to be able to send vocal commands to my Home Automation System items.

In OpenHAB there is a nice Google Assistant integration plugin. Its setup is easy as follow the online documentation - https://www.openhab.org/docs/ecosystem/google-assistant/

In particular, this plugin use the OpenHAB cloud connector with myOpenHAB service; these are good facilities to expose local OpenHAB installation over the internet in a secure manner; in this way OpenHAB is able to integrate external services, just like our Google Assistant.


Icona, Sociale, Networking, Presentazione, Multimedia

After the initial setup, we have to tag the items we would like to drive through Google Assistant...For this purpose we will use the OpenHAB tags, a sort of keywords used by several addons (see https://www.openhab.org/docs/configuration/items.html#tags)

Using these tags we could assign particular job to the items in the Google Home application; in fact, in order to be used with Google Assistant, our OpenHAB items must be integrated as compatible Google Home devices.

Currently these are the available tags:

"Lighting"
"Switchable"
"Scene"
"Outlet"
"CurrentTemperature"
"Thermostat"

You can check last version of this list using this url:


To assign a tag to an item we have two ways:

  • If item is defined in a text file then we could simply add the tag between square brakets [...]
  • If item is defined in PAPERUI, then you need to use REST API (see https://www.openhab.org/docs/configuration/restdocs.html); in particular this service: /items/{itemname}/tags/{tag}

Here is an example of a "lightingtag:


After finished with the tags assignment, you have to setup Google Home app, on our smartphone/tablet. You have to add a new device, choosing OpenHAB between the compatible devices list. Then you will be prompted to type your username and password to login to myOpenHAB service...Magically, all our tagged items will appear in Google Home. Let's assign a name to every device and we are able to use them with Google Assistant.

Now, we could say: Hey Google, turn the "device name" on / off

Every device could be added to a room in our virtual home, so we can group and use them with a single command


As well as sending command, we could also get devices and sensors informations. For example we could ask the room temperature.

In my example, I added the "CurrentTemperature" tag to the item related to my temperature probe in the kitchen


Google Home see it as a thermostat, so I can ask him the temperature


What if you added more tags in OpenHAB? Simply tell to Google Assistant to synchronize the devices. After some seconds, the new devices appear in Google Home.

A very interesting thing is that you can talk to Google Assistant also from the smartphone / tablet not directly connected to the local LAN where Google Home "lives". In this way you can send commands to the smartphone while you are away from home.

Friday 4 January 2019

Home Automation System - Welcome to our new voice assistant




It's time to explore new interesting "things" to simplify our daily life; ok, this is the official excuse...the real reason for that is to have fun
Let's try the voice integration in OpenHAB to control home device with voice.

As far as I know, I have two alternatives: Amazon Alexa or Google Home. I'm an Android fan, so I chose Google Home. another good reason for that is the native integration in OpenHAB.

So, I bought Google Home Mini and Google Chromecast (there was a special buying them together)

I think Google Chromecast  is well known to everybody, let me only say that OpenHAB integration will be possible. In a future post I'll describe it.

So, let's speak about Google Home. The main difference between mini and standard is the audio quality; the voice assistant is the same in both devices. They are both elegant and easily integrable in every room. For good reviews please check Google and Youtube


Ok, let's install my new toy, following an easy procedure with the Google Home App for Android and iOS; an useful thing it that it can be integrated in many google services as Calendar, Reminder and so on...

Here is it:


Google Home App is a complete software to control a lot of smart devices...I will use it only as bridge for OpenHAB.




Let me check:

Ok Google, please tell me a joke
Ok Google, please play some classical music

A nice feature is the native integration with audio and video streaming services, like Youtube Music, Spotify, Youtube videos, Netflix and so on...just ask google home to play music or videos...you can also setup default video and audio output, for SMART TV and audio amplifiers. I will use Google Chromecast as default TV output and a standard BOSE bluetooth audio speaker as default audio output.


I will play a lot with google home and then I will be ready to integrate it in my OpenHAB System.

Stay tuned