Smarter Telegram bot

Hey all,

I’ve been using voyager for roughly 6 months so far, and I love it a lot! Especially the telegram message support in dragscript, makes my life much easier to track the progress, without having to sit in front of my computer all night.

However, I also find that the capability / flexibility of the telegram bot is … a bit limited. So I wrote something with my friend Kun, and would like to share that with you all as well.

Our project can be found on github:

This simple python program behaves as a standard web dashboard client, and it listens to all the updates it receives, including the new images and all kinds of logs and updates, then it forwards some important ones to telegram, so that you can get real time alerts.
Screenshots always explains it self better than words:

The major benefit of this bot is:

  • You don’t have to keep your browser open all the time any more
  • It generates nice stats charts of for each sequence running in the drag script
  • It filters log messages, and only informs you about the critical ones

This project is still at early stage, and I hope you find it interesting and try it out :smiley:

Any suggestions or pull requests are highly appreciated!



I can only upload one picture at a time…

This is a screenshot of ‘error message’ – much easier to find, and not too spammy either

Each exposure will have their own preview saved to telegram too – no compression is done to preserve the quality.


This is fantastic! Very cool. I’ll be eager to try it out.


1 Like

Fantastic Liuyi and Kun… thank you so much for sharing with us. This show power of Application Server in Voyager. I’m sure you have started a big thing !!

You have all my support about, if you need something to add to the Voyager Application Server let me know.

All the best

Thanks Leo and Gabe! I’m thrilled to know that you all found this bot interesting!
I’m planning to make this project more mature and easier to use (without asking user to get a CS degree in advance XD)

1 Like

Some info for our users on how to download install and run the bot ?

Fantastic Job ,Liuyisun. Very great Idea.
I tried to run it on the simulator and works very fine.
Just let me report a missing behaviour at end of sequence:
when the sequence finished, the statistics report a less cumulative exposure time for the B filter, just missing (?) the last shot,


may be because the “end of sequence” arrive just a little bit before the last shot message.

I’ve just another issue: Authentication is not working properly, ( even if I configure the correct user/pass strings in the config.ylm file), so I’was forced to change in voyager the authoriazation level to “None” , but probably is my error ! Still investigating and I’ll let you know.

BTW, thanks a lot for sharing.


Hey Fabrizio!
Thanks a lot for trying out our bot!

The inaccurate sequence is probably due to the fact that we are waiting for ‘NewJPGReady’ event, which can take a while (10-20 seconds in my case). Maybe we can use some other signals in the logs to determine this. – Just filed an issue on my project myself (sequence stats might miss some shots · Issue #12 · sly9/VoyagerTelegramBot · GitHub)

Authentication was just implemented during the weekend, so if you pull the latest build, it might just work now. I only implemented the username/password based authentication, as I haven’t used the ticket based authentication yet…

P.S., we wrote a simple README for everyone to try it out.

P.S. 2: we updated the chart and drew scatter plot of the guiding errors too. Now if your bot is an administrator of the group, your bot will pin the stats chart, and update it with every shot.

P.S. 3: please file issues at Issues · sly9/VoyagerTelegramBot · GitHub, so that we know what’s the most wanted feature :smiley:


yup! just did that: VoyagerTelegramBot/ at main · sly9/VoyagerTelegramBot · GitHub
, and we will investigate some easier ways to distribute this – maybe using py2exe/pyinstaller.

1 Like

Good morning and thanks to all of you for the wonderful work.
I have a little problem:
Currently the application is giving me this error:
Invalid Literal for int () in base 10: ‘’
Can you help me solve it?
Thanks for the assistance.

Fabio, more info when this happens and a screenshot ?!
Are you sure you have configured well the yaml file ?

Dear Leo,
This is my screenshot.
I think I have configured it well, but I may have something wrong that I currently do not see.
It seems that the value of the port is not recognized as int ()
What do you think?

Fabio , you must remove the < and > chars on all parameters !! and put only the value.
<> are used to indentify a user customized parameter

Thank you dear Leo, I made a mistake due to my inexperience.

1 Like

I go back to writing on this post as I am installing the script (beautiful !!)
I need to ask two questions:
a) in the requirements.txt the use of yaml ~ = 0.2.5 is specified, but it is no longer in the repositories. Searching on google offers the installation of pyyaml. It’s the same thing?
b) on my bot, no jpg never appears and only WARNING messages and the sequence start / end one are indicated. What can I set to have a situation similar to that seen in your jpg?
Thanks to all of you for your help and sorry for my problems, I haven’t done so many things with py.

Hey Fabio,

Thanks for noticing this, it’s a bug in our requirement.txt – we only need pyyaml, and I just removed that unnecessary dependency.

Now you should be able to install all dependency on windows by running:

pip3 install -r requirements.txt

Just created a new bat file to make things slightly easier:


If you have python installed and config files configured properly, double clicking on the bat file will start the bot.

If python is not installed, it will bring you to windows store and ask you to install it.
If the config file is not present, it will also ask you to make a copy of it…

Dear Lision
Thank you for your answer.
Python is installed and the program starts correctly, that’s not my problem.
My problem is that in the chat I only see warning messages (example, autoguiding problems) and start and end session messages. No images are shown, when a shot is taken nothing is forwarded and I cannot understand why.
As you can see and from the screenshot the session starts at 18.34 (test session of a few minutes), the images of the sequence were taken via voyager but not forwarded to my telegram.
Thanks for the assistance.