6 December 2017

New toys for 2018 ...with two more units on the way, I can cover every spot I loiter about at home. Now neighbors won't just hear me laughing by myself, instead they'll hear me having whole conversations by myself!

Inside each unit is a speaker and microphone, so it can "talk" to you and with some help from google's cloud, also understand what you say to it. The end result is a Star Trek-ish alternative interface to Google Assistant that is available on the new smart phones.

What does this do for me? Well I'm not completely sure at the moment ... this is either going to be the biggest waste of money for the year or a really cool platform to build stuff around (I've just realized it can quite easily turn out to be both).

Here are some of the things I've been able to get it to do:

"Hey Google, what's the time?"

"Hey Google, tell me a joke"

"Hey Google, tell me a riddle"

"Hey Google, set alarm for 8:30 AM"

"Hey Google, set timer for 90 minutes"

"Hey Google, remind me to bring in the laundry at 5pm"

"Hey Google, what's 180 Fahrenheit in Celsius"

"Hey Google, who is the fairest of them all?"

"Hey Google, when am I?"

"Hey Google, what's the meaning of life?"

It's also linked to my Spotify account, and I can do:

"Hey Google, play music"

"Hey Google, play my [name] playlist"

It's also possible to link it to some gadgets to do Home Automation, which i will be looking into in the next few days.

But first things first ... Google Assistant is all about personalization, so I've decided to customize my Google Home Minis. They've gone from the dull boring standard Google Home Mini:

to my own Googley Home Mini:

It's still a long way of from "Samantha" ... but it's a start.

15 December 2017

I took a few steps towards smart home-ness today ... I added a sonoff S20 and a sonoff slampher to control the new extractor fan and also ceiling lights in my workshop.

Initially I had planned to integrate everything to the MQTT server I run on a raspberry pi in my home, as I did with the sonoff unit that controls power to my 3D printer. However that is missing some glue to integrate it with Google Assistant, and really if a smart home isn't a Smart Home until you can talk to it. So for this round, I went with the stock standard sonoff firmware.

I needed to install the eWeLink Smart Home software on your phone, to initially detect and configure the Sonoff devices. All the Sonoff devices are similar in that to configure them, you hold down the button (the big one on the S20, and a tiny almost hidden one on the slampher) until the light blinks rapidly. The eWeLink app can then detect the device, after which you can configure wifi and other settings. I found it useful to set the devices to turn on the device they are controlling, the first time power is applied. Even if all means of control is not available, you can power on and off a device by toggling the power supply.

You can also give each unit a name, so I used the room.format to name them, i.e. workshop.fan and workshop.light. Once configured, when you open the eWeLink app you are presented with a list of buttons which show the current state of the power to the device, and pressing the on-screen button toggles the device power supply. It couldn't be any simpler than that.

The eWeLink app doesn't talk directly to the devices on your LAN; instead the devices talk to the eWeLink cloud servers and so does the eWeLink app. This allows you to run the eWeLink app to control devices, even if you are out of the house, without a need to have a fixed IP address or open ports on your firewall.

It is a bit scary to think that the devices are under the control of some external China-run entity (the eWeLink servers are hosted on Amazon AWS), but as long as they're not controlling anything critical I shall risk it. The S20 units I bought detected a firmware update was available and offered to self update, which I let it do.

The next step is to link Google Assistant to eWeLink. You do this from the Google Home application on your phone, by going to menu -> Home Control and pressing "+". Google Assistant first links to the type of system ... in this case "Smart We Link", for which you will need to provide your eWeLink id and password. Once authenticated Google Home pulls in the list of devices you have under eWeLink control, and you associate them with which room they are located in.

It takes about 5 minutes to set up a sonoff and integrate it with google home.

Here's a video of it in operation:

An interesting point to note is that there is no obvious way to have a new device you've just added to eWeLink register itself on Google Home, as you can only add each type of system once. Some people suggested unlinking the system and then relinking it again, but you have to assign all your devices to rooms again. In the end I found the solution ... just say "Hey Google, sync my devices" and the new devices will appear in the Google Home app. You then just have to assign the new devices to rooms.

I've found that while using the eWeLink app is quite fast (despite the communications having to go to the cloud and back), going through google assistant introduces a lot of lag. Part of this is the need to detect when you're done talking (wait for a moment of silence) and also upload the voice request to google's cloud for translating into commands.

The lag is irritating enough that I don't feel it is suitable for use with room lights. I can go into my workshop, grab some stuff from inside a box, and leave the room before google responds to my "Hey Google, switch on the workshop lights". For now, this kind of control is most suited to devices for which an immediate response is not required (i.e. switching on extractor fans) or where you would otherwise have to encounter some effort to turn them on (i.e. looking for a remote control).

For lights, while you may want to be able to remote control them, you really need them to be turned on immediately when you enter a room. For this, Sonoff has a series called sonoff touch, which are replacement wall switch plates that feature a regular switch (albeit touch sensitive) for controlling the devices manually, but also have the usual wifi linked circuitry that allows you to control them via the eWeLink app or Google Assistant.

They're quite reasonable priced to make full smart-home conversion possible, however they require a neutral wire in addition to live wire behind your wall switch face plate. In most houses, only the live wire runs into and out of the box behind the wall switch faceplate, which means you will need to modify your home wiring. Given that we have brick walls in my apartment, this will involve hacking and re-plastering part of almost every wall in the house, which makes it an unsuitable solution. If I ever were to do any renovations or design a new house, I will make sure to have the neutral wire run behind each wall switch face plate.

21 December 2017

The contractors are finally done with the kitchen ... they were quite puzzled why I wanted my extractor fan terminated with a a 3-pin plug that goes into a wall socket, as opposed to a proper wall mounted switch. But they complied.

Meanwhile, the Google Home Mini for the kitchen needs to be mounted on the wall ... the counter tops get too messy, and the google home would get in the way of cleaning up. I tried using double-sided tape on the back of the Google Home Mini, but the rubbery anti-slip surface at the bottom doesn't like double sided tape.

Fortunately, the contractors are also done with my workshop and the 3D printer is now alive again ... so the first thing I printed
was this Google Home Mini mounting bracket I found on Thingiverse.

I didn't need to drill holes to fix it to the wall -- the 3D printed plastic and the wall tiles in the kitchen worked fine with double-sided tape.

Interestingly, the bass sounds much better from the google home mini in the kitchen. Maybe something to do with the hard surface behind it or the chamber formed by the cabinet and windows.

One reason to have the unit in the kitchen is so that I can say "Hey Google, add bread to my shopping list" as I discover things I need to buy. It's usually the case in the kitchen when I don't have my phone or tablet nearby to make a quick note, which results in my forgetting to buy bread the next time I'm at the supermarket. Whatever you tell google assistant to add to your shopping list is accessible by asking "Hey Google, what's on my shopping list" -- or if you'd rather not have everyone in the store hearing your list, you can access via the Google Home App (or even https://shoppinglist.google.com/u/0/lists/default). It also supports the creation of multiple lists, so you can create a list per store for example.

I also fixed a Sonoff S20 on the opposite wall, to control power to the extractor fan. So now new the extractor fan in the kitchen can be controlled with a "Hey Google, switch on kitchen fan". If I say "Hey Google, switch on fan" the extractor fan in the workshop comes on ... you would have thought that with Google's Home Graph, it would be smart enough to assume that if I didn't explicitly say which fan, that I really meant the fan in the same room as the Google Home Mini I'm communicating with.

What's Next?

One think I would like to experiment with is to control my air-conditioner units with google assistant. This would be useful for those situations where:

1) you're on the way home and it's a really hot day and you want to return to a cool house
2) you've left the downstairs aircond on and are now upstairs and are too lazy to go down to switch it off
3) you're already cozied up in bed and you need to change the fan speed / temperature but the remote is out of reach

There are ready made solutions for this that already work with Google Assistant, but they're a bit pricey (says the guy who just plonked down money for 5 google home minis). I think it should be possible to DIY a solution for cheap. Watch this space.