Solved: Stuck on "Setup your Database" Section of installing openhab-google-assistant

Hello everyone. I am a complete beginner both in IT generally and openHAB in particular, so apologies in advance. I am trying to install openhab-google-assistant so my speakers etc work with OpenHAB. I am thoroughly stuck on the section from here :

Setup your Database

  • SSH into to your openHAB Cloud instance
  • Open the MongoDB client mongo and enter these commands

From some googling I found that SSHing into the openHAB Cloud instance is not possible, and the help topic I found suggested running your own instance using OpenHAB Cloud, which I have downloaded and have running, but perhaps I have to do something else? The help topic I found is Google Assistant setup help

I have no idea what to do with the MongoDB line though. I installed “MongoDB Compass” from their website, and the MongoDB Persistence from OpenHAB addons, but in neither can I see anywhere to add the lines of code it says to add:

use openhab
db.oauth2clients.insert({ clientId: "<CLIENT-ID>", clientSecret: "<CLIENT SECRET>"})
db.oauth2scopes.insert({ name: "any"})
db.oauth2scopes.insert( { name : "google-assistant", description: "Access to openHAB Cloud specific API for Actions on Google Assistant", } )

I have tried using the windows command line, but “mongo”, “mongosh”, “mongodb” have this error message,

“‘mongosh’ is not recognized as an internal or external command, operable program or batch file.”

even when I am in the correct directory and have added it to “path”.

I’m out of ideas and have been stuck on this for a few days now - I suspect I’m missing or misunderstanding something basic. Can anyone help at all please?

I am using Windows 11 Desktop, and openHAB 4.2.2 on the UI version. Other help topics I have found either don’t have answers or seem (to my beginner eyes!) to be about separate problems. Sorry, it won’t let me add more than two links. Thank you everyone in advance!

Those instructions are for when you are running your own Cloud Server. If you are “a complete beginner” in IT and OH, running your own Cloud Server is probably a bad idea.

Just use the OH Foundation provided instance of the Cloud Server. openHAB Cloud Connector - System Integrations | openHAB.

Once you’ve set that up follow the instructions at https://www.openhab.org/docs/ecosystem/google-assistant/.

It’s all much more straight forward and imposes a whole lot less burden on you to install, maintain, monitor, and protect the cloud server. Your OH instance remains safe behind your firewall.

1 Like

Thank you so much, that looks about a thousand times easier, I didn’t realise there were different ways of doing it: I definitely would rather not be trying to run a Cloud server, considering I just had to Google what one was :person_facepalming: