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.