Openhab cloud connector reinstalll/can't find files or get it to connect with Google Home Android App

  • Platform information: Ubuntu; OH 2.5.11, PIxel 6

Cloud seemed like it wasn’t working.
Reinstalling the binding.
Seemed to save my settings from before.
As a side note; i can connect the app to the cloud URL and it gets my site maps; the particular problem revolves around Google Home and me trying to connect THAT to the cloud account; which just keeps saying “no devices found”

Still not connecting

I don’t seem to have these files in these directories;

image

Even if i did; where would i enter them; i dont see a place to enter them

Thanks

Well, you need to enter them on myopenhab.org:

And on openhab2, the directories might be /var/lib/openhab2…
If the directory structure is different in an ubuntu environment, you probably might want to search for the files

Thanks for that screenshot.

There are no var/lib/openhab2 directories that screenshot is all that exists on my OS under /var/lib

It appears I have those already in there; so it’s not that.

Hrmmm

As a side note; i can connect the app to the cloud URL and it gets my site maps; the particular problem revolves around Google Home and me trying to connect THAT to the cloud account; which just keeps saying “no devices found”

did you expose them correct which means, arte thy listed in myopenhab.org?
And yes if you connect your local instance to myopenhab, then you can access the dashboard also with the app.
Is google home listed as a application on myopenhab:

Is you openhab installation based on a deb package, on a tar file or do you use a docker instance ?
Depending on the type of installation the location of UUID and secret is different.

Exposed-Yes, far as i can tell.

In expert mode i have them comma separated

I can connect to the openhab app locally or via the myopenhab.org address and see my site maps in the openhab app.

They are not listed on openhab(which is why i think that is why google can’t find them)

Google home is not listed as an application; i would assume that happens the first time it successfully connects/gets items

Have you added the Google Assistant metadata to any of your Items? Google Home will refuse to connect to OH if it doesn’t find any devices and it won’t find any devices until you “expose” them to Google by adding the metadata.

In MainUI, navigate to an Item you want to expose to Google and click on “Add metadata”, choose Google Assistant and choose fill in the form per the instructions in the docs based on what the Item represents.

Then try to add openHAB in Google Home again.

What is “MainUI” with regard to Openhab 2.5.11?
In PaperUI, here is what i have

So i see i can add that to the item in a text editor
Previously i used this to add things to Alexa or Google Home
Switch Hold64 “Hold Sixty Four” [ “Switchable”]

Now you are saying change it to this:

Switch { ga=“Hold Sixty Four” [ inverted=true ] }

Will that support Alexa and Google Home or is there some mashup i need to do like:
Switch { ga=“Hold Sixty Four” [ inverted=true ] [Switchable]}

Also, what does inverted=true mean

I didn’t see you were running 2.5.11. MainUI is the OH 3 UI.

You’ll have to add the metadata described in the docs to your Items. There are lots of examples there and a reference guide for what needs to be there.

The Google Assistant integration had to become more flexible due to changes on Google’s end so tags are no longer supported. You’ll have to use Item metadata.

This is kind of nonsense when it comes to an Item definition. Per the docs, an Item has a Type Name "Label" ["Tags"] { metadata }.

All the ga stuff is some metadata. That doesn’t change anything else about the Item.

So instead of

Switch Hold64 “Hold Sixty Four” [ “Switchable”]

you will have

Switch Hold64 “Hold Sixty Four” { ga="Switch" }

You might need more than that depending on what you are exposing. See the docs for details.

It’s not spelled out in the docs but it seems reasonably straight forward. It inverts the command from Google. So if Google says ON, the Item will be commanded OFF. It is spelled out that it’s an optional parameter.

Thanks. Will removing [Switchable] break Alexa integration?

So i created a test switch:
Switch GoogleTest “Google Test” { ga=“Switch” }

In Paper UI we can see it’s exposed:
image

Back to openhab cloud; no devices:

I can see these entries in the log: Is that that “localhost” maybe? Where does this get updated pointed to the proper spot?

2022-04-05 15:12:01.932 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = xxxxxx, base URL = http://localhost:8080)
2022-04-05 15:12:22.922 [INFO ] [io.openhabcloud.internal.CloudClient] - Shutting down openHAB Cloud service connection
2022-04-05 15:12:22.927 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID =

I have the right URL in the settings:
image

I believe Alexa too has dropped support for tags in favor of Item metadata. In fact, I think Alexa was first to switch to Item metadata.

All you’ll ever see in the Events on myopenhab.org is your openHAB instance connecting and disconnecting. You won’t see your Items or anything else there. The only thing you’ll see that shows that connection was successful is under Applications which will show “Google Assistant Voice Control” and your Google Home app will list a device for each Item you’ve added valid ga metadata to.

FYI, you don’t need to worry about “Items to Expose” in PaperUI. That doesn’t have anything to do with Google Assistant. It’s actually there for integration with IFTTT, which was removed a couple of years ago due to issues it caused the cloud server.

Nothing you do with “Items to Expose” will have any impact on your system or cloud connection, and nothing you do in item configuration will be reflected on that screen. It’s all in the metadata now.

Interesting thanks for the feedback. I’ll retry; i though it used to show your devices that were exposed.

So what “exposes” an item to the cloud?

Your metadata. When you add it to an item, then OH identifies it as something that should be shared to myopenhab so that you can access it via Google Assistant.

The Item metadata. There used to be support to expose Items through the Cloud Connector add-on (there probably still is on that old version of OH) but it has long since been turned off in the cloud server. It was only ever used by IFTTT.

It still exists in OH3’s MainUI, in case someone wants to run their own cloud server. But mostly it just causes confusion for people who assume (quite reasonably) that it’s required for Alexa and Google Assistant.

image

Maybe we should change the caption? If I was to submit an issue to do so, would this be openhab-webui?

Got cha! Thanks!