Telegram Client
You can receive the notification images (image with classification or detection results) in your Telegram app.
-
Create Your Telegram Bot and Get Its Access Token.
- Install a Telegram app on your mobile or desktop.
- Search
@botfather
and start a conversation. - Send
/newbot
. - Enter the bot nameļ¼the end of the name has to be
bot
. E.g.,bntest1_bot
. -
BotFather will sends a message including:
- Bot link: You can start a conversation with the bot by clicking the link.
- HTTP API Token (Access Token): Write down the token. It is necessary to run the BerryNet Telegram client.
-
Get The Chat ID (skip the step currently).
- Send a message to the bot.
- Open the URL
https://api.telegram.org/bot<yourtoken>/getUpdates
. - You will find the chat ID in the returned data.
-
Run BerryNet Telegram Client.
$ bn_telegram --token <token>
The token parameter can be a token string or a token filepath:
- Token string
- Example:
1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi
- Example:
- The filepath of the configuration file
- Any filepath is okay and we suggest
$HOME/.config/berrynet/telegram.json
. - Configuration file format
$ cat $HOME/.config/berrynet/telegram.json { "token": "<telegram-token>" }
- Any filepath is okay and we suggest
Note:
bn_telegram
is not in the latest system image. You can download the source code and runpython3 telegram_bot.py ...
before we update the system image. - Token string
-
Send
/camera
to your bot.If you receive the message:
Dear, I am ready to help send notification
You will receive notification images in your mobile/desktop Telegram app.