Personal tools

Telegram

From PhotoVoltaic Logger new generation

Revision as of 17:54, 12 September 2020 by KKoPV (talk | contribs) (Installation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  1. Script to send status messages to a telegram chat

Installation

Location: Scripts repository

Register your bot

https://core.telegram.org/bots#botfather

/newbot

Remember the token given by @BotFather!

Send 1st a test message to your bot via client or web.

This is needed to find out the chat id afterwards with

$ curl -X POST https://api.telegram.org/bot<token>/getUpdates

Find and remember the chat id like this:

{"ok":true,"result":..."chat":{"id":1234567890,...

Usage

# ./telegram.sh token chat message ...
# ./telegram.sh token chat @filename

References