VOICE CONTROL OF HOME AUTOMATION DEVICES WITH SIRI
Update: 23/04/2020: Several years later I must say that I now have five Google Home Mini's voice controlling my home automation via MQTT and it works. very well.
I will write an article about this soon. Subscribe nowIf you haven't already done so, find out when it is published so you don't miss anything.
Today I have dedicated the day of the gadget to implement a solution, based on Siri and MQTTThe system allows me to "talk to my house"; give commands to turn lights and appliances on and off, adjust temperatures, ask about the temperature or humidity in different rooms, etc.
My home automation system is made up of several elements, which I have been integrating over the years...
- HomeSeer PROThe main brain that gives intelligence to the house. All my devices and systems are registered in it (lights, sockets, alarm, weather station, irrigation programmer, boiler, surveillance cameras, receivers of various types and protocols, etc.) and it communicates with them through various systems: http, mqtt, serial ports, directly... HomeSeer runs permanently on a small, low-power, fanless PC with Windows 7.
- Node-redThe Internet of Things: a visual system for the connection and programming of the "internet of things" that allows me to quickly set up and integrate an endless number of devices into my home automation system. This programme runs on a Raspberry PI 2 (click here to learn more about home automation and Raspberry PI) and works on a permanent basis.
- Mosquitto: an MQTT server (communications system used by most of my devices) and running on the same Raspberry PI of Node-red.
Well, let's get to the point... I'm going off on a rambling ramble...
By now I think everyone is familiar with Siri (Apple's assistant, which it has been gradually introducing in all its devices). Well, about two years ago, Apple gave Siri the ability to control the home by taking advantage of its ability to communicate in natural language and came up with a standard called "Home Kit". In principle, Home Kit only works with Apple-certified devices (few and expensive) but, little by little, the hacker community has managed to get this system to work with other devices from other manufacturers and on non-Apple platforms.
Someone very clever has developed software, called Homebridge, that allows almost any device to be recognised as a Home kit device and interacted with from Siri.
My work today consisted of installing the Homebridge software on a Raspberry PI model B (the most basic and oldest) and other software on HomeSeer that allows the two to integrate. The result: I can tell Siri by voice from an iPad or iPhone "hey Siri, turn on The Light in the lamp" and, as if by magic, The Light comes on.
At the moment I have some lights in the house and all the temperature and humidity sensors in the house included in Homebridge (I can say "hey, Siri, what's the temperature in the living room" and Siri will respond immediately with the temperature).
The installation is not difficult, but it is a little bit complicated and cumbersome. First install a current version of Raspbian Jessie, then update it. Then install Node.js and, finally, Homebridge. The configuration is not very complicated either, but it is not very clear because the information on the internet is a bit contradictory and you have to go through trial and error.
I have a lot of work ahead of me to integrate the rest of the house. The first thing will be the alarm, I will be able to say to Siri when I go to bed "goodnight" and Siri will turn off the lights, set the heating to night mode and set the alarm to night mode (only external sensors active), "I'm leaving the house" and set the alarm to partial mode or "good morning" and remove the alarm, set the heating higher and whatever else it needs to do to get the house up and running for the day.
The truth is that it is not easy, but I think it is worth the effort.
Update: 17/12/2016: I give up! After a few days of fiddling around I have not been able to get this invention to work properly. Every few hours I get a message on the iPad saying that there is no response from the devices and the only way I have found to get it to work again is to delete the house on the iPad and recreate it, which means putting each device back in its corresponding room, creating the scenes, etc... a lot of work. I like the system, so I'll try it again a bit later.