Telegram bot for Nightscout
90
Requirements:
NightscoutURL/api/v2/authorization/request/ page.NigtscoutURL/admin. The token must have read access.Create a directory /opt/tg_bot_nigtscout and place the config.yaml file in it. Change the contents of the file to suit your data:
botToken: 'YOUR_TELEGRAM_BOT_TOKEN' # Telegram bot token
nightscoutUrl: 'YOUR_NIGHTSCOUT_URL' # URL of your Nightscout instance
nightscoutToken: 'YOUR_NIGTSCOUT_TOKEN' # Token received on the administration page 'nigscoutUrl/admin'
chatIds: # List of chat IDs to send messages to
- 'CHAT_ID_1'
- 'CHAT_ID_2'
language: 'en' # Current language (en, ru)
units: 'mmol/L' # Units for blood sugar measurement (mmol/L or mg/dL)
# Available language options:
# en - English
# ru - Russian
# Available units options:
# mmol/L - Millimoles per liter
# mg/dL - Milligrams per deciliter
Pull the image from the repository: docker pull sarus780/tg_bot_nightscout:1.0.1
Tag as you like: docker tag sarus780/tg_bot_nightscout:1.0.1 tg_bot
Run the image with the mount option: docker run -d -v /opt/nightscout-tgbot/config.yaml:/opt/nightscout-tgbot/config.yaml tg_bot
Make sure the container is running: docker ps
Now that everything is fine with our container, we can go to the telegram bot and manage it.
Use the commands: /start to start receiving hourly blood glucose updates, /admin to manage your mailing list, /sugar to get current blood glucose readings.
You can also use the project in docker-compose.yaml
tgbot:
image: sarus780/tg_bot_nightscout:1.0.1
container_name: 'tg_bot'
volumes:
- '/var/data/docker/nightscout/tg_bot_nightscout/config.yaml:/opt/tg_bot_nightscout/config.yaml'
restart: always
depends_on:
- nightscout
logging: *default-logging
Content type
Image
Digest
sha256:857edabcc…
Size
116.6 MB
Last updated
over 1 year ago
docker pull sarus780/tg_bot_nightscout:1.0.1