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
Added geopy as a dependency for the location plugin.
The us weather service API is now broken upstream.
Reworked the requirements.txt and dev-requirements.txt files
This patch adds basic ratelimiting to sending out AckPackets
and non AckPackets. This provides a basic way to prevent
aprsd from sending out packets as fast as possible, which isn't
great for a bandwidth limited network.
This patch also adds some keepalive checks to all threads in the
threadslist as well as the network client objects (apris, kiss)
This patch introduces rpyc based RPC client/server for
the flask web interface to call into the running aprsd server
command to fetch stats, logs, etc to send to the browser.
This allows running the web interface via gunicorn command
gunicorn -k gevent --reload --threads 10 -w 1 aprsd.flask:app --log-level DEBUG
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 device detector was taking 1 minute on a raspi to parse out the
user-agent string from the browser. user-agents takes 2 seconds,
which still isn't great, but 'doable' for the webchat interface.
This patch reworks the KISS client to get rid of
aioax25 as it was too difficult to work with due to
heavy use of asyncio.
Switched to the kiss3 pypi library.
This patch updates the ouput of the list-plugins command.
This also adds the ability to show the available plugins
to install that are published packages on pypi.org.
This also shows the list of installed packages from pypi.org
The python rich library is extensive and has a really nice
log format that is easier to read and has built in formatting
and coloring of the log output.
To enable rich logging add rich_logging: True in the config file.
This patch adds APRS KISS connectivity. I have tested this with
a running Direwolf install via either a serial KISS connection or
the optional new TCPKISS connection, both to Direwolf.
This adds the new required aioax25 python library for the underlying
KISS and AX25 support.
NOTE: For the TCPKISS connection, this patch requires a pull request
patch the aioax25 library to include a TCP Based KISS TNC client to
enable the TCPKISS client So you will need to pull down this PR
https://github.com/sjlongland/aioax25/pull/7
To enable this,
Edit your aprsd.yml file and enable one of the 2 KISS connections.
Only one is supported at a time.
kiss:
serial:
enabled: True
device: /dev/ttyS1
baudrate: 9600
or
kiss:
tcp:
enabled: True
host: "ip address/hostname of direwolf"
port: "direwolf configured kiss port"
This patch alters the Message object classes to be able to
send messages out via the aprslib socket connection to the APRS-IS
network on the internet, or via the direwolf KISS TCP socket,
depending on the origination of the initial message coming in.
If an APRS message comes in via APRS-IS, then replies will go out
APRS-IS. IF an APRS message comes in via direwolf, then replies
will go out via direwolf KISS TCP socket. Both can work at the same
time.
TODO: I need some real APRS message packets to verify that
the new thread is processing packets correctly through the plugins
and able to send the resulting messages back out to direwolf.
Have a hard coded callsign for now in the kissclient consumer call,
just so I can see messages coming in from direwolf. I dont' have an
APRS capable radio at the moment to send messages directly to direwolf.
Might need to write a simple python socket server to send fake APRS
messages to aprsd kiss, just for finishing up development.
This patch adds usage of update_checker to check to make sure the
version of APRSD being launched is the latest version. Also added a
call to upate_checker as part of the KeepAlive thread. It will
call update_check every hour. If there is no aprsd connectivitity,
the update check will silently fail.
This patch adds 2 items. First it adds the new StockPlugin,
which fetches stock quotes from yahoo finance rest API using
the yfinance python module.
2nd, the web interface contains a new url /plugins, which allows
aprsd to reload all of it's plugins from disk. This is useful for
development where the dev is editing an existing plugin and wants to
run the edited plugin without restarting aprsd itself. The /plugins
url requires admin login credentials.
TODO: would be nice to live reload the aprsd.yml config file, so plugin
reloading can start new plugins defined in aprsd.yml between /plugins
being reloaded.
This patch fixes the CTRL-C signal_handler.
This patch also adds the new Messages WEB UI page
as well as the save url, which are both behind an
http basic auth.
The flask web service now has users in the config file
aprsd:
web:
users:
admin: <password>
This patch adds the stats object to collect statistics of
the running server. This also optionally adds the ability
to run a flask web service on a port to use as a keepalive
healthcheck.
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.
This patch shows how to setup a development environment.
Please use the steps as laid out and install the pre-commit
hooks to ensure the code is clean prior to commit.
This commit adds the new send-message command for sending messages.
This also redoes the logging of sent/rx'd packets to a single method
which is syncrhonized, so we don't get intermixed log messages for
packets.
Also adds email address validation during startup, and
optionally disables the validation via a command line switch. without
email validation for production running aprsd, emails sent can turn up
garbage and cause issues when those emails are received by aprsd
message processing as invalid content.
This branch refactors the majority of main.py out into individual
modules to compartmentalize the code. Migrated all email related
features unti email.py, sending of messages into messaging.py
Also refactored all of the socket code to use aprslib for all APRS-IS
communication as well as message/packet processing.
Moved the email command into it's own Plugin.
This patch reworked the loading of plugins. Python2 is dead.
Previously was using the imp module to easily load the plugins from
a separate directory, which is a bit of a pita. Found a python3 lib
that takes care of the difference between py3.3, 3.4 and 3.5+ module
loading called "thesmuggler"