I have been playing around with HomeAssistant for the past few weeks and decided to give OpenHAB a try as I heard some good stuff about it.
As I have a Google Home Mini the possibility of Google Home integration was important for me to decide which tool I should be using in the end but I read that OpenHAB supports Google Home integration so I thought that would be fine.
As I started to set up the OpenHAB system and wanted to set up the Google Home integration, I noticed that I needed an OpenHAB cloud account in order to get this to work.
This by itself is no problem of course, but this indicates that all the communication between my Google Home and my OpenHAB server flows through the OpenHAB cloud that is provided by the developers.
In my configuration of HomeAssistant, I was able to set up Google Home integration by directly connecting to my own HomeAssistant server using my own ip-address/domain name.
This would be my perfered way as the connection between the Google Home and my home wouldn’t have any depedencies on other servers/services that could potentially go down in the future and will cause my Google Home integration to fail.
My question is whether this is a posibility with OpenHAB at all or if using the provided cloud service is the only option to achieve Google Home integration.
I’ve been trying to find more information about this but unfortunately wasn’t able to find much, so hopefully you guys might have some experience with this or have any ideas to overcome the provided cloud dependency.
Thanks for the reply. That sounds promising. Although I have my doubts about whether this is going to work together with the Google Home integration as the OpenHAB item in the Google Home app seems to be directly linked to myopenhab.org. Do you have any idea if this can be changed some way?
There is Google twice in this sentence, what if Google goes down.
You’ll have to trust the openHAB cloud, very secure, very reliable and built to last
Remember that the openHAB community is going from strength to strength and the OH cloud is not about to disappear.
That’s not really an answer to my question but I agree what you’re saying to a certain extend.
The dependency to Google’s services is something that will always be there and stay there, of course. If those services go down, nothing works anymore. Over and out for Google Home.
But to be honest, I prefer only relying on one single depedency, as the entire configuration fails when only one single dependency fails.
On top of that, I have a bit more confidence in Google’s services staying up then OH’s (also looking at the future).
Don’t get me wrong, I think it’s absolutely great that developers like the developers of OH and HomeAssistant provide end-users with a way to eliminate many dependencies of services provided (and sometimes forced) by companies that sell smart devices, but why not take it a step further by eliminating all dependencies possible? I think HomeAssistant really took a smart move there, by allowing both a cloud-based solution for users that don’t want to deal with the hassle of setting everything up themselves and also allowing users to set it up themselves to eliminate all the dependencies if they wanted to.
The biggest issue is there are lots of manual steps to get your own instance of openHAB Cloud to work with Google Assistant because you have to set up your own OAuth2 tokens and such. When using myopenhab.org it just works.
Yes, I have set up Home Assistant to work with Google Assistant directly.
It’s a bit of DIY solution as you have to create a “Test Application” within Google’s API, but I think you should be able to do it within 30-60 minutes. You’ll link that test application to your own server running Home Assistant. Add the test application using the Google Home app on your phone and you’re pretty much done. There is a tutorial on the Google Assistant component on the Home Assistant website (https://www.home-assistant.io/components/google_assistant/). The only thing you have to keep in mind is that you’ll need an SSL certificate for your domain name as this is a requirement by Google, in order to link your test application to your Home Assistant server.
I have successfully tested Google Home Integration without OpenHAB cloud using service called https://about.gbridge.io/
The Idea is that this service translates google home commands into MQTT messages and back. So if you have OpenHAB and, for example Node-RED for MQTT commands conversion, you can work without OpenHAB cloud.
The only problems is that gBridge service is not free, and unfortunately this is still 3-rd party service.
if still relevant: maybe if u set up your own dns server where u hard pin myopenhab.org to your local server? and you have to forbid every other dns requests other to your own dns server in your router settings otherwise google home etc. will use their own dns servers
I’m a bit confused about this portion under the openhab-cloud docs.
Do I have to install this gactions CLI on the openhab-cloud server or is this something I can run anywhere, upload to google cloud, then forget about it?
Also, by uploading the function to google, does this mean I’ll be billed monthly for the storage/compute used?
Is there an option to run this function on the openhab-cloud server that I’m already setting up anyway?
Google Cloud Functions
Enable the Cloud Functions API and install the Google Cloud SDK by following this quickstart
gactions CLI (https://developers.google.com/actions/tools/gactions-cli)
curl -O https://dl.google.com/gactions/updates/bin/linux/amd64/gactions/gactions
chmod +x gactions
Change host to point to your openHAB Cloud instance, for example: openhab.myserver.com. Do not include https, if you do you'll get DNS errors.
Change path to the rest API. Defaults to /rest/items/.
Deploy the openhabGoogleAssistant (openHAB home automation) function:
Create a storage bucket (https://console.cloud.google.com/storage/browser)
gcloud beta functions deploy openhabGoogleAssistant --runtime nodejs10 --stage-bucket <BUCKET_NAME> --trigger-http --project <PROJECT ID>
This commands will deploy the function to Google Cloud and give you the endpoint address.
Keep the address somewhere, you'll need it (something like https://us-central1-<PROJECT ID>.cloudfunctions.net/openhabGoogleAssistant).