Unable to connect to Google Home

  • Platform information:
    • Hardware: RPi 4b 8 Gb
    • OS: Linux/6.6.51+rpt-rpi-v8 (aarch64)
    • Java Runtime Environment: Debian, 17.0.13 (undefined)
    • openHAB version: 4.3.2
  • Issue of the topic:
    Dear Community,

I have been using OpenHAB since version 3. I connected it to the myopenHAB cloud and Google Home, and everything worked flawlessly. Over time, I was able to sync changes with Google Home without any issues.

However, after updating to version 4.3.2 and migrating the remaining six Philips Hue lights to Zigbee2MQTT, I added them to OpenHAB and configured the relevant metadata for Google Home. Unfortunately, I could no longer sync the devices using the “Sync devices” command.

In the Google Home app, I was prompted to log in to my myopenHAB account. After logging in, I received the message: “OpenHAB is not reachable. Please try again.” During this time, I was still able to control previously configured items through Google Home.

After several days of troubleshooting, including restarting OpenHAB, I decided to delete the connection in Google Home and reconnect it. However, I am now unable to link OpenHAB to Google Home. I can still log in to my myopenHAB account through the Google Home app, but the same error message appears: “OpenHAB is not reachable.”

I tried setting the log level of the OpenHAB Cloud Binding to debug but did not see any errors when attempting to connect. The only changes I made before encountering this issue were updating to version 4.3.2 and adding the new lamps through Zigbee2MQTT.

What could be causing this problem?

Thank you all in advance!

  • If logs where generated please post these here using code fences:
2025-01-20 20:59:30.123 [DEBUG] [io.openhabcloud.internal.CloudClient] - on(): request
2025-01-20 20:59:30.125 [DEBUG] [io.openhabcloud.internal.CloudClient] - Got request 19165226
2025-01-20 20:59:30.126 [DEBUG] [io.openhabcloud.internal.CloudClient] - Path /rest/items/
2025-01-20 20:59:30.127 [DEBUG] [io.openhabcloud.internal.CloudClient] - Method GET
2025-01-20 20:59:30.128 [DEBUG] [io.openhabcloud.internal.CloudClient] - Headers: {"host":"myopenhab.org","accept":"application/json","user-agent":"openhab-cloud/0.0.1"}
2025-01-20 20:59:30.129 [DEBUG] [io.openhabcloud.internal.CloudClient] - Query {"metadata":"ga,synonyms","fields":"groupNames,groupType,name,label,metadata,type,state"}
2025-01-20 20:59:30.131 [DEBUG] [io.openhabcloud.internal.CloudClient] - Request method is GET
2025-01-20 20:59:30.132 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header host = myopenhab.org
2025-01-20 20:59:30.133 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header accept = application/json
2025-01-20 20:59:30.134 [DEBUG] [io.openhabcloud.internal.CloudClient] - Jetty set header user-agent = openhab-cloud/0.0.1
2025-01-20 20:59:30.330 [DEBUG] [io.openhabcloud.internal.CloudClient] - onHeaders 19165226
2025-01-20 20:59:30.335 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 19165226, content size 16194
2025-01-20 20:59:30.339 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 19165226, content size 16384
2025-01-20 20:59:30.345 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 19165226, content size 190
2025-01-20 20:59:30.588 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 19165226, content size 16376
2025-01-20 20:59:30.590 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 19165226, content size 16384
2025-01-20 20:59:30.592 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 19165226, content size 8
2025-01-20 20:59:30.806 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 19165226, content size 16376
2025-01-20 20:59:30.811 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 19165226, content size 16384
2025-01-20 20:59:30.816 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 19165226, content size 8
2025-01-20 20:59:30.877 [DEBUG] [io.openhabcloud.internal.CloudClient] - onResponseContent: 19165226, content size 10421
2025-01-20 20:59:30.880 [DEBUG] [io.openhabcloud.internal.CloudClient] - onComplete: 19165226
2025-01-20 20:59:30.883 [DEBUG] [io.openhabcloud.internal.CloudClient] - Finished responding to request 19165226
2025-01-20 20:59:43.647 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO ping

Since you mention OH3, I’m guessing that you’re still using text configuration for items. I’m also guessing that you’re still using tags for Google Assistant, instead of metadata. If so, you’ll need to update your config as stated in the documentation.

When the Google Assistant action was first developed, devices were exposed with tags. Metadata was introduced 2-3 years ago so that we could gain more GA functionality. There was an overlap period of more than a year, during which both tags and metadata worked, and then tags were retired (I think in early 2024).

There’s no way for us to inform users other than to post messages in the community, so lots of people didn’t find out until GA stopped working. The thing is, GA would continue working as long as someone didn’t sync their devices.

If this is correct, the issue started when you synced your devices to GA (which I’m guessing you haven’t done in a long time due to not changing anything). It didn’t have anything to do with your system upgrade–that’s just the reason you chose to sync devices.

When the sync happened, myopenhab checked your system for devices…and didn’t find any metadata. As such, it didn’t have reason to expose your system to GA. If you change to the metadata approach (per the documentation), then you should be able to add openHAB back to GA.

If you’re already using metadata, then this is a different problem.

I configured everything through the UI and with metadata. I also tried removing the most recent metadata from the new items, hoping it would work again, but it had no effect.

Okay, good to know that you’re up to date on metadata.

I was thinking that maybe myopenhab.org was having trouble reaching your system, but realize that it obviously can since your log is processing requests.

Can you post the definition for one of your items? Not a screenshot of MainUI, but the definition in the code tab.

Here is the description from myopenhab/rest/items

"groupType":"Switch","function":{"name":"AND","params":["OFF","ON"]},"link":"https://home.myopenhab.org:443/rest/items/LightDG","state":"OFF","metadata":{"ga":{"value":"Light","config":{"name":"Lichter Dachgeschoss","roomHint":"Dachgeschoss"}},"semantics":{"value":"Equipment_Lightbulb","config":{"hasPoint":"Z2M_TreppenhausDG_Group_State","hasLocation":"DG","isPartOf":"All_Lights"}},"HUEEMU":{"value":"207"}},"editable":true,"type":"Group","name":"LightDG","label":"Lichter Dachgeschoss","category":"lightbulb","tags":["Lightbulb"],"groupNames":["DG","All_Lights"]}

Here is the description from the code tab:

label: Lichter Dachgeschoss
type: Group
category: lightbulb
groupNames:
  - DG
  - All_Lights
tags:
  - Lightbulb
groupType: Switch
function:
  name: AND
  params:
    - OFF
    - ON

Thanks for posting the REST code. I forgot that the metadata doesn’t show up in the base code tab.

I can’t see anything wrong with your item at a glance. @michikrug, does anything jump out at you as to why this isn’t working?

At least I can see multiple successful SYNC requests in the logs.
If those are actually yours is hard to tell, as I do not see relatable information despite the item names.

The last one is here with a lot of others up to January 18th and one more from December 27th.

2025-01-24T13:31:43 SYNC is adding: Group:LightDG with type: action.devices.types.LIGHT

What would help to narrow it down? In the past few days, I’ve tried linking OpenHAB to Google Assistant at least 2-3 times a day. Sometimes I get the feeling the loading animation gets stuck and restarts multiple times before saying ‘not reachable’. The final result is always the same.

An update on my situation: I tried a new approach. I deleted all GA metadata from all items using a script. After that, I attempted to expose only one item as a light. It went through the usual steps, but then I had the feeling that the animation (blue loading ring) was stuck. This time, it remained in this “stuck” state for at least 5 seconds, after which a new yellow loading ring appeared, and a second later, it showed the item as newly added to Google Home. Now, I’ve added the devices from two rooms, one after the other. Syncing after completing the rooms is working. Could there be a limit to how many items can be exposed to Google Home?
Thank you all for your help.

I have also an issue to connect openhab with google home.

I din´t wanted to start an new topic that is why I post in this one.

My Problem is: I can´t select openhab from the list google home show the “apps”. There is no openhab. Did someone have the same issue or an solution?

Thanks

2 Likes

Let me share here my experience as I hope it may be useful to others.

TLDR: to reset the situation it is not sufficient to remove all metadata from openhab. It may be necessary to unlink the app from the google account and delete the house from the app. Moreover, the integration of gemini with google assistant (on android phones) interferes with the integration between google home and google assistant, namely not allowing to sync the devices. It may be necessary to use google home on a phone where google assistant has not been integrated with gemini.

I integrated a few openhab devices (2 lights, two awnings and two google nest mini) with google assistant quite some time ago in openhab 3.4. I kept the integration in openhab 4: i was not using it very often and it finally stopped working last year and never had time to investigate further. This week, I took the opportunity of the transition to openhab 5 to figure out what was wrong.

Even if not working, the devices still appeared in Google Home. I was offered the possibility to remove them being invited to select openhab from the list of “services” in google home app, but openhab was not there.

The first thing i tried was to create a new house and try adding new devices, but the openhab service still did not appear in the list.

The problem was not from the openhab side: I installed google home on an old phone, with different account and the possibility to add openhab devices was there.

These devices were connected to an old myopenhab account that was down (i have two myopenhab accounts to ease migration when i have two raspberry simultaneously active with the old and the new version of openhab). Restoring the old openhab instance, reconnecting to my openhab with old account I was still unable to remove devices from the home. I even completely erased google home app data, but once reconnected with my google account, devices were still there. This is due to the fact that the devices are “owned” by a google account and remain in a home as long as the “owner” is in that home. I tried to remove the ga metadata completely and give a sync devices commands but i realized that my phone cannot give the sync command anymore, because I accepted the “integration” with gemini. As a work around, the sync devices must be issued with the google nest mini. But still there was a problem with openhab and the situation remained stuck.

I had to go to the google account security section and unlink the “third party app” openhab” (not to be confused with the “Access with google” section to connect to the openhab forum with the google account). Still the devices were in the home app of my phone. I the used the google home app in my wife’s tablet (without google integration) to delete the devices and i finally was able to remove them, but when issuing the “sync devices” to he google nest mini it was complaining that a certain device (actually the tablet, I do not absolutely know why) was unavailable.

As a last resort i let all members leave the house in their google home app and the last one was able to delete it completely.

After that step I was finally able to add the openhab service in google home app. The trouble I had was the impossibility to enter the credentials of the openhab account (the correct one, not the developer one). It turned out that I had to leave google home, use my chrome browser to logout from myopenhab and then try again to link openhab in google home.

After that step, the newly added devices were available and responding: at this stage my google assistant, enhanced with gemini, asked me to integrate google home app. From that moment my phone behaved as my nest mini for giving commands to the devices, except for the “sync devices” command.

I have not figured out myself all of these attempts, I asked several times advice to gemini flash 2.5. It was not always helpful but it indicated a possible path to follow