×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Ekos remote notifications

  • Posts: 4
  • Thank you received: 1
Hello friends,

I have a telescope running all night in the backyard while I'm in the house.
How can I be notified if something bad happens?

For example, today my camera decided to be a potato and stopped talking to indi. After turning it off and on again 10 times, it worked again.
Grafana has an option of sending alerts to a Telegram chat.
Ekos supports only standard KDE notification options:
* Sound (can't hear, I'm in the house)
* message popup (can't see, the scope is controlled by a rpi)
* log to a file (promising)
* taskbar (useless)
* run command (very promising)
* speech (can't hear)

I saw a post where someone made a tiny email client. I don't check email that often.

Any other ideas what a remote notification can be?

Anyway, assuming I really want to be notified via Telegram:
Option 1: Add Telegram support to KDE
Don't even know where to start

Option 2: Log to a file
Make a daemon that forwards changes to the file to a telegram chat

Option 3: Run a command forwarding notifications to a telegram chat

Option 4 (No coding required): Grafana
Log notifications to a file
Configure Prometheus to ingest those notifications
Configure Grafana to send those notifications to a telegram chat
3 years 1 month ago #67795

Please Log in or Create an account to join the conversation.

Welcome to the forums. It might be best to raise this issue on the KDE level. Adding another backend for notifications in KStars is going to be a very complex process.
3 years 1 month ago #67796

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 1

Replied by orfest on topic Ekos remote notifications

Made a simple script posting notifications to a telegram chat with a bot:
curl -s "api.telegram.org/bot${API_KEY}/sendMessa...d=${CHAT_ID}&text=$1"
And made a second bot for bad news, such as capture failures. Will set a unique ringtone for the second bot, and disable notifications for the first bot.
Configured this as a "Run command" notification, by doing lots of clicking and typing in the "Configure Notifications" menu :)

The only issue is that "Run command" doesn't accept parameters. "Capture failure" notification is self-evident, but I I'd like to provide a bit of context to notifications like "INDI Server Message".

Maybe I should parse indi and ekos logs...
The following user(s) said Thank You: jiberjaber
Last edit: 3 years 1 month ago by orfest.
3 years 1 month ago #67801

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 1

Replied by orfest on topic Ekos remote notifications

It will be so much easier if Ekos can provide monitoring data to Prometheus. Then I can set any kind of alerting I want.
Capture successful - increment a counter "capture_count job="$JOB_NAME" successful=true"
Capture failed - increment a counter "capture_count job="$JOB_NAME" successful=false"
3 years 1 month ago #67814

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 1

Replied by orfest on topic Ekos remote notifications

grok_exporter is the way to extract metrics from unstructured logs: github.com/fstab/grok_exporter/blob/release/CONFIG.md
It supports glob patterns in file names but not in directory names.
KStars creates directories daily, for example my latest log file is ~/.local/share/kstars/logs/2021-02-25/log_20-59-31.txt
Wonder how to workaround that.
3 years 1 month ago #67815

Please Log in or Create an account to join the conversation.

Time to create page: 0.694 seconds