SmartThings Community

Google Home Notifier

Someone just created a Google Home Notifier in NodeJS. I’m not a dev so I can’t port it to a device handler/smartapp but if someone out there is a dev and has a Google Home and would like to port this it would be great. This allows to push notifications from Smartthings to Google Home so it could announce on Google Home when alarm is on or when a door open etc… Here is the link for the Github of the Nodejs https://github.com/noelportugal/google-home-notifier

Please reply back here if you build and wants people to give it a try.

7 Likes

I’ve looked it only briefly, but my take so far is that I don’t think it’s possible to make it work without another device (in addition the the SmartThings hub and the chromecast) on the network. That’s because it appears that one needs https for communicating with the chromecast, and I believe that the local SmartThings HubAction does not support https.

1 Like

I think you can use http. Here is the home assistant TTS API. It mentions an if you are using SSL so i believe you can do http. https://home-assistant.io/components/tts/

1 Like

If there is anyway this could be incorporated into a smart app somehow I would be the happiest little boy this new year.

2 Likes

I bought today a Raspberry Pi and installed the NodeJS service into it. Now I can make HTTP POST to the service listener and it will make Google Home speak what I want. I can use http just like that curl -X POST -d “text=Hello Google Home” http://localip:8080/google-home-notifier

2 Likes

I’m going to try and set this up in the next day or two. CoRE is capable of making web requests, so in theory it should be able to send a POST request to your node server when doors open and stuff like that. If I get it going I’ll post some examples.

3 Likes

Holy dependencies Batman! Tried to install, got errors, been downloading Python, updated Visual Studio and SDK packages for the last hour.

1 Like

Got an error for missing windows SDK 8.1. I’m running Windows 10. Downloaded the windows 10 SDK instead, still getting the same error. I give up.

It installed great on a Raspberry Pi. Installed CoRE on Smartthings and learned how to us the http POST in a way that works with the notifier. Everything working well.

You need to set the POST as a FORM and initialize a variable called text
Set the value you want for text on initialization and it will work just fine.

I can’t get the google-home-notifier node app installed, getting errors. Oh well.

Installed 8.1 SDK and now getting a different error about Visual Studio.

1 Like

I recommend you to buy a cheap Raspberry Pi. It cost $40, you can use it dedicated for this and other things, little power consumption. Its a perfect solution.

1 Like

Eh, I dunno if it’s worth it for me. I’m interested but not worth $40 at this point.

I got past the last error now on to another one.

So far, I’ve had to install and/or upgrade Node, Visual Studio, Visual C++, .NET, Python, Windwos SDK, and Apple Bonjour. I don’t know why I’m still working on this, lol.

So I actually think it’s possible to make this work via the cloud with some hackery, without the need for a local device like a raspberry pi. I’m pretty sure it’ll still require a cloud-hosted app as an intermediary, since the new chromecast protocol requires a websocket for communication, and smartapps don’t provide that. And it requires setting up port forwarding on your router.

On a regular chromecast, where the old protocol still works (at least for youtube), I think it’s possible to control that entirely locally with the smartthings hub. But it looks like chromecast audio and google home only support the new protocol.

I’ll probably play around with making this work – if only I had more time…

1 Like

I already have a local web server set up to run my TP-Link HS-100 plugs and to act as a gateway for my AlexaHarmonyApp, both on node.js. I have no idea why this google-home-notifier needs so many dependencies. I’m getting an error about missing dns_sd.h header file. According to my searching this should be solved by installing Bonjour SDK, but I did that and still getting the error. I found the dns_sd.h file in the Bonjour folder but I’m not sure why it’s not being found. This is one of 5 errors that I’ve had to work through, each requiring some different program to be installed. Not worth the time I’ve spent on it so far. Every time I work through one error there’s another one waiting for me.

Rebooted and finally got it to install, but with warnings.

When I try to run the example.js I get an ngrok error. Never used ngrok, no idea what it is. I’m done for tonight, might try some more tomorrow.

1 Like

Just bit the bullet and ordered a pi. Tired of fighting windows. Should be here Saturday. I love Amazon Prime :slight_smile:

there is a simple way to have notification sent through GH.

I’m using a nexus 7 2013 tablet with tasker, autocast and sharptools to have various notification sent through GH.

btw: the autocast pugin with voice is now live in google play so don’t need to dld the beta version.

4 Likes

Got my RPi, still having troubles with Google Home Notifier. Was able to get it installed but now having errors when trying to send a POST request.