This is a working bot to control my LG TV. Anyone can use it just by creating a bot and setting these environment variables:
TELEGRAM_BOT_TOKEN
- the bot tokenRESTRICTED_CHAT_ID
- the specific chat id for your chat with the bot. Otherwise anyone can control your TV!TV_IP_ADDRESS
- ip address of the TV
The bot must be able to connect to TV_IP_ADDRESS
. I use a Raspberry Pi inside my local network, and Homebridge, with an iPad as hub.
At this moment, all it can do is change volume and send a toast message to be displayed on the TV.
/vol <integer>
/toast <message>
I live with couch potatoes, so they often ignore their phones. I use this to send a message on the TV to get their attention.