Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1015 Bytes

README.md

File metadata and controls

39 lines (32 loc) · 1015 Bytes

mqtt2telegram

Build:

To Build statically linked application:

git clone https://github.com/rburkholder/mqtt2telegram.git
cd mqtt2telegram
mkdir build
cd build
cmake ..
make
cd ..

Configuration File template (change usernames, passwords, and addresses):

$ cat x64/debug/mqtt2telegram.cfg
mqtt_id = reader
mqtt_host = 127.0.0.1
mqtt_username = admin
mqtt_password = password
mqtt_topic = nut

telegram_token = 64713789....
telegram_chat_id = 10

Telegram Messaging

  • BotFather Token - create bot, obtain token
  • populate the telegram_token in choices.cfg
  • start application
  • from your regular telegram account, send some text to the bot to register chat id
  • use menu SendMessage to send a test message to confirm chat id
  • chat id will persist in the state file for next startup
  • in strategy file, to send message: m_fTelegram( "message text" );