HueEmulation and Google Home support

@jackdw @tdsheppard77
Ill have a go at trying to let you know how to get your Google Home talking to Openhab.

So firstly - this only works with Openhab2.
You do not use the HA-Bridge nor do you the “Hue Emulation” installed in PaperUI (Add-ons/Misc ) - this version is older and does not contain all the bits needed for Google Home.
So if you have those, remove them.

The most current version ( as of today ) is the one available in this post:

specifically this jar:
http://t0yen.asuscomm.com/org.openhab.io.hueemulation-2.0.0-SNAPSHOT.jar

This you need to install into your Openhab2 addons directory.
For me, this is in /usr/share/openhab2/addons/

If this is successful, then in PaperUI - Configuration/Services/IO there should be a “Hue Emulation” - Click On Configure and “Enable Device Pairing”…set this to “Pairing Enabled”

Now you need to update your linux to forward port 80 back into OpenHab.
This post above explains it:

In short run this:

iptables -t nat -A PREROUTING -p tcp -d 192.168.1.6 --dport 80 -j DNAT --to-destination 192.168.1.2:8080

making any respective changes to your IP address.

Then lastly…for each of your items which you want to control via Google Home, you need to add tags:
( taken from the original binding wiki )
Switch TestSwitch1 “Kitchen Switch” [ “Switchable” ]
Switch TestSwitch2 “Bathroom” [ “Lighting” ]
Dimmer TestDimmer3 “Hallway” [ “Lighting” ]
Number TestNumber4 “Temperature Set Point” [ “TargetTemperature” ]

Add these tags and on the OH2 side i think you are done… ( i dont think any restarts are required.)

So then on your Android or IOS device within the “Home” app, select your Google Home device, click on the 3 dots, then “Settings”, “Home Control” - and go through the “Link the Philips Hue” wizard… it should find your Openhab Hue Emulator instance, and the devices ( items) you tagged.
Add them to rooms within the App if you want …this basically allows you to group items together so you can simple say “OK Google Turn on the kitchen lights” and as you can imagine all lights in the Kitchen "room"should turn on.

I personally, only control my zwave lights using Google Home. so the only tag i need to add is [ “Lighting” ]
I did have my garage door added, but then , understandably, i found that the command “Ok Google - turn off all the lights” also activated the garage door…not ideal.

There is a minor “bug” in the binding in that once you add a tag to the item, the binding associates that item into the emulation config, so if you later remove the tag the binding gets upset until you add the tag back… so if you need to clear the binding config, then simply delete the files in /var/lib/openhab2/hueemulation and restart OpenHab.

Hope this helps… its very cool when you get it working…and also bloody annoying when you’re entertaining and all your friends kids keep saying “OK google Turn on/off lights /play xyz song”… makes the house look like a nightclub! :wink:

1 Like