OrangeAssist - Google Assistant Integration

(Lucky) #1

I’ve been busy with stuff–career, motorcycles, my kids, racing, man stuff :slight_smile:
Haven’t posted here in a while, so here’s another sneak preview. If I see interest, I might create a binding for this.

Note that I might move this under HABPanel since the HTML part goes there.


What this does:
This is basically Google Home (GH) Hub equivalent for HabPanel. It not only acts as a “audio-visual element,” but it fully integrates to Google Assistant as if you are in front of a Google Assistant device (google home, google home mini, google home hub, etc).

We have a combination of 8 Google Devices (home, mini, hub) throughout the house and they work beautifully with openHAB with few exceptions:

  • You have a device supported by Google Assistant/Device but not openHAB
  • You have an openHAB device not supported by Google Assistant
  • You want Google Assistant to control security devices, rather than openHAB

So basically, I have a few security locks that are supported by Google Home, but currently do not have an openHAB binding. I can say “Lock the front door” to GH, and it will lock it, but I can’t lock them through an openhab rule. That’s how/why i came up with orangeassist.

I created this with python using Google Assistant Service since the Library version does not support text input yet. I didn’t want it to run in same hardware as OH yet, so it’s running in a tiny orange pi on a headless armbian. This orange pi also hosts my NCID server for my caller id + habpanel integration

Many of us here use Chromecast Binding as audio sink for OH, but we all know that using that basically STOPS whatever is currently playing and does not resume. With this new integration, instead of using say() in my rules, I simply send “broadcast XXXX” to OrangeAssist and can even use the built in GH chain commands like “broadcast time to eat then turn on kitchen lights”

A simple rule to send the command to OrangeAssist.

val timeoutSec = 10

rule "Send OrangeAssist Command"
	Item orangeassistcmd received command
	var result = sendHttpPostRequest(orangeassistPostURL, "text/plain", orangeassistcmd.state.toString, timeoutSec*1000)
	postUpdate(orangeassistcmdResult, result)

As you may have noticed. I wrote the OrangeAssist REST API part with Basic Auth as a simple security. Some might ask about the popup/slider. This HTML is provided by Google themselves as part of the SDK/API response.

What I really like about this is that it opens EVERY QUERY you can think of and it will answer back, just like being in front of a Google Home device. The difference here is that you can automate those queries, and use text as input instead of your voice.

Here’s one of my favorites:
When I wake up (usually at 4AM), I go to the kitchen to prepare my breakfast. My security cameras (Blue Iris) detects motion and triggers OH. OH turns on the kitchen lights (zwave). After turning on the lights, OH sends “how’s my day” to OrangeAssist, which then triggers a routine of my Google Home device. It tells me the weather, my appointments, how long my drive to work is, etc.

You can also REGISTER the instance and OrangeAssist will show up as a device under your Google Assistant app:

As far as creating the binding. I’m not too keen on doing it just yet. Google Assistant SDK is not that mature yet, and still keeps changing.

Dont mind the blocky gradient (it’s a gif with limited colors)

Dont worry. If I don’t create the binding, I will at least create a HOW-TO.

(Michael Aschenborn) #2

This is really great - and would be the missing piece in my home. Please give more details in a how-to!


(Vincent Regaud) #3

Welcome back, Lucky, we have missed you…
PS: We are all still waiting on an update on your teasing Picture in picture of you doorbell on your samsung TV post.

(Lucky) #4

Oh yeah. I will update that hopefully tomorrow :smiley:

(Lucky) #5

@vzorglub Updated How To Automatically Show Security Feed on any TV with PIP

I will try to make the how-to for this one (orange assist) today

(Greg) #6

This looks really interesting… even just the ability to do the broadcast functionality is exciting!