Skip to content

Rafi594/gladys-telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gladys-telegram

This module allows you to speak with Gladys on your phone with the Telegram App.

Requirements

  • You need Gladys >= 3.5.
  • Your Gladys instance should be exposed to the internet, and be accessible threw HTTPS. (You can activate SSL in Gladys using the enable-ssl.sh script on Gladys Raspbian image) because Telegram is going to contact your Gladys instance using a webhook. If you want to test this module without having all that, I recommend ngrok, it's a program that gives you a temporary HTTPS url accessible from the outside that routes request to your localhost.

Setup

  • Create a bot on Telegram by talking to the @botfather. Say "/start" to the botfather to know what to do.
  • Create a bot using the "/newbot" command in the @botfather conversation. Keep the API_KEY he gave you.
  • Install the gladys-telegram module in Gladys. Do not reboot for the moment !
  • In your Gladys dashboard go to "Parameters" => "Parameters". Create two Gladys parameters : TELEGRAM_API_KEY => your Telegram API key, and TELEGRAM_WEBHOOK_URL => https://YOUR_GLADYS_IP_OR_DOMAIN/telegram.
  • Reboot Gladys
  • Talk to your bot you created.
  • Open Gladys logs (pm2 logs gladys on a Raspberry Pi), you should see : debug: Telegram : Received message on chat ID = XXXXXXXXX, from = "Pierre-Gilles Leymarie" with content = "Hey !"
  • Copy the chat ID and create two Gladys parameters TELEGRAM_CHAT_ID_yourChatId_USER = your user ID in Gladys, and TELEGRAM_USER_yourUserIdInGladys_CHAT_ID = CHAT_ID. This will help Gladys know that this Telegram conversation is your user in Gladys, and that to contact you she will need to talk in this conversation (to speak in both way).
  • You can know talk to Gladys !

About

Gladys module to speak to Gladys on Telegram

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published