Python3 script to observe or control your Coda daemon.
- Running script to observe (not control) coda daemon
- Auto control coda daemon:
- restart after too long synchronization (if status gets stuck at Bootstrap, Catchup, Listening, Offline)
- stop and start snark worker depend on proposal time
- start after crash
- runtime config updating (no need to stop script to edit values in settings.conf)
- Control coda daemon from telegram:
- stop daemon
- get balance
- send coda
- Send notifications to telegram bot
- Sending new crash reports to telegram bot
sudo apt install curl -y
sudo apt install screen -y
pip3 install python-telegram-bot --upgrade
From source
git clone https://github.com/spdd/codas.gitOpen settins.conf file and fill CodaParams section.
~$ python3 codas.py -h
usage: codas.py [-h] [-o] [-r] [-m MESSENGER]
optional arguments:
-h, --help show this help message and exit
-o, --disable_observe
Observe coda daemon, but not restart or stop
-r, --send_report Send crash reports to messengers
-t, --insecure_rest Open to everyone graphql rest server not just
localhost
-m MESSENGER, --messenger MESSENGER
Use to send notifications to messengers
Usage examples:
Run script to observe coda daemon and send notifications and crash reports to telegram
~$ python3 codas.py --send_report -m telegram
Run to control coda daemon from script (start, stop) and send notifications and crash reports to telegram
~$ python3 codas.py --disable_observe --send_report -m telegram
You will get something like that:

- Find in Telegram @BotFather
- Start conversation /start
- Enter /newbot
- Get YOUR_BOT_TOKEN
- Start conversation with your new bot
- Send a dummy message to the bot.
- Go to following url https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
- Find for "chat":{"id":<YOUR_BOT_CHAT_ID>...
Open settins.conf file and fill Telegram section:
token = <YOUR_TOKEN>
chat_id = <YOUR_CHAT_ID>
