this patch refactors the client, drivers and client factory
to use the same Protocol mechanism used by the stats collector
to construct the proper client to be used according to
the configuration
This patch eliminates the need for a custom
static method on each Packetclass to convert an aprslib
raw decoded dictionary -> correct Packet class.
This now uses the built in dataclasses_json from_dict()
mixin with an override for both the WeatherPacket and
the ThirdPartyPacket.
This patch also adds the TelemetryPacket and adds some
missing members to a few of the classes from test runs
decoding all packets from APRS-IS -> Packet classes.
Also adds some verification for packets in test_packets
this patch removes the need for dacite2 package for creating
packet objects from the aprslib decoded packet dictionary.
moved the factory method from the base Packet object
to the core module.
This patch removed the dependency on flask-classful. This required
making all of the flask web routing non class based.
This patch also changes the aprsis class to allow retries for failed
connections when the aprsis servers are full and not responding to
login requests.
This patch replaces the ratelimiter library with rush for rate limiting
as the ratelimiter package doesn't work with python 3.11.
This patch also refactors the flask.pu to admin_web.py and
aprsd.py to main.py
This patch is the initial conversion of the custom config
and config file yaml format to oslo_config's configuration mechanism.
The resulting config format is now an ini type file.
The default location is ~/.config/aprsd/aprsd.conf
This is a backwards incompatible change. You will have to rebuild
the config file and edit it.
Also any aprsd plugins can now define config options in code and
add an setup.cfg entry_point definition
oslo_config.opts =
foo.conf = foo.conf:list_opts
The APRS_LOGIN and APRS_PASSWORD arguments now fallback
to the config file if it exists.
First it checks the passed in parameters, then checks the
environement vars, then checks the parsed config to find the
login and password.
This patch also adds unit tests for the send-message command to
check the fallback.
This allows the admin interface to see which plugins are registered and
enabled. Enabled is a flag that is set in the setup() method of the
plugin. This gives the plugin developer a chance to disable the plugin
if something isn't right at setup time. This allows aprsd to ignore
plugins that are registered but not emabled.
Since all outbound messages have a send() method that starts
a separate there, there really is no reason for the transmit queue
thread at all. All it did was get a message from the queue and then
call send on it, which would start another thread. This removes that
intermediate TXThread. When you want to send a message just call
send() on the message object.
This patch updates the APRSDPluginBase class to include
standard methods for allowing plugins to create, start, stop
threads that the plugin might need/use. Also update the aprsd-dev
to correctly start the threads and stop them for testing plugin
functionality.
Also added more unit tests and fake objects for unit tests.
This patch refactors how the recieved message processing happens.
We now handle all incoming packets the same. Removed the notification
thread to handle the watchlist packets. This is now done with a
unified plugins architecture that allows different capabilities
via the new plugin structure. All packets sent to us will be
sent through all of the plugins. It's the plugins job to decide what to
do with that packet or ignore it.
Email is no longer a special case for the most part. All email
functions have been migrated to the EmailPlugin, including starting the
EmailThread, which works in the background to check for new emails and
send those to the registered callsign. The EmailPlugin now starts the
EmailThread itself.
All plugins are now build on the new APRSDPluginBase which has a common
set of features. The APRSDPluginBase calls self.setup() upon creation,
which allows all plugins to do whatever they want for initiali startup.
The EmailPlugin uses setup() to start the EmailThread if email is
enabled.
This patch adds a new optional feature called Watch list.
Aprsd will filter IN all aprs packets from a list of callsigns.
APRSD will keep track of the last time a callsign has been seen.
When the configured timeout value has been reached, the next time
a callsign is seen, APRSD will send the next packet from that callsign
through the new notification plugins list.
The new BaseNotifyPlugin is the default core APRSD notify based plugin.
When it gets a packet it will construct a reply message to be sent
to the configured alert callsign to alert them that the seen callsign
is now on the APRS network.
This basically acts as a notification that your watched callsign list is
available on APRS.
The new configuration options:
aprsd:
watch_list:
# The callsign to send a message to once a watch list callsign
# is now seen on APRS-IS
alert_callsign: NOCALL
# The time in seconds to wait for notification.
# The default is 12 hours.
alert_time_seconds: 43200
# The list of callsigns to watch for
callsigns:
- WB4BOR
- KFART
# Enable/disable this feature
enabled: false
# The list of notify based plugins to load for
# processing a new seen packet from a callsign.
enabled_plugins:
- aprsd.plugins.notify.BaseNotifyPlugin
This patch also adds a new section in the Admin UI for showing the
watch list and the age of the last seen packet for each callsing since
APRSD startup.
This patch adds a message counter for each plugin. When the regex for
a plugin passes and the message is pass into the plugin for processing,
that message is tracked. This message count is reported by the stats
tracking object now for the web admin ui.
This patch reorganizes the config file layout and options
to make more logical sense as well as make it more readable.
This breaks backwards compatibility.
This patch adds 2 new time plugins to allow admins to use their
opencagedata APIkey or openweathermap API key to fetch the timezone
from the lat/lon GPS coordinates for the callsign requesting the time.
This will enable fetching the time local to the ham radio's last beacon,
and not time local to the aprsd server instance running. If the
location is not found, then the timezone will default to UTC.
The 2 new plugins are
- aprsd.plugins.time.TimeOpenCageDataPlugin
Fetches timezone from lat/lon using the opencagedata api that can be
found here: https://opencagedata.com/dashboard#api-keys
This requires a new ~/.config/aprsd/aprsd.yml entry to specify the
api key.
opencagedata:
apiKey: <the api key hash here>
- aprsd.plugins.time.TimeOWMPlugin
Fetches the timezone from lat/lon using the openweathermap api
that can be found here: https://home.openweathermap.org/api_keys
This requires a new ~/.config/aprsd/aprsd.yml entry to specify the
api key.
openweathermap:
apiKey: <the api key hash here>
The existing time plugin had a hard coded PDT for pacific timezone,
when it wasn't. This patch adds some real timezone conversion from
utc to the tz of the running aprsd server. This will eventually allow
us to use either the tz of the running aprsd and/or the tz of the
calling callsign if we can just get the tz string from the location
beacon of the caller's callsign.