Google Home Messages - Send Messages using tts to a Google Home Device. Use this to create events in IFTTT or schedule messages. This is Docker ready or stand alone NPM. I am running this on a Raspberry PI
Google Home Messages is written in Javascript for NodeJS and will install all required packages as needed. This uses TTS to send messages to google home.
nodejs --version
v8.9.3
docker --version
Docker version 17.09.1-ce, build 19e2cf6
Port Forwarding needs to be set up on your netowrk in order to make the calls externally.
git clone https://github.com/biofects/Google-Home-Messages.git
cd Google-Home-Messages
vim config/settings.json
"mytoken" : "CreateAGoodToken",
"lang" : "en",
"speed" : 1,
"port" : 8092,
"debug" : "true"
npm install
npm start
sudo docker build -t <user>/googlehomemessages /path/to/Aapp/Google-Home-Messages/
sudo docker run -p 8092:8092 -d <user>/googlehomemessages
Go to [IFTTT](https://ifttt.com)
For *THIS* I use wifi check.
For *THAT* choose: *Maker Webhooks*
1. Choose *Make a web request*
2. In *URL* enter:
>YOUR_Public_iP/google-home-messages
3. Post with JSON data
4. Body
>{"text":"Hello, From Biofects","ipaddress":"Internal ip of google home","token":"TokenFromSettings"}
Using curl on linux
curl -d '{"text":"Hello, Lee. Have a nice day","ipaddress":"192.168.1.26","token":"hejd%ya83!!"}' -H "Content-Type: application/json" -X POST http://192.168.1.113:8092/google-home-messages
192.168.1.26 will say: Hello, Lee. Have a nice day.
Thank you sepodele [] On windows you need to use double quotes around the json.
Found the solution. In Windows Powershell I have to do this:
curl -d '{\"text\":\"hello\", \"ipaddress\":\"10.0.0.200\", \"token\":\"jabbadabbadu\"}' -H "Content-Type: application/json" -X POST http://10.0.0.5:8092/google-home-messages
And in cmd.exe I have to do this:
curl -d "{\"text\":\"hello\", \"ipaddress\":\"10.0.0.200\", \"token\":\"jabbadabbadu\"}" -H "Content-Type: application/json" -X POST http://10.0.0.5:8092/google-home-messages
Note the single quotes vs double quotes. Stupid Windows..
- Lee Thompson - Initial work
This project is licensed under the MIT License - see the LICENSE.md file for details