You can now fetch and view the stats of a live running aprsd server
if it has enabled the rpc server in the config file's rpc_settings
block.
You just have to match the magic word as specified in the config file to
authorize against the rpc server.
aprsd fetch-stats --ip-address <ip of aprsd> --port <port> --magic-word
<magic word>
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 refactors the cli to incorporate
the dev, send-message, listen commands into the main aprsd app.
This also moves the command line completion installer/show into
it's own subgroup.
This patch fixes a problem with the packets object
not being initialized correctly for the send-message command
from the command line.
Also adds the --wait-response option for send-message, which by
default is now False
This patch initializes all of the MsgTrack, WatchList and SeenList
prior to the plugins loading. Some plugins may kick off messages
being sent immediately. So everything has to be ready to go
prior to the plugins being loaded.
This patch adds the new objectstore Mixin class that enables
classes that store their date in self.data as a serializeable dict,
to be able to be stored to disk at shutdown and loaded at startup.
The SeenList and WatchList are now saved/loaded to/from disk.
This patch completely refactors and simplifies how the clients
are created and used. There is no need now to have a separate
KISSRXThread. Since all the custom work for the KISS client is
encapsulated in the kiss client itself, the same RX thread and
callback mechanism works for both the APRSIS client and KISS Client
objects. There is also no need to determine which transport
(aprsis vs kiss) is being used at runtime by any of the messages
objects. The same API works for both APRSIS and KISS Client objects
This patch adds a live view of the aprsd logfile in
the admin ui. This uses a new Log QueueHandler and the
threads.logging_queue to push log entries into a queue.
The flask websockets server will push those log entries up
to a connected client browser.
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.
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 select timeouts for threads. This allows
threads to exit quicker when user hits CTRL-C.
Updates the KeepAlive Thread to include total packets.
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 the dumping out of a flattened config to the log
at startup. This is helpful for seeing what aprsd server is actually
using for config entries at startup and since it's in the log, you can
reference it.
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 the aprsd-lnav.json formatting file.
This is useful when you want to tail the logfile with the lnav
log tailing app.
http://lnav.org/
To install the aprsd-lnav.json formatter
1) install lnav
2) lnav -i aprsd-lnav.json
3) lnav -C -- just to test it out
The next time you launch aprsd do it with this
aprsd server --loglevel DEBUG | lnav
This patch also updates the logging output from the flask
web service to 1) disable flask web url logging and 2)
use the same output format as the rest of the app.
This patch moves the default log format string and date format string
to the config file, so users can format the logs as they see fit.
The default log format also includes the file and line number that
posted the log entry.
The new entries in the config are here:
aprsd:
logformat: "String here"
dateformat: "string here"
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 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 a new add_config_comments() function in utils.py
that allows you to insert a comment string in a raw_yaml string
that's already been created from the yaml.dump() call.