Control TV with Telegram

Read the title. You'll also need to put this script in your home folder.

[{"id":"da0cc9fc.6b5588","type":"tab","label":"TV on/off 2.0","disabled":false,"info":""},{"id":"aaef689e.5285e8","type":"telegram command","z":"da0cc9fc.6b5588","name":"cmd on","command":"/on","bot":"bcf14af4.2305c8","x":62,"y":74,"wires":[["178b2165.41aeaf","9a5da29e.94749"],[]]},{"id":"9a5da29e.94749","type":"exec","z":"da0cc9fc.6b5588","command":"~/tv.sh on","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Control TV","x":320,"y":88.5,"wires":[["f7695e07.a730a"],["f7695e07.a730a"],["f7695e07.a730a"]]},{"id":"178b2165.41aeaf","type":"debug","z":"da0cc9fc.6b5588","name":"","active":true,"console":"false","complete":"false","x":316,"y":24,"wires":[]},{"id":"f7695e07.a730a","type":"debug","z":"da0cc9fc.6b5588","name":"","active":true,"console":"false","complete":"false","x":498,"y":90,"wires":[]},{"id":"eb89c78e.c8c3a8","type":"telegram command","z":"da0cc9fc.6b5588","name":"cmd off","command":"/off","bot":"bcf14af4.2305c8","x":64,"y":215,"wires":[["a4fe758.4a5e088","8bfc9f85.93e"],[]]},{"id":"8bfc9f85.93e","type":"exec","z":"da0cc9fc.6b5588","command":"~/tv.sh off","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Control TV","x":332,"y":218.5,"wires":[["365cb0c.b33725"],["365cb0c.b33725"],["365cb0c.b33725"]]},{"id":"a4fe758.4a5e088","type":"debug","z":"da0cc9fc.6b5588","name":"","active":true,"console":"false","complete":"false","x":336,"y":174,"wires":[]},{"id":"365cb0c.b33725","type":"debug","z":"da0cc9fc.6b5588","name":"","active":true,"console":"false","complete":"false","x":523,"y":220,"wires":[]},{"id":"2324967e.967d8a","type":"telegram command","z":"da0cc9fc.6b5588","name":"cmd on (thru group)","command":"/[email protected]","bot":"bcf14af4.2305c8","x":101,"y":123,"wires":[["9a5da29e.94749","178b2165.41aeaf"],[]]},{"id":"5dd0231e.4540ec","type":"telegram command","z":"da0cc9fc.6b5588","name":"cmd on (thru group)","command":"/[email protected]","bot":"bcf14af4.2305c8","x":102,"y":262,"wires":[["8bfc9f85.93e","a4fe758.4a5e088"],[]]},{"id":"bd4f284d.a3ed68","type":"comment","z":"da0cc9fc.6b5588","name":"Important Instructions","info":"Make sure all of the Telegram nodesare set to the correct bot. For the cmd on/off (thru group) nodes, make sure to change the commands to /[email protected][bot username] and /[email protected][bot username].<br> Also, change the command in the Control TV nodes if you need to.","x":114,"y":306,"wires":[]},{"id":"bcf14af4.2305c8","type":"telegram bot","z":"","botname":"TV Power","usernames":"","chatids":""}]
bhargavgv

Flow Info

created 10 months, 2 weeks ago

Node Types

Core
  • comment (x1)
  • debug (x4)
  • exec (x2)
Other

Tags

  • telegram
  • cec
  • bash
  • ifttt
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option