Node-RED - with Google Home

From The TinkerNet Wiki
Revision as of 13:06, 7 June 2020 by Tinker (talk | contribs) (→‎Part C)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Output

First trick

Part A

Install the following

Part B

Import this flow

[{"id":"8d948ca5.ab84f8","type":"googlehome-notify","z":"5ca2e6d2.39d96","server":"5ed2920b.6dfdb4","name":"","x":545.5,"y":203,"wires":[]},{"id":"dd41e12c.e00aa8","type":"inject","z":"5ca2e6d2.39d96","name":"","topic":"","payload":"Fuck Me!  It works","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220.5,"y":105,"wires":"8d948ca5.ab84f8"},{"id":"5ed2920b.6dfdb4","type":"googlehome-config-node","z":"","ipaddress":"samgh","language":"en"}]

Go in & change the "samgh" to the address of YOUR GH mini...

You can build this from scratch by dragging a "googlehome-notify" node & an "inject" node into an empty flow, linking them together & configuring them...

Part C

Import this flow

[{"id":"7524c54b.dd3804","type":"inject","z":"28d6a73.3f5ae58","name":"After Dark","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"00 22 * * *","once":false,"onceDelay":"","x":110.00001525878906,"y":436,"wires":"205d5152.32f016"},{"id":"205d5152.32f016","type":"function","z":"28d6a73.3f5ae58","name":"Disclaimer","func":"msg.payload = 'Disclaimer:';\nmsg.payload += 'Youre on IRC After Dark!';\nmsg.payload += 'This channel is now Not Safe For Work (NSFW) and may contain subject matter unsuitable for children and some adults.';\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":310.00001525878906,"y":436,"wires":"c81e579c.6dc7f"}]

and link its output to the "googlehome-notify" node you added before.

Second Trick

Part A

Install the following

  • node-red-dashboard

Some dashboard info

Part B

(working on this part...)

Import this flow

[{"id":"4b3df2d9.6ff69c","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":1,"width":"2","height":"2","passthru":false,"label":"1","color":"","bgcolor":"","icon":"","payload":"\"Fucking Retard\"","payloadType":"str","topic":"Keypad","x":86.5,"y":354,"wires":"8d948ca5.ab84f8"},{"id":"6b2307b2.203338","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":4,"width":"2","height":"2","passthru":false,"label":"4","color":"","bgcolor":"","icon":"","payload":"Idjit","payloadType":"str","topic":"","x":84.5,"y":407,"wires":"8d948ca5.ab84f8"},{"id":"d7398bca.ce5f68","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":7,"width":"2","height":"2","passthru":false,"label":"7","color":"","bgcolor":"","icon":"","payload":"Bull Shit!","payloadType":"str","topic":"","x":84.5,"y":457,"wires":"8d948ca5.ab84f8"},{"id":"48d4fe0.0229584","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":10,"width":"2","height":"2","passthru":false,"label":"*","color":"","bgcolor":"red","icon":"","payload":"","payloadType":"str","topic":"","x":80.5,"y":513,"wires":"8d948ca5.ab84f8"},{"id":"5059cf69.41ba9","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":2,"width":"2","height":"2","passthru":false,"label":"2","color":"","bgcolor":"","icon":"","payload":"Well... Shit!","payloadType":"str","topic":"","x":234.5,"y":362,"wires":"8d948ca5.ab84f8"},{"id":"c45acb82.7a4fb","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":5,"width":"2","height":"2","passthru":false,"label":"5","color":"","bgcolor":"","icon":"","payload":"Bloody Hell!","payloadType":"str","topic":"","x":236.5,"y":409,"wires":"8d948ca5.ab84f8"},{"id":"41ecd180.d8dd4","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":8,"width":"2","height":"2","passthru":false,"label":"8","color":"","bgcolor":"","icon":"","payload":"Oh Poop","payloadType":"str","topic":"","x":236.5,"y":459,"wires":"8d948ca5.ab84f8"},{"id":"3df6adfd.22ae6a","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":11,"width":"2","height":"2","passthru":false,"label":"0","color":"","bgcolor":"","icon":"","payload":"dang","payloadType":"str","topic":"","x":234.5,"y":514,"wires":"8d948ca5.ab84f8"},{"id":"be1cfa06.f8eb5","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":3,"width":"2","height":"2","passthru":false,"label":"3","color":"","bgcolor":"","icon":"","payload":"woot woot","payloadType":"str","topic":"","x":386.5,"y":360,"wires":"8d948ca5.ab84f8"},{"id":"833ce2bf.c41fe8","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":6,"width":"2","height":"2","passthru":false,"label":"6","color":"","bgcolor":"","icon":"","payload":"yee ha","payloadType":"str","topic":"","x":384.5,"y":418,"wires":"8d948ca5.ab84f8"},{"id":"bfaba114.c0e85","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":9,"width":"2","height":"2","passthru":false,"label":"9","color":"","bgcolor":"","icon":"","payload":"Ooga Booga","payloadType":"str","topic":"","x":384.5,"y":469,"wires":"8d948ca5.ab84f8"},{"id":"9395bb92.22eb78","type":"ui_button","z":"5ca2e6d2.39d96","name":"","group":"a5f75611.072518","order":12,"width":"2","height":"2","passthru":false,"label":"#","color":"","bgcolor":"red","icon":"","payload":"","payloadType":"str","topic":"","x":384.5,"y":521,"wires":"8d948ca5.ab84f8"},{"id":"a5f75611.072518","type":"ui_group","z":"","name":"Keypad","tab":"f1f2c83e.7ca4d8","disp":true,"width":"6","collapse":false},{"id":"f1f2c83e.7ca4d8","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]

and link each buttons output to the "googlehome-notify" node you added before.

then (after deploying...) open a web browser to YourServer:1880/ui

Part C

Import this flow

WTF

You will need to do a little tweaking to work it into your own stuff...

Second & a Half Trick

Part A

Drag a "Link" node in from the "input" category, attach it to your "googlehome-notify" node & give it a name.

Now, any time you want to hook something to the Google Home, you can drag in a "Link" node from the "output" category.

This makes things a lot neater & also works across flows.

Part B

Import this flow

WTF

and edit the output "link" to connect to the input "link" to your Google Home.

Input

First trick

Install the following

  • node-red-contrib-nora

Follow the instructions here to get started.

Troubleshooting

Google Home responds with "Nora is not reachable"

github: Google Home Mini - Nora is not available #37