[NEEDS UPDATING] GH Connector (Google Home)

Hi

Automatically register your Google home device to Smartthings by GH Connector.

I think this is similar to the Cast Web API.
So if you are already using it, you will not need this.

Requirement

a. Raspbery pi or Synolgy Nas

Feature

a. WEB UI.
b. TTS
c. Web Server for mp3 file of your Nas
d. Make a virtual device with mp3 playlist

Example




Install

  1. Install an API Sever on docker of raspbery pi or synology nas
  2. Install a Smartapp & DTH on Smartthings IDE
  3. Install a GH Connector Smartapp on the smartthings app.
  4. Set local ip address in the blank.

Raspberry pi

You must install a docker first.

sudo mkdir /docker
sudo mkdir /docker/gh-connector
sudo chown -R pi:pi /docker
docker pull fison67/gh-connector-rasp:0.0.2
docker run -d --restart=always -v /docker/gh-connector:/config -v /yourMp3Folder:/music1 --name=gh-connector-rasp --net=host fison67/gh-connector-rasp:beta
Synology nas

You must install a docker first.

make folder /docker/gh-connector
Run Docker
-> Registery 
-> Search fison67/gh-connector (0.0.2 version)
-> Advanced Settings
-> Volume tab -> folder -> Select gh-connector & Mount path '/config'
-> Volume tab -> folder -> Select MP3 Folder & Mount path '/music1'
-> Network tab -> Check 'use same network as Docker Host'
-> Complete

Hi Chals, thanks again for your superb work on making these device handlers. Sorry to have to bother you again.

I’ve been using your Mi Connector for sometime and it’s excellent. I had previously installed a cast-web device handler but it was running inconsistently as I had struggled to add the Node Js to my raspberry pi so used an android tablet instead. I’ve attempted to install your GH connector and have gotten stuck. When I’ve gone into the app and put the IP address I get taken to a login screen? Not sure what to do here or whether I’ve missed something?

Also not sure whether this is the best place to ask but I’ve attempted several times to use my raspberry pi for other purposes. At the minute I’ve only managed to install Hypriot with the Mi Connector on. Everytime I’ve attempted to install something else, I never seem to manage. Thanks again :slight_smile:

Defualt account
admin / 12345

You have to install a beta DTH.

Thanks for that, I’ve gotten a step further I guess. I can access the SmartApp (to increase the volume, change tracks etc) but none of my devices are being added to my Things list. One did when I first logged in but it crashed the app when you pressed it. Reallly appreciate your help :slight_smile:

You mean that Google Home devices are not added to Smartthings automatically?

Check your st app url, app id, token on the web of gh connector.
If it’s wrong data, it will not do add devices.

Hello Fison, Thank you once again for making this. I have set up everything and it seems to work but i would like to set TTS to google. First TTS didn’t work at all. I went into smarthings and choice my speaker in things than in the setting of that speaker i have selected all the TTS options because if i just select google it wouldn’t save. Says fill out all required fields. So my tts works but with an accent it either is using ODDCAST or Naver i believe. I have correctly set up the google tts and google assistant API. How can i tell the speaker which TTS to use? Any ideas?

This was created for Korean users.
So, there is only one voice option for English users.

I updated a DTH a moment ago.

Naver TTS

  • mijin : Korean, Female
  • jinho : Korean, Male
  • clara : English, Female
  • matt : English, Male
  • jose : Spanish, Male
  • carmen : Spanish, Female

ODDCAST
See this site https://www.ttsdemo.com/
Find a name and add it to DTH
exam)
input name: “ttsPerson”, title:"[ ODDCAST ] Select a Person" , type: “enum”, required: true, options: [“dayoung”, “hyeryun”, “hyuna”, “jihun”, “jimin”, “junwoo”, “narae”, “sena”, “yumi”, “yura”, “alan”, “beth”], defaultValue: “dayoung”, description:""

Google Cloud
You can select a Wavenet if you use a English.
You have to select a language on here first >> [ GOOGLE ] Select a TTS language
W-A means >> en-US-Wavenet-A

Perfect, Everything works like a charm. Thank you.

I can’t get it to work :disappointed_relieved::disappointed_relieved:

I have the MI Connector up and running and it’s amazing.

The GH… It doesn’t add the devices onto the ST but i can see them on the WebGui and control them.

Does the API ID and Client need to be exactly the same as it shows in the OAuth?

It’s same to install mi connector.

When you press a save button on gh connector smartapp,
st info is filled out automatically to gh connector .

In that case it’s working.
I press the save button and the GH connector gets de url, id and token but the devices don’t show up on the ST App

The WebGui finds the devices and i register them but still nothing :confused:

new update.
I think it’s working but it’s still not adding the devices on ST.
on the log i have the following:

7:17:30 PM: error java.lang.NullPointerException: Cannot invoke method toLowerCase() on null object @line 283 (updateDevice)

7:17:29 PM: error java.lang.NullPointerException: Cannot invoke method toLowerCase() on null object @line 283 (updateDevice)

this error is happening every second…
any idea why?

Log from the WebGui shows this error:

[GH-Connector] error: Error: Not Found
at /usr/src/app/app.js:147:13
at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:317:13)
at /usr/src/app/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:335:12)
at next (/usr/src/app/node_modules/express/lib/router/index.js:275:10)
at /usr/src/app/node_modules/express/lib/router/index.js:635:15
at next (/usr/src/app/node_modules/express/lib/router/index.js:260:14)
at Function.handle (/usr/src/app/node_modules/express/lib/router/index.js:174:3)
at router (/usr/src/app/node_modules/express/lib/router/index.js:47:12)

and this one:

(node:23) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added. Use emitter.setMaxListeners() to increase limit

Did you install a docker image 0.0.2 version?

i used the one you had on your git

fison67/gh-connector-rasp:beta

which i just realized now it’s showing fison67/gh-connector-rasp:0.0.2

on another note you haven’t updated the next line

docker run -d --restart=always -v /docker/gh-connector:/config -v /yourMp3Folder:/music1 --name=gh-connector-rasp --net=host fison67/gh-connector-rasp:beta

Assuming it needs to be:

docker run -d --restart=always -v /docker/gh-connector:/config -v /yourMp3Folder:/music1 --name=gh-connector-rasp --net=host fison67/gh-connector-rasp:0.0.2

Hi @fison67
Are you still active on this connector ?
I’m trying to set up your connector but can’t figure it out.
I’m not brilliant on the pi but I’ve got docker running now but it only ever runs hello world if I put sudo in front.
I’ve gone through all your docker installation for the connector and that seemed to go well with no errors.
I’ve installed the smartapp and enabled OAuth as well as the device handlers.
So then when I go to install the smartapp I’m not even 100% sure what my server address is so I put 192.168.0.100:30010 that I saw mentioned somewhere and that seemed to do something.
But then on the next tab “local management” I click that and get a error page.
I’m not sure what I’m meant to do with that code under API so I copied and pasted it into the terminal but I didn’t get anything.
Can you tell me where I’m going wrong.
Thanks

hi,

i tried to pull the docker image “fison67/gh-connector-rasp:0.0.2” and i got the follow error:
Error response from daemon: manifest for fison67/gh-connector-rasp:0.0.2 not found: manifest unknown: manifest unknown

is there any problem with the docker image ?