Google Assistant Won't Connect

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:

Yeah, it was partly that switching to the milestone is a one-step process, but also that lots of people don’t understand the importance of backing up their systems. For a lot of new-to-RPi users, cloning an SD card would sound daunting since it’s not as simple as just copying files in Windows Explorer.

Update:
I tried to connect my openhab cloud account each and every day to just try to get it randomly working.

I just received Android 12 Beta Nr 2 Update
Just tried it again (no disconnection of accounts before or cleaning applications in myopenhab)

→ It just worked

I have no idea if this can be related to the Android version or if some app was updated

I would guess that something was caching weirdly on your phone and the update flushed it out. Can’t be anything to do with Android 12, since that’s brand new and you might be the only one here who has it installed.

But it could also be something entirely unrelated to your phone. Who knows?

1 Like