Skip to content

Spotbot is an application to convert HamAlert alerts from POTA or SOTA in to a message format that can be forwarded on to a Discord channel webhook.

License

Notifications You must be signed in to change notification settings

tblanarik/spotbot

Repository files navigation

spotbot

Description

Spotbot is an application to convert HamAlert alerts from POTA or SOTA in to a message format that can be forwarded on to a Discord channel webhook.

HamAlert Configuration
image
Discord Message
image

Spotbot stores the messageId of the last message posted for each callsign. If that message was posted recently (as defined by LOOKBACK_SECONDS), it will update the message instead of posting a new one to reduce the chatter of the bot.

You can find a live, working version of this bot in the Cascadia Radio Discord server, in the #spots channel. Join us!

Config

The app expects the following environment variables:

  • TARGET_URL - the webhook URL from the target Discord channel.
  • LOOKBACK_SECONDS - the number of seconds to look backwards for previous messages to update instead of posting a new one
  • SECRET_ENDPOINT - the name of the endpoint, kept secret to prevent abuse / unwanted messages
  • ALLOWED_IPS - (optional) comma-separated list of IP addresses allowed to access the secret endpoint. If not set, all IPs are allowed. Example: 192.168.1.1,10.0.0.5
  • MYSQL_HOST
  • MYSQL_USER
  • MYSQL_PASSWORD
  • MYSQL_DATABASE

Deploy Notes

  • Some basic tests run in tests.py on the creation of a new PR
  • To deploy, login to PythonAnywhere and pull the latst from main

About

Spotbot is an application to convert HamAlert alerts from POTA or SOTA in to a message format that can be forwarded on to a Discord channel webhook.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •