Turn on/off TV by GoogleHome (Using HDMI-CEC & RaspberryPi & Firebase)
Turn on/off TV or change to HDMI 1,2 Ch using Google Home. I use HDMI-CEC(cec-client) on Raspberry Pi, it is implemented Node.js. Also I use Firebase Realtime Database for connection of Google Home and RaspberryPi. Useful control of TV.
- Raspberry Pi (Raspian)
- Node.js v9
- npm packages
- cec-client
- forever
- Setup Firebase Realtime Database.
- Make
firebase.config.js
and write Firebase Snippets. - (Optional) Make
auth.config.js
and write Firebase Authentication's Information. (Email & Password) - Make IFTTT Applet.
this
is Google Assistant,that
is Webhook which url is Firebase's URL. - Exec
forever start index.js
on Raspberry Pi.
Login Raspberry Pi. $ sudo apt-get install -y node.js npm $ npm i -g n forever $ n stable $ sudo apt-get purge -y node.js npm $ ln -sf /usr/local/bin/node.js /usr/bin/ (Also npm)