Google Assistant Won't Connect

I seriously doubt that there is anything on your service that is related to the error. So long as you have the cloud connector installed and configured with myopenhab.org and at least one Item has GA metadata that’s all there is to it. If there is an error it’s likely something messed up with Google Home (in my experience it’s a very finicky app) or the myopenhab.org service.

But also pay attention to my warning above. You may get the error but did you actually do a refresh and sync to verify? When I relinked my account I got the error too, but it worked despite the error message.

Just a quick explanation about how the Google Cloud connector works which i hope will save people some time when troubleshooting.

When you link your google home account to your OH instance, the connector does 2 things.

The first is to initiate the linking process / oauth flow. This is how the connector gets a token from myopenHAB to talk with your OH instance. Your OH is not used at all in this step, this is completely between myopenhab and google.

The second is that once the connector has a token, it uses that to request https://myopenhab.org/rest/items to get a list of all items on your system and start looking for ones that are tagged correctly.

Thats it.

If your are tying to trouble shoot this, and have already completed authenticating the connector with myopenhab, then the next step would be to check the output of https://myopenhab.org/rest/items (once you log into myopenhab of course) . If you are getting what looks like valid JSON back, then you next need to check your item tagging and configuration.

You should not need to rebuild, reinstall, or generally do anything drastic to your system to get this working :slight_smile: Hope this helps

1 Like

I just unlinked my account, Added back the openHAB app, authorized with myopenHAB, and it found all 75 devices i have exposed to it.

Thx, for this insight, really appriciated. This is really helping trouble shooting.

I am using openhab 3.0.1 without textual files, in the user interface I added 2 items that do contain metadata to GA “value”: “Switch”. I checked these references are stored in JasonDB in “org.openhab.core.items.Metadata.json” and not in “org.openhab.core.items.Item.json”.

https://myopenhab.org/rest/items is working fine. All items are returned but no references to Google Assistance.

Also REST https://myopenhab.org/rest/items/yourIitem does not return GA references

{“link”:"https://myopenhab.org/rest/items/yourIitem",“state”:“OFF”,“editable”:true,“type”:“Switch”,“name”:" yourIitem ",“label”:“Drukknop Luidspreker Bureel”,“category”:“wallswitch”,“tags”:[],“groupNames”:[“Equipment”]}

It looks that https://myopenhab.org/rest/items returns straight “org.openhab.core.items.Item.json” without the merge of the metadata in “org.openhab.core.items.Metadata.json”

So it needs to query also the metadata or the GA app will never find items configured for GA, correct ?

https://myopenhab.org/rest/items/yourIitem?metadata=ga is working fine, but still GA app will not connect to openhab.

Hello,
i have the same connection issues. I followed the steps from Stephan_Kotleven a can say i have the same results.

I also tested it with a textual .items file with just one GA Switch Item.

A few month before i had no issues with that.
Something must have changed so that there is no connection possible anymore.

https://myopenhab.org/rest/items :

{“link”:“https://myopenhab.org/rest/items/testswitch",“state”:“NULL”,“editable”:false,“type”:“Switch”,“name”:“testswitch”,“label”:“Switch”,“tags”:[],“groupNames”:[]},{“members”:[],“groupType”:“Switch”,“function”:{“name”:“OR”,“params”:[“ON”,"OFF”]}

https://myopenhab.org/rest/items/testswitch :

{“link”:“https://myopenhab.org/rest/items/testswitch",“state”:“NULL”,“editable”:false,“type”:“Switch”,“name”:“testswitch”,“label”:“Switch”,“tags”:[],"groupNames”:[]}

https://myopenhab.org/rest/items/testswitch?metadata=ga :

https://myopenhab.org/rest/items/testswitch",“state”:“NULL”,“metadata”:{“ga”:{“value”:“Switch”}},“editable”:false,“type”:“Switch”,“name”:“testswitch”,“label”:“Switch”,“tags”:[],"groupNames":[]}

My .items file look like this ( All other Metadatas over the UI to other Items are already removed:

Switch testswitch “Switch” { ga=“Switch”}

After invesrtigating some frustating time on this problem i figured out a solution thanks to an old thread:

https://community.openhab.org/t/solved-google-assistant-couldnt-update-the-settings-check-your-connection/64193/10

It seems very important to give every item a label. I just did that with my countless items just to give it a shot.
In Openhab 2 with textual files it was more intuitive to give every item a label especially with the use ofe BASIC UI. But in Openhab 3 over the UI it is easily left empty because there is not much need for it.

To my amazement that solved my issues with this “Check connection error”. Hope this will solves also for others these frustating problem/bug.

Hi Dominik would you mind showing me how you have one item labeled please? I am still having the issue and coming back to this as I was beyond frustrated with it. I am going to look at my setup when I get home in a few hours and would like to compare your labeling format to what I have, or at least think I have at this moment. Thanks!

Dave

Hello. I just give every item a label name in the items settings. Before i left some items blank because i didnt need everywhere a label for an item. Thats all i did. One minute before i retried to sync my devices and it still works without error.

Thanks for posting that Dominik, still didn’t work for me.

I know this should not have anything to do with anything but I just wiped my Z-Stick and created/installed a brand new instance of openhabian on a new card and I can now connect with no issues.

This was my last-ditch effort to tey to get this to work before I looked into another solution and ditched openHAB.

I appreciate everyone’s help though and just wanted to say thanks!

Dave

Hi all,

I connected myopenhab.org to Google Home last year on August and all was working fine, don’t remember now exact version, 2.4 or 2.5 I guess. All was working fine, even after upgrading to OH3. Than month ago I had server crush, reinstalled all from the scrach, used new secret and uuid to connect again OpenHAB to myopenhab.org, all tagged items still were working fine. Three days ago I tried to sync my devices to Google Home again due to some changes, and I could not do this, I unlinked OpenHAB app from Google Home and since than, I have not been able to connect it again anymore. I commented all tags from items files for google assistant leaving only one for testing purposes:

Switch Test_Switch_1 "Test" {ga="Switch" [roomHint="Entryway", name="Power outlet"]}

Still I cannot link Openhab to Google Home. The behavior is exactly the same, account is started to be linking asking me for authorisation, I allow and than error message about checking my settings. I have done everything described in this post:

a) forcing google home to close
b) deleting my home and adding it again
c) clearing memory
d) add labels to all items
e) I recieve json when I call https://myopenhab.org/rest/items
f) in generall I work on files, but after tagging my test item, I took a look on UI to see this Item, google assistant metadata is there, but I even deleted tag from file and select it manually via UI

In general, I recieved error like other, but I also see linked openhab here: https://myaccount.google.com/accountlinking and I see Google Assistant Voice Control in https://myopenhab.org/applications with the date of last trial of linking.

When I call https://myopenhab.org/rest/items/Test_Switch_1, I got:

{"link":"https://myopenhab.org/rest/items/Test_Switch_1","state":"ON","editable":false,"type":"Switch","name":"Test_Switch_1","label":"Test","tags":[],"groupNames":[]}

so I dont see any GH/GA metadata here, but when I call https://myopenhab.org/rest/items/Test_Switch_1?metadata=ga, I got this:

{"link":"https://myopenhab.org/rest/items/Test_Switch_1","state":"ON","metadata":{"ga":{"value":"Switch","config":{"name":"Power outlet","roomHint":"Entryway"}}},"editable":false,"type":"Switch","name":"Test_Switch_1","label":"Test","tags":[],"groupNames":[]}

What else I can do?
I am running OH3.1.0 M3 Milestone build on Ubuntu 18.04.5.

i have exactly the same behavior.
I use openhabian and installed 3 days ago OH 3 (and tried 3.1 M3 and Snapshot aswell)
after deleting the link in google home to openhab, i can’t get it back, always the error in the home app. (and in google account i see the link to openhab and in openhab i see the application google which is allowed) but in the app itself, i don’t get it connected :frowning:
I also tried with only a couple of items with the new syntax ga=“Switch” instead of [Switch] like in oh2 (which worked until i updated…)
Anybody has a idea why i cannot reconnect google home to openhab 3?

i have only 1 item for testing in my oh3, it’s a test.item file with this line

Switch TestLight "Test Light" { ga="Switch" }

still cannot link, what could that be…the syntax is 100% right, as it’s from Google Assistant | openHAB copypaste

i don’t really get it, you wrote that in your item file was:
Switch testswitch “Switch” { ga=“Switch”}

and so you had a label called “Switch”

i have the same issue and cannot get it to work, my test item looks like this:
Switch TestLight “Test Light” { ga=“Switch” }

Hi, I updated to M4 milestone build and just connected without any problems, at least with test switch, rest I will check tommorow. You can try as well :slight_smile:

Hi, same here, cannot link any more to Google Home. Try evrything I could relate to, in this post or older posts… doesn’t work.

I wonder why the upgrade to the M4 milestone helped solving the issue for you. So problem would come from Openhab ?

Thanks.
Dom

Keeping you informed…

After taking a diskimage i upgraded from openhab 3.0.2 to 3.1.0.M4 succesfully.
Suddenly all problems solved. Openhab account suddenly exists in google home and comes visual without giving any credentials. So, somehow it was expected after somany trys. My testitem with metadata GA came visual.

On top of it all Hue Groups including OnOff/Brightness/color came visual without the need to add the Hue account. Still need to read the docs why this is happening.

So i believe it was really a version 3.0.0, 3.0.1, 3.0.2 related issue. Everything works fine now.

Still need to evalute that everythings runs smoothly will this milestone 4. But currently running stable on raspberry PI4 with 1500 items and 60 things and 60 rules.

Much promising ! Hope this helps somebody.

3 Likes

Hi im Running openHABian on my RPi3+ with 3.0.2 (Build)
Struggling hours and hours, trying to connect my Google Home app with openHAB cloud

Tried all the stuff, mentioned above and nothing is working.

Are there any new findings, triggered by @Stephan_Kortleven theory that this could have connection to the used openHABian version?

I’ve run 3.0.1 and 3.0.2 without any issues, so it might be something particular to how folks upgraded (which is hard to pin down).

The easy way to test is to clone your SD card and then try upgrading to the 3.1 milestone. At best, it fixes your problem. At worst, you swap out the SD card.

Side note: “openHABian” is not “openHAB”. That often gets confused by newer users (understandably), and needs to be clear when discussing problems/solutions. In this case, we’re talking about openHAB. :wink:

1 Like

Im not a very advanced user, so i think i’ll not try that :roll_eyes:
At the moment im re-writing all my items, defined in UI to textual definition → Maybe i find some errors in metada and can solve them this was (for some people it helped)
→ If not: I will regularly test to connect GH to OH and hope for a miracle :laughing:

Understood → Im using openHAB 3.0.2 Release Build :wink:

Thank you!

Cloning your SD card isn’t an advanced task, and it’s definitely something you should get used to doing. The easiest way to recover from a failed SD card is to have a recent backup image ready to swap in. I would never make significant changes to my system (e.g. an OH upgrade) without first making a backup.

  1. Shut down the RPi.
  2. Pull the SD card and put it into another computer.
  3. If you’re using Windows, use Win32DiskImager to copy the SD card to an image on your hard drive. I don’t know what to use on a Mac, but that’s easy enough for you to figure out if need be.
  4. Use BalenaEtcher (which you probably used to set up openHABian in the first place) to write the image file to a different SD card.
  5. Put the newly written SD card in your RPi and boot it.

This post is off-topic for this thread, but I think it’s important for you to know. You should learn how to do it before disaster strikes. After you’ve done it once, you’ll see that it’s easy.

Note that there are built-in backup options available via openHABian-config, but I haven’t set them up since this system works for me.

I don’t want to hijack this thread into being about backups, so you should search in the community/Google if you need detailed instructions. You’ll find lots of help.

Cloning your SD card isn’t an advanced task, and it’s definitely something you should get used to doing.

Thanks for your advice :wink: → Im alredy backing up my whole system with the openHABian-provided auto-backup and regularly create manual config-backups through openhab-config

What i meant by saying “so i think i’ll not try that” is, that i think the heavy task for me would to be upgrading to 3.1 milestone

But there is the thing i did not understand:
(And found out by doing a little bit of research)
To upGRADE i only have to

  1. openhab-config >> openHAB Related >> openHAB Milestone

Very funny that you did not understand my question because this task is too easy to not know it :sweat_smile:

Back to the topic:
Thanks to you i could try the 3.1 milestone

  • Starting point:
    • Google Home App on Android could not connect to openHAB 3.0.2 (No matter what i tried)
    • Items are defined via UI
  • Preparation:
    • Re-written my whole item-definition to textual-defined (i love it)
    • Backup System
    • Only defined one switch for Google Home (see below)
    • Disconnect openHAB from my “Google connected accounts”
    • Cleared all entries in myopenHAB >> Applications
    • Upgraded to openHAB openHAB 3.1.0.M4
  • And now:
    • Tried again
    • After OAuth-Screen Accept: “Could not reach openHAB. Please try again.”
Switch              dSckLvngRoomTv_Swt              (dGrpLeavFct_GrpSwt)         {ga="Switch"}

Also tried

Switch              dSckLvngRoomTv_Swt                  "Testname"    (dGrpLeavFct_GrpSwt)         {ga="Switch"}

:sleepy: