Commit Graph

597 Commits

Author SHA1 Message Date
Hemna f922b3f97b Added new webchat config section
This patch adds a new webchat config section to specify:
web_ip (the ip address to listen on)
web_port
latitude (latitude to use for the GPS beacon button)
longitude (long to use for the GPS beacon button)
2023-08-22 12:01:34 -04:00
Hemna 8dd3b05bb1 fixed webchat logging.logformat typeoh
This fixes a problem with webchat when specifying the logfile
in aprsd config
2023-08-15 21:49:43 -04:00
Hemna 33c7871dbe Forcefully allow development webchat flask
This patch adds the force werkzeug to allow development environment
to allow aprsd webchat to work from inside of systemd
2023-08-15 17:42:56 -04:00
Hemna ae9e4d31ad Added support for ThirdParty packet types
The kiss clients now detect if the incomming packet is a third party
packet and then sends up the subpacket instead of the encapsulated
packet up to the consumer.
2023-08-15 14:24:03 -04:00
Hemna 65a5a90458 Disable the Send GPS Beacon button
This patch disables the 'Send GPS Beacon' button for the webchat
command if the browser isn't connected over https
2023-08-14 18:45:13 -04:00
Hemna 182887c20a Removed adhoc ssl support in webchat
This immediately breaks the beacon button.
This patch removes the dep for pyopenssl and cryptography
so that aprsd install on the rpi.

Unfortunately in order for the web page to get the Lat/Lon, the
browser must be connected over SSL.  Will have to create a workaround
for this later.
2023-08-14 18:34:25 -04:00
Hemna db9e1d23d1 Fixed pep8 failures 2023-08-07 11:07:01 -04:00
Hemna 986df391b2 re-enable USWeatherPlugin to use mapClick
The old MApClick.php api seems to work...re-enabling
2023-07-31 21:53:02 -04:00
Hemna 9ebf2f9a30 Fix sending packets over KISS interface
The KISS client sends the path as part of the headers, so we had
to strip out the path from the payload of each message so the path
wouldn't get listed twice.
2023-07-28 17:25:06 -04:00
Hemna 011cfc55e1 Use config web_ip for running admin ui from module
When running the web admin interface with
'python -m aprsd.wsgi' the Flask app global now uses
the web_ip config entry for listening.  Also disabled
debug output.
2023-07-26 08:47:22 -04:00
Hemna e0c3c5cbbf remove loop log 2023-07-25 20:45:55 -04:00
Hemna 26f354b3a9 Max out the client reconnect backoff to 5
This patch adjusts the backoff mechanism for aprs client
reconnect to a max backoff sleep of 5 seconds.   This prevents
an exponential backoff when connection retrying.
2023-07-24 17:03:29 -04:00
Hemna c7d629f88a Use CONF.admin.web_port for single launch web admin
This patch changes the non uwsgi launch of the admin page
to use the config for the web port
2023-07-24 09:39:16 -04:00
Hemna 099b87e250 Fixed sio namespace registration 2023-07-23 20:22:48 -04:00
Hemna 4664ead9e7 Fixed pep8 2023-07-23 19:34:02 -04:00
Hemna e51a501544 change port to 8000 2023-07-23 19:19:55 -04:00
Hemna 89576a3c43 replacement of flask-socketio with python-socketio
This patch starts the work to replace flask-socketio with
python-socketio so that uwsgi can be used instead of gunicorn.
uwsgi can support websockets.

Have to rework webchat command next
2023-07-23 18:54:23 -04:00
Hemna 5383b698ea Change how fetch-stats gets it's defaults
The defaults come from the aprsd.conf CONF attributes now.
2023-07-22 17:05:11 -04:00
Hemna cbef93b327 Ensure fetch-stats ip is a string 2023-07-22 16:41:54 -04:00
Hemna 6ae55fc9a1 Add info logging for rpc server calls 2023-07-20 16:43:31 -04:00
Hemna 588e140a7f updated wsgi config default /config/aprsd.conf
This patch changes wsgi.py to default to /config/aprsd.conf

It's assumed that this will be used as a docker container
2023-07-20 15:59:44 -04:00
Hemna d3a93b735d Added timing after each thread loop
This is to help keep track of which non-blocking threads are still
alive.

The RPC Server thread blocks, so the time will always increase.
2023-07-20 14:44:46 -04:00
Hemna 6a6e854caf Removed flask-classful from webchat
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.
2023-07-20 14:34:31 -04:00
Hemna e1183a7e30 Remove flask pinning
Also removed need for flask-classful. Created new
aprsd/wsgi.py for the web admin interface.
2023-07-20 14:34:31 -04:00
Hemna 35d41582ee Moved logging to log for wsgi.py
Added wsgi.py to be used with gunicorn to start aprsd's web admin
interface.

gunicorn -b :8080 "aprsd.wsgi:app"
2023-07-16 16:32:39 -04:00
Hemna 565ffe3f72 Changed weather plugin regex pattern
The weather plugins used to match on w, but now require wx
2023-07-15 18:22:24 -04:00
Hemna 0bd11d05c6 Limit the float values to 3 decimal places 2023-07-14 11:35:32 -04:00
Hemna aa547cbef5 Fixed rain numbers from aprslib 2023-07-14 10:42:36 -04:00
Hemna 7f2aba702a Fixed rpc client initialization 2023-07-13 14:58:12 -04:00
Hemna 63bf82aab5 Fix in for aprslib issue #80
aprslib incorrectly decodes weather packets and doesn't provide
wind_speed or wind_direction from the CSE/SPD 7 bytes in the APRS
packet.  This patch puts a temporary fix in place until the
aprslib pull request lands and is released.

https://github.com/rossengeorgiev/aprs-python/issues/80

https://github.com/rossengeorgiev/aprs-python/pull/81
2023-07-13 14:35:55 -04:00
Hemna 005675cb46 Fixed pep8 errors 2023-07-10 11:01:41 -04:00
Hemna 191e1ff552 Populate stats object with threads info
This patch adds the thread names and state to the stats object
so the aprsd fetch-stats command can show it.
2023-07-10 10:44:24 -04:00
Hemna 0a14b07fae added counts to the fetch-stats table 2023-07-09 21:29:29 -04:00
Hemna b2e621da4b Added the fetch-stats command
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>
2023-07-09 21:06:57 -04:00
Hemna fe0d71de4d Replace ratelimiter with rush
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
2023-07-08 17:30:22 -04:00
Hemna 80b85e648f Fixed unit tests for Location plugin 2023-06-22 09:06:55 -04:00
Hemna 5bc589f21f Fixed pep8 violation
This patch fixes a pep8 violation in the location plugin
2023-06-21 18:51:53 -04:00
Hemna 8b73372b6e Added rpc server for listen
Added the ability to start the rpc server for fetching stats from the
listen command.  If the rpc server is enabled in config, the rpc
server will now start.
2023-06-21 18:48:08 -04:00
Hemna 26c1e7afbb Update location plugin and reworked requirements
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
2023-06-15 16:08:28 -04:00
Hemna 4e99e30f16 Ensure conf is imported for threads/tx
Import the conf for threads/tx.py to ensure that the
msg_rate_limit_period is defined prior to the conf entry
being referenced.
2023-05-05 11:07:23 -04:00
Hemna 5694cabd93 cleanup some debug messages 2023-04-25 14:29:26 -04:00
Hemna e21e2a7c50 Fixed loading of plugins for server
Some instances the plugins failed to load
2023-04-20 14:31:50 -04:00
Hemna 17d9c06b07 Don't load help plugin for listen command
This patch disables loading the help plugin for the listen command.
2023-04-17 15:37:48 -04:00
Hemna 0ec41f7605 Change listen command plugins
The listen command now adds the --load-plugins, which is false by
default, to load all the plugins as defined in the config file.
2023-04-17 15:01:57 -04:00
Hemna 483afce5ad Update Listen command
This patch updates the aprsd listen command to add the packet-plugins
argument which allows enabling a single plugin to work against the
packets recieved from the aprsis network.
2023-04-17 10:51:17 -04:00
Hemna 840b0aba97 Add ratelimiting for acks and other packets
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)
2023-01-18 13:00:10 -05:00
Hemna 4aa4a4b5d3 Import RejectPacket 2023-01-16 11:38:48 -05:00
Hemna c68b270ee2 Add support to Reject messages.
This patch adds support for receiving reject messages.
2023-01-14 12:41:22 -05:00
Hemna c5aba17ad1 Ensure server command main thread doesn't exit
This patch adds join calls on the running threads to prevent
the main thread from exiting prematurely.
2023-01-07 14:57:25 -05:00
Hemna 233d49bb4c Fixed save directory default 2023-01-03 15:38:19 -05:00
Hemna 6391c7eed6 Fixed pep8 failure 2023-01-03 09:01:53 -05:00
Hemna 0758a58101 Cleaned up KISS interfaces use of old config 2023-01-02 14:20:13 -05:00
Hemna a5520b2cd3 reworked usage of importlib.metadata
For whatever reason passing in group in python 3.9.x
fails for importlib_metadata.entry_points.  This patch
fetches all and filters through them to get the real
oslo.config.opts entry points now.  This is to find all
of the config options of aprsd and the plugins
2023-01-02 14:13:49 -05:00
Hemna c5acdba6de Updated Healthcheck to use rpc to call aprsd
After adding the rpc service for aprsd server and separating the
admin web REST interface, healthcheck no longer worked.   The stats
are available via rpc now.
2022-12-31 16:52:50 -05:00
Hemna ed284a42cc Added ObjectPacket
This patch adds the ObjectPacket.  This is used by the REPEAT plugins
to send out an object in message packet to let radios tune directly
to the station.
2022-12-30 09:44:25 -05:00
Hemna 3d0bb8ae8e Update regex processing and regex for plugins
The regex search is now by default case insensitive.
Also update each core plugin to better match the command.

ping plugin can now match on
p
p foo
ping
pIng

Weather plugins can now match on
w
wx
wX
Wx KM6LYW
weather
WeaTher
2022-12-29 14:34:46 -05:00
Hemna 83d2e708eb Change ordering of starting up of server command
This patch moves the plugin manager to early in the startup
process so that the plugins get loaded, which also means each
plugin's custom config settings will be in the CONF object.
This allows dumping the entire CONF with all the plugin settings.
2022-12-29 14:15:56 -05:00
Hemna c929689647 Update documentation and README
This updates the documentation in prep for 3.0.0
2022-12-28 16:50:34 -05:00
Hemna ff392395ed Decouple admin web interface from server command
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
2022-12-28 15:55:09 -05:00
Hemna e9a954a8fd Fix some unit tests and loading of CONF w/o file 2022-12-27 15:31:49 -05:00
Hemna f4a6dfc8a0 Added missing conf 2022-12-27 14:46:41 -05:00
Hemna 7ccfc253cf Removed references to old custom config
Also updated unittests to pass.
2022-12-27 14:30:03 -05:00
Hemna e13ca0061a Convert config to oslo_config
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
2022-12-24 16:51:40 -05:00
Hemna bbcd7c8a5b Fix Rain reporting in WeatherPacket send.
Made a fix for a rain setting of 1.04 inches, the packet
has to be r104 instead of r001
2022-12-22 09:42:30 -05:00
Hemna 4a65f52939 Removed Packet.send()
This patch decouples sending a message from the internals of
the Packet classes.  This allows the rest of the code to use
Packet objects as type hints in methods to enforce Packets
in the plugins.

The send method was moved to a single place in the threads.tx.send()
2022-12-21 16:26:36 -05:00
Hemna f464ff0785 Removed watchlist plugins
All plugins can be loaded with the enabled_plugins
Also added unit tests for the PluginManager
2022-12-21 11:18:26 -05:00
Hemna 2ca36362ec Fix PluginManager.get_plugins
This patch fixes the result of get_plugins to be a list correctly.
2022-12-21 10:05:27 -05:00
Hemna 7dfa4e6dbf Cleaned up PluginManager
Added a separate pluggy track for normal plugins
and watch list plugins.
2022-12-20 16:19:05 -05:00
Hemna 220fb58f97 Cleaned up PluginManager
Added a separate pluggy track for normal plugins
and watch list plugins.
2022-12-20 15:13:13 -05:00
Hemna 088cbb81ed Update routing for weatherpacket
update the routing to
WIDE1-1, WIDE2-1
2022-12-20 11:51:47 -05:00
Hemna f19043ecd9 Fix some WeatherPacket formatting 2022-12-19 21:27:05 -05:00
Hemna a1188d29d4 Fix pep8 violation 2022-12-19 20:41:57 -05:00
Hemna d01392f6a5 Add packet filtering for aprsd listen
Now aprsd listen can filter by packet types.
2022-12-19 17:28:18 -05:00
Hemna 899a6e5363 Added WeatherPacket encoding
This patch adds the ability to output a correctly formatted
APRS weather packet for sending.
2022-12-19 14:04:14 -05:00
Hemna ad0d89db40 Updated webchat and listen for queue based RX
This patch updates both the webchat and listen commands
to be able to use the new queue based packet RX processing.

APRSD used to start a thread for every packet received, now
packets are pushed into a queue for processing by other threads
already running.
2022-12-19 10:28:22 -05:00
Hemna e37f99a6dd reworked collecting and reporting stats
This is the start of the cleanup of reporting of
packet stats
2022-12-18 21:54:34 -05:00
Hemna 9fc5356456 Removed unused threading code 2022-12-18 09:14:12 -05:00
Hemna 123b3ffa81 Change RX packet processing to enqueu
This changes the RX thread to send the packet into a queue instead of
starting a new thread for every packet.
2022-12-18 08:52:58 -05:00
Hemna 1187f1ed73 Make tracking objectstores work w/o initializing
This changes the objectstore to test to see if the config has been
set or not.  if not, then it doesn't try to save/load from disk.
2022-12-17 20:06:28 -05:00
Hemna c201c93b5d Cleaned up packet transmit class attributes
This patch cleans up the Packet class attributes used to
keep track of how many times packets have been sent and
the last time they were sent.  This is used by the PacketTracker
and the tx threads for transmitting packets
2022-12-17 18:06:24 -05:00
Hemna f1de7bc681 Fix packets timestamp to int
Python's default timestamp is a float.
APRS packet expect to have an old style unix integer
timestamp.
2022-12-16 15:58:03 -05:00
Hemna 6030cb394b More messaging -> packets cleanup
Fixed the unit tests and the notify plugin
2022-12-16 15:58:03 -05:00
Hemna bfc0a5a1e9 Cleaned out all references to messaging
The messaging.py now is nothing but a shell that
contains a link to packets.NULL_MESSAGE to help maintain
some backwards compatibility with plugins.

Packets dataclass has fully replaced messaging objects.
2022-12-16 15:58:02 -05:00
Hemna 59e5af8ee5 Added contructing a GPSPacket for sending
This patch adds the needed code to construct the raw output
string for sending a GPSPacket.

TODO: Need to incorporate speed, course, rng, position ambiguity ?
TODO: Need to add option to 'compress' the output location data.
2022-12-16 15:58:02 -05:00
Hemna 1b49f128a9 cleanup webchat 2022-12-16 15:58:02 -05:00
Hemna 94fb481014 Reworked all packet processing
This patch reworks all the packet processing to use the new
Packets objects.  Nuked all of the messaging classes.

backwards incompatible changes
all messaging.py classes are now gone and replaced by
packets.py classes
2022-12-16 15:58:02 -05:00
Hemna 67a441d443 Updated plugins and plugin interfaces for Packet
This patch updates unit tests as well as the Plugin filter()
interface to accept a packets.Packet object instead of a
packet dictionary.
2022-12-16 15:58:02 -05:00
Hemna 082db7325d Started using dataclasses to describe packets
This patch adds new Packet classes to describe the
incoming packets parsed out from aprslib.
2022-12-16 15:58:02 -05:00
Hemna 9571b0bb38 Fixed position report for webchat beacon
With more testing of the webchat beaconing, found a problem
with the packet format for the beacon.  This patch fixes the
packet format of the beacon.

Also added a timeout when trying to get the GPS location in the browser,
otherwise it could never come back.
2022-12-16 12:01:35 -05:00
Hemna 19e5cfa9cc Add unit tests for webchat 2022-12-14 08:26:12 -05:00
Hemna 9d19502dd8 Fix for Collections change in 3.10
python 3.10 moved a module in the collections package
breaking backwards compatibility.  this patch puts a fix in
to account for it.
2022-12-12 20:45:19 -05:00
Hemna f2b1ad35f9 change from device-detector to user-agents
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.
2022-12-07 13:40:08 -05:00
Hemna 51b80cd4ea Refactored threads a bit
This patch refactors the rx threads a bit to reuse some code
responsible for processing acks when packets are received.

This also eliminates a custom thread in the webchat command for
processing received packets now that there is common code in the base
classes.
2022-12-02 16:26:48 -05:00
Hemna 480094b0d4 Mark packets as acked in MsgTracker
This patch updates webchat to track the msgs recieved as tracked
and acked, so the TX thread can stop trying to send.
2022-12-02 14:58:32 -05:00
Hemna 726c8f4f2f remove dev setting for template 2022-12-02 14:20:52 -05:00
Hemna ee96108324 Add GPS beacon to mobile page
This patch adds the GPS beacon button to the mobile layout.
2022-11-30 15:17:28 -05:00
Hemna 5067f745ca Allow werkzeug for admin interface.
This patch enables werkzeug for socketio for the admin interface
2022-11-30 14:31:44 -05:00
Hemna f9e7195e25 Add support for mobile browsers for webchat
This patch adds initial support for changing the UI for webchat
based if the browser is on a mobile device.
2022-11-30 14:14:51 -05:00
Hemna 44696fbc56 Ignore callsign case while processing packets
This patch fixes an issue where aprsd was deciding if it was
supposed to process a packet destined for itself or not.  It was
making a case sensitive comparison.  This patch makes that comparison
case insensitive for the callsign itself.
2022-11-30 13:57:25 -05:00
Hemna 1a1d00242b Send GPS Beacon from webchat interface
This patchset allow getting the GPS coordinates from the browser's
geolocation API (which can be denied by user), then send's the GPS
coordinates to aprsd via socketio and then aprsd sends a beacon.

This allows the APRS network to know the location of the person running
the webchat app via browser so packets can get routed back to it.
2022-11-25 13:25:09 -05:00
Hemna d4bf0f1e3c Remove email validation
The package/library being used for email validation is basically
defunct now.
2022-11-25 09:29:41 -05:00
Hemna 5acddbd466 Fixed failing unit tests
This patch re-adds in the pytz lib for the generic time plugins.
2022-11-23 13:28:38 -05:00
Hemna 528bdb99e7 Removed TimeOpenCageDataPlugin
This patch removes the TimeOpenCageDataPlugin as it's been superceded
by the aprsd-timeopencage-plugin
2022-11-23 13:02:46 -05:00
Hemna fc1ca52593 Dump config with aprsd dev test-plugin
This patch adds the dumping of the config read for the
aprsd dev test-plugin command
2022-11-23 13:02:46 -05:00
Hemna 7d970cbe70 Got webchat working with KISS tcp
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.
2022-11-23 13:01:43 -05:00
Hemna d717a22717 Added click auto_envvar_prefix
This allows setting environment variables that are
prefixed with APRSD_
2022-11-23 13:01:06 -05:00
Hemna 9b0c626b59 Update aprsd thread base class to use queue
This patch updates the main aprsd threads class to use
a shared queue to notify all aprsd thread classes they need
to exit.  This ensures any closing down of sockets, etc happens from
inside the context of the thread itself, not the MainThread that
calls stop.
2022-11-23 13:01:06 -05:00
Hemna 967959e7b3 Update packets to use wrapt
This patch updates the aprsd/packets.py to use wrapt for it's method
lock synchornization.
2022-11-23 13:01:06 -05:00
Hemna 2ce50d8861 Try sending raw APRSFrames to aioax25
This seems to work sending out, but still getting
third-party dropped packets as response from the local repeater.
2022-11-23 13:01:06 -05:00
Hemna ad79ed1261 Use new aprsd.callsign as the main callsign
This patch changes how aprsd identifies itself when connected to
any client, which is not relying on the login for each client.
There are 3 supported clients currently
aprsis,
tcpkiss
serialkiss.

Each client has their own potential login/callsign to connect
to the remote.  This patch tells aprsd to use the new config option
aprsd.callsign as a means to identify itself.  It will accept
packets as <aprsd.callsign> and reply as <aprsd.callsign> regardless
of which client object is being used to connect to the remote.

Note: this breaks backwards compatibility.  This patch now requires
the new config option
aprsd:
  callsign: <callsign>
2022-11-23 13:01:01 -05:00
Hemna 5f28788180 Fixed access to threads refactor 2022-11-23 13:00:37 -05:00
Hemna 585d55f10d Added webchat command
This patch adds the new aprsd webchat command which shows
a new webpage that allows you to aprsd chat with multiple
callsigns
2022-11-23 13:00:36 -05:00
Hemna 1ccb2f7695 Moved log.py to logging
Also renamed logging/logging.py to logging/rich.py
2022-11-23 13:00:36 -05:00
Hemna a62843920a Moved trace.py to utils
This patch moves trace.py to the utils directory
2022-11-23 13:00:36 -05:00
Hemna 29b84b453b Fixed pep8 errors 2022-11-23 13:00:36 -05:00
Hemna 347a6d69f7 Refactored threads.py
This patch creates a threads directory and separates out
the contents of threads.py into separate files in the
threads directory to make it easier to find and maintain.
2022-11-23 13:00:36 -05:00
Hemna bed060f1c5 Refactor utils to directory
This patch moves the utils.py to utils/__init__.py
and fuzzyclock.py to utils
and separates the ring_buffer to it's own file in utils
2022-11-23 13:00:36 -05:00
Walter A. Boring IV fdc8bfafc0
Merge pull request #96 from ranguli/fix-pypi-scraping
Fix #92 (PyPI scraping)
2022-11-01 14:01:37 -04:00
ranguli 9ffd320353 Fix PyPI scraping 2022-10-27 12:33:31 -02:30
ranguli cc2918377e Fix typo on exception 2022-10-26 16:46:50 -02:30
Hemna 1c052a63c0 Fixed up config option checking for KISS
This patch updates the config option checking for
required fields in the config yaml file.  Specifically
for the existence of the aprsd: section
and the required fields for the 3 supported client types
apris,
kiss serial,
kiss tcp
2022-02-21 16:04:33 -05:00
Hemna e739441268 Fix logging issue with log messages
This patch changes the base Message class to
ensure that all printing of the message class only
outputs the message in the truncated and bad word filtering
enabled in the log.
2022-02-11 10:03:02 -05:00
Hemna 6257c9ea90 FIX: logging exceptions
This patch fixes the logging of exceptions in the email
plugin.
2022-01-26 14:39:14 -05:00
Hemna e8100d8777 Removed debug code 2022-01-07 15:17:16 -05:00
Hemna 764730c123 Updated list-plugins
This patch updates the README.rst with the new format for
`aprsd list-plugins`.
2021-12-15 10:48:16 -05:00
Hemna 2f6e7e17e8 Added unit tests for dev test-plugin
Also added a check to make sure that the aprs_login
parameter is passed in for use as the fromcallsign.
2021-12-12 16:35:26 -05:00
Hemna a7bbde4a43 Send Message command defaults to config
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.
2021-12-12 16:13:08 -05:00
Hemna 3b9970c0e7 Fixed an KISS config disabled issue
This patch fixes a small bug when both KISS interfaces are disabled.
2021-12-11 07:46:43 -05:00
Hemna e57a2e2ffc Fixed a bug with multiple notify plugins enabled
This patch fixes an issue with the processing of packets
and updateing the watchlist.  Previously after the
notify plugin processed the packet it would update the watchlist.
This doesn't work when there are more than 1 notify plugins
enabled, only the first notify plugin seeing the packet will
recognize that the callsign is old.
2021-12-10 14:20:57 -05:00
Hemna 592b328956 Unify the logging to file and stdout
This patch updates the logging facility to ensure that
logging to a file works even when --quiet mode is selected.
Also update the listen and list-plugins command to show
a console.status line while waiting for results to come in.
2021-12-10 10:49:09 -05:00
Hemna cd62db95c1 Added new feature to list-plugins command
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
2021-12-08 17:16:17 -05:00
Hemna 440c8d54ad Tightened up the packet logging 2021-12-07 15:00:38 -05:00
Hemna 8ea00e9888 Added unit tests for USWeatherPlugin, USMetarPlugin 2021-12-07 13:31:58 -05:00
Hemna 0ad791bdd9 Added NotifyPlugin unit tests and more
This patch restructures the unit tests for plugins.
This also adds unit tests for the NotifyPlugin
2021-12-07 11:25:14 -05:00
Hemna 96cc07d15f Small cleanup on packet logging
This patch reduces some of the leading whitespace
to the message/packet logging to the log file.
2021-12-06 14:35:49 -05:00
Hemna d3dd08714b Reduced the APRSIS connection reset to 2 minutes
The time in which the KeepAlive Thread would reset the APRS-IS
socket connection used to be 5 minutes.   This patch changes
that to 2 minutes.
2021-12-06 14:34:22 -05:00
Hemna 055835cb3c Fixed the NotifyPlugin
The watchlist notify plugin is supposed to send an APRS message
to the configured callsign.  This patch makes sure that the
message is sent to the notify_callsign
2021-12-06 14:11:34 -05:00
Hemna b5b286e75c Fixed some pep8 errors 2021-12-03 09:10:33 -05:00
Hemna 1233137caf Add tracing for dev command
This patch enables tracing output in the log for the dev
test-plugin command
2021-12-03 08:53:08 -05:00
Hemna 1d5f76defc Added python rich library based logging.
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.
2021-12-03 08:05:03 -05:00
Hemna 5e50792e80 fixed the failure during loading for objectstore
This patch fixes a silent failure of loading data from the objectstore
2021-11-13 15:07:28 -05:00
Hemna 6fb610582d Fixed dev command missing initialization
This patch fixes a few issues when running test-plugin command.
It was missing some initialization of the stats and packets classes.
2021-11-13 09:56:19 -05:00
Hemna bda2ef00dd Fix admin logging tab 2021-11-12 12:17:45 -05:00
Hemna 446484e631 Added new list-plugins command
This patch adds the new list-plugins command that shows the
list of built in plugins for APRSD.
2021-11-12 11:36:22 -05:00
Hemna a8a6b1aa07 Don't require check-version command to have a config
This patch removes the need for check-version to have a
config file.
2021-11-12 10:23:27 -05:00
Hemna 8842fb1b44 Healthcheck command doesn't need the aprsd.yml config
This patch updates the healthcheck command to not require
the aprsd.yml config file to exist.   The healthcheck
calls a running aprsd, collects the stats to determine if it's
healthy.
2021-11-10 11:52:51 -05:00
Hemna 152132b0ed Fix test failures 2021-11-10 11:51:21 -05:00
Hemna 7787dc1be4 Removed requirement for aprs.fi key
This removed the requirement of running APRSD for specifying
the aprs.fi key in the config file.  The plugins that need the
key have been updated to set enabled = False when the key is missing.
2021-11-10 11:01:10 -05:00
Hemna 9469410929 Removed stock plugin. 2021-11-09 15:02:54 -05:00
Hemna 88db485eb4 Removed the stock plugin
This patch removed the built in stock plugin from APRSD.
This helps clean up the requirement tree from the yfinance
python module that pulled in a lot of other requirements.

The stock plugin is it's own separate repo and module now.

https://github.com/hemna/aprsd-stock-plugin

https://pypi.org/project/aprsd-stock-plugin/
2021-11-09 14:53:20 -05:00
Hemna cdcb98e438 Cleaned up some verbose output & colorized output
Some commands now have some color if the shell detects it supports it.
2021-11-08 12:18:23 -05:00
Hemna 89727e2b8e Reworked all the common arguments
This patch reworks all the common arguments for the commands
and subcommands

--loglevel
--config_file
--quiet

These are all now processed in 1 place.
2021-11-08 11:52:41 -05:00
Hemna 617973f561 Fixed test-plugin 2021-11-05 16:40:07 -04:00
Hemna 9187b9781a Ensure common params are honored 2021-11-05 16:26:24 -04:00
Hemna 8287c09ce5 pep8 2021-11-05 14:38:23 -04:00
Hemna 82def598f0 Added healthcheck to the cmds
this patch moves the healthcheck to it's own command.
aprsd healthcheck
2021-11-05 14:21:36 -04:00
Hemna 3463c6eb96 Removed the need for FROMCALL in dev test-plugin
We already use the env var for APRS_LOGIN, so that is now
used for the test-plugin command.
Also cleaned up some help text
2021-11-05 14:05:24 -04:00
Hemna 2ead6a97da Pep8 failures 2021-11-05 13:42:27 -04:00
Hemna 7d0006b0a6 Refactor the cli
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.
2021-11-05 13:36:33 -04:00
Hemna 49f3ea8339 Fixed a problem with send-message command
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
2021-11-05 10:39:47 -04:00
Hemna cefb581bb8 Be more careful picking data to/from disk
This patch ensures that the pickle file is opened and closed correctly
as well as trapping for any exceptions that might occur while loading
a pickle file.
2021-11-02 08:52:59 -04:00
Hemna 95fecd2394 Ensure plugins are last to be loaded.
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.
2021-10-25 11:22:46 -04:00
Hemna c8c23e6185 Fixed email connecting to smtp server
Fixed an issue with not passing config in the smtp_connect
2021-10-25 11:12:29 -04:00
Hemna e009791b75 Converted MsgTrack to ObjectStoreMixin 2021-10-22 16:07:20 -04:00
Hemna 89701c8a70 Make sure SeenList update has a from in packet
This makes sure that the packet being processed by the seenlist
has a from address.
2021-10-21 08:40:40 -04:00
Hemna 66c5d85b89 Ensure PacketList is initialized 2021-10-20 15:48:35 -04:00
Hemna 8ee8b149f1 Added SIGTERM to signal_handler 2021-10-20 15:37:54 -04:00
Hemna 0d51634ec2 Enable configuring where to save the objectstore data
This patch adds a new config entry aprsd.save_location
which is the directory used to store and load the objectstore
data.
2021-10-20 14:39:12 -04:00
Hemna 135e21cd8d PEP8 cleanup 2021-10-20 14:10:54 -04:00
Hemna 4233827dea Added objectstore Mixin
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.
2021-10-20 14:07:22 -04:00
Hemna 9b2212245f Added -num option to aprsd-dev test-plugin
This allows the user to specify how many times in a loop
to call the plugin.  The Default is 1.
2021-10-20 11:46:55 -04:00
Hemna 9150f3b6ff Only call stop_threads if it exists 2021-10-10 14:50:04 -04:00
Hemna 278bb6e882 Added new SeenList
This patch adds the seen list feature.  It tracks the callsign of every
packet that aprsd sees.
2021-10-09 14:29:25 -04:00
Hemna 004795dbf1 Added plugin version to stats reporting
This patch adds version to the plugin stats collected.
2021-10-09 09:31:51 -04:00
Hemna 3b7924b13d Added new HelpPlugin
This patch adds the always enabled HelpPlugin.  This plugin
now will respond to the 'help' or 'h' commands that will
automatically build a help string based on the number of
enabled plugins.  It will also respond to
help <plugin> with the plugin specific help
2021-10-08 12:01:04 -04:00
Hemna 2bf85db21b Updated aprsd-dev to use config for logfile format
This patch updates the aprsd-dev command's log file format
to use what's defined as the default and/or use the config file
setting like aprsd server does.
2021-10-08 08:47:24 -04:00
Hemna 5b17228811 removed usage of config.check_config_option
check_config_option has been superceeded by the config UserDict
object's ability to see if a config option exists.
2021-10-07 10:11:48 -04:00
Hemna 725bb2fe35 Fixed send-message after config/client rework
This patch fixes the send-message from the command line
ability after the complete rework of the client classes.
2021-10-07 10:05:19 -04:00
Hemna f8d87d05bb Fixed issue with flask config
Flask was trying to serialize the UserDict object.  Use the
data (dict) inside of it instead.
2021-10-06 15:17:09 -04:00
Hemna 30671cbdbc Added some server startup info logs
This patch adds some general info logs around starting the
client connection as well as loading the plugins.
2021-10-06 12:55:17 -04:00
Hemna fdc8c0cd66 Increase email delay to +10
This patch updates the increasing of the email check delay to += 10
seconds instead of +1.
2021-10-06 12:12:49 -04:00
Hemna c097c31258 Updated dev to use plugin manager
Also ensure that main creates the client prior to starting the
plugins.
2021-10-06 12:09:52 -04:00
Hemna e3c5c7b408 Fixed notify plugins
The notify base filter() was missing the @hookimpl
2021-10-06 12:08:29 -04:00
Hemna 491644ece6 Added new Config object.
The config object now has builtin dot notation getter with default

config.get("some.path.here", default="Not found")
2021-10-04 15:37:14 -04:00
Hemna a6ed7b894b Fixed email plugin's use of globals
The email plugin was still using globals for tracking
the check_email_delay as well as the config.  This
patch creates a new singleton thread safe mechanism for
check_email_delay with the EmailInfo class.
2021-10-04 11:36:13 -04:00
Hemna 270be947b5 Refactored client classes
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
2021-09-17 09:32:30 -04:00
Hemna 23e3876e7b Refactor utils usage
This patch separates out the config from the utils.py
utils.py has grown into a catchall for everything and this
patch is the start of that cleanup.
2021-09-16 17:08:30 -04:00
Hemna 560e152742 Fixed issue of aprs-is missing keepalive
Started noticing that aprs-is keepalive messages just stop
getting sent.  This causes aprsd to basically disconnect from
the APRS network.  Added a check into the KeepAlive thread to
restart the aprs-is connecter if the last time we got a keepalive
from apris is > 5 minutes.
2021-09-13 13:22:06 -04:00
Hemna 69b215d4d8 Fixed packet processing issue with aprsd send-message
This patch adds the missing PacketList initialization
for the send-message command
2021-09-10 15:39:07 -04:00
Hemna 1b9a9935fc Enable plugins to return message object
This patch enables the ability for plugins to return:
* string
* list of strings
* message object
* list of strings and message ojects

Each string will be encapsulated in a message object prior being sent.
each message object will be sent directly.
Each list will be iterated over and processed according to the above 2
options.
2021-09-08 14:45:15 -04:00
Hemna 3faf41b203 Added enabled flag for every plugin object
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.
2021-09-08 14:25:12 -04:00
Hemna 7e6dffb34b Ensure plugin threads are valid
This patch makes sure that the plugin threads returned from
create_threads is somewhat valid
2021-09-08 13:44:20 -04:00
Hemna 9eff99dde7 Removed fixed size on logging queue
If the logging queue gets full, due to a maxsize being set,
then any further logs will result on lots of errors being dumped
to stderr as the queue is full.
2021-09-07 13:43:48 -04:00
Hemna d6b3df93f1 Added Logfile tab in Admin ui
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.
2021-09-07 13:13:36 -04:00
Hemna dfaf3aa3d1 Update dev.py
This patch ensures a valid packet is passed into the plugin prior to
testing.
2021-09-03 16:48:00 -04:00
Hemna 62ce84b315 Allow passing in aprsis_client
When the admin user users the web ui to send a message
a new client instance is created with login credentials for
that particular message.  This patch ensures that send_direct
uses that client.
2021-09-02 11:17:15 -04:00
Hemna 8ada789d4d Fixed a problem with the AVWX plugin not working
the regex for the plugin was not matching correctly
2021-09-02 11:06:25 -04:00
Hemna 558710d348 Remove some noisy trace in email plugin
This removes the trace decorators from the email login
functions.  They have been stable for a while now.
2021-09-02 10:03:43 -04:00
Hemna 1ea6c05dec Fixed issue at startup with notify plugin
Ensure that the aprsis client is configured prior to starting
any plugins.
2021-09-02 09:54:13 -04:00
Hemna 0f6df5fc05 Fixed email validation
This patch adjusts the py3-email-validation usage.  Since we
upgraded to 1.0.2, the signature has changed.  This patch adjusts
the signature usage so it works again.
2021-09-02 09:43:33 -04:00
Hemna 1635feb820 Removed values from forms 2021-09-02 09:12:44 -04:00
Hemna c58031d772 Added send-message to the main admin UI 2021-09-02 08:56:25 -04:00
Hemna c537b54df6 Updated requirements 2021-09-01 17:38:59 -04:00
Hemna 84ce60bc50 Cleaned up some pep8 failures 2021-09-01 17:11:35 -04:00
Hemna c941379a5c Upgraded the send-message POC to use websockets
This patch updates the send message Admi page to use
websockets.  It makes updates to the messages list instant.
2021-09-01 17:10:59 -04:00
Hemna 23cbf32814 New Admin ui send message page working. 2021-09-01 17:10:13 -04:00
Hemna 6d3258e833 Send Message via admin Web interface
This patch adds the ability to send a message from the
admin interface's send-message.html page.
2021-09-01 17:06:56 -04:00
Hemna ca438c9c60 Updated Admin UI to show KISS connections
This updates the top area of the Admin UI to reflect the
connection type (aprs-is vs kiss).
2021-09-01 16:39:50 -04:00
Hemna f4dee4b202 Got TX/RX working with aioax25+direwolf over TCP
This patch gets APRSD fully working with the TCPKISS socket
to direwolf.
2021-09-01 14:48:22 -04:00
Hemna 54c9a6b55a Rebased from master 2021-08-30 13:34:25 -04:00
Hemna b53e2ba7fe Added the ability to use direwolf KISS socket
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.
2021-08-30 13:28:39 -04:00
Hemna ec92b07e31 Silence some log noise
Removed an email thread log at the start of the loop.
Also bumped the Keepalivethread time to 60 seconds
2021-08-25 08:25:36 -04:00
Hemna 61967b5fe8 Removed TXThread
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.
2021-08-24 15:22:50 -04:00
Hemna 2e9b42d7af Added days to uptime string formatting
The uptime string formatter was missing days.
2021-08-24 14:08:24 -04:00
Hemna 0f384b0e85 Updated select timeouts
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.
2021-08-24 13:31:33 -04:00
Hemna 8b5f21eece Rebase from master and run gray
This patch is a rebase of master after the introduction
of switching from black to gray code formatting.
2021-08-23 14:08:14 -04:00
Hemna 8e627c98b3 Added tracking plugin processing
This patch adds plugin rx/tx processing of packets.
This tracks how many messages a plugin processes (recieves) and
how many packets result in a plugin sending a message out.

This patch also adds a new plugins tab on the admin page.
2021-08-23 13:45:01 -04:00
Hemna 86777d838c Added threads functions to APRSDPluginBase
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.
2021-08-23 13:44:58 -04:00
Hemna 5f4cf89733 Refactor Message processing and MORE
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.
2021-08-23 13:43:53 -04:00
Hemna e175f77347 Use Gray instead of Black for code formatting.
The Black code formatter sucks with respect to function
declarations with a lot of params.  Completely unreadable.
2021-08-23 13:32:09 -04:00
Hemna f1f8aed8c4 Fixed LOG.debug issue in weather plugin 2021-08-19 19:07:45 -04:00
Hemna d71b0df314 Fixed aprsd-dev
This patch fixes running the aprsd-dev plugin development tool.
It currently only works for message based plugins.
2021-08-18 20:14:03 -04:00
Hemna 349250685b Enable multiple replies for plugins
This patch adds the ability for plugins to send multiple messages
back in response to a command/message.  The plugin simple needs
to return a list of messages (Strings).  Each string in that list
will result in a separate message being sent back to the originator
of the message.
2021-08-13 12:36:48 -04:00
Hemna 840c8a990e Put in a fix for aprslib parse exceptions
This patch adds a fix for the aprslib consumer function
to ensure that we don't bail when logging a ParseError
2021-08-13 10:31:45 -04:00
Hemna ed4995b6eb Fixed time plugin 2021-07-29 20:17:58 -04:00
Hemna 6740ff80be Updated the charts Added the packets chart
This patch adds the APRS Packets chart to the charts admin ui.
Also moves the raw json as it's own tab
2021-07-22 20:44:20 -04:00
Hemna be8179415a Added showing symbol images to watch list
This patch updates the Admin UI to display the APRS icon symbol
associated with a mic-e packet on the watch list tab for all
entries in the watch list.
2021-07-21 09:21:04 -04:00
Hemna 2fceba10e1 Reworked the notification threads and admin ui.
This patch updates the notification thread to send all packets
through the notification plugins.   The plugins themselves need to
do smart filter to not reply to every packet.  This allows for
more interesting plugins.

Also fixed an issue with the messages tab in the admin ui, not
showing all of the recieved packets.   The messages tab now also
sees all the packets that aprsd recieves.
2021-07-17 14:30:29 -04:00
Hemna 3d38402be2 Fixed small bug with packets get_packet_type
This fixes an issue with trying to decode the packet type.
Also updated some of the log entries.
2021-07-16 12:15:04 -04:00
Hemna 7dc4fb3e77 Move version string output to top of log 2021-07-16 12:11:51 -04:00
Hemna 1a1fcba1c4 Add new watchlist feature
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.
2021-07-16 08:31:38 -04:00
Hemna 562ae52c1e Fixed the Ack thread not resending acks
This patch fixes a bug in the AckThread.  The thread loop
was exiting after the first attempt to send the ack.
Thread loops have to return True, in order to be called again
as this is the mechanism in which aprsd gracefully shuts down all
threads.
2021-07-15 14:11:30 -04:00
Hemna 3c45d8bd0f reworked the admin ui to use semenatic ui more 2021-07-14 15:00:23 -04:00
Hemna 5afc7fb664 Added messages count to admin messages list.
This patch adds a simple count of packets shown in the
messages list on the admin ui.
2021-07-14 10:29:12 -04:00
Hemna de62579852 Add admin UI tabs for charts, messages, config
This patch updates the admin UI to include 3 tabs
of content.
Charts
messages
config

The charts tab is the existing line charts.
The messages tab shows a list of RX (green) and TX (red) messages
from/to aprsd.
The config tab shows the config loaded at startup time.
2021-07-12 12:12:14 -04:00
Hemna 1c66555450 Removed a noisy debug log 2021-07-09 15:22:53 -04:00
Hemna 9a1ab1c0d6 Dump out the config during 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.
2021-07-05 10:57:22 -04:00
Hemna 3ae5717452 Added message counts for each plugin.
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.
2021-06-17 16:37:47 -04:00
Hemna 17302aa76d Added aprsd version checking
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.
2021-05-04 10:06:43 -04:00
Hemna fc1ee19516 Removed debug log for KeepAlive thread
No need to dump out the length of the keepalive string for now.
2021-04-05 14:14:33 -04:00
Hemna 23c219f0d2 Fixed version unit tests 2021-04-05 08:55:46 -04:00
Hemna 7b019d24f0 Updated stats output for KeepAlive thread
Also added the aprsd uptime to the VersionPlugin
2021-04-02 18:54:00 -04:00
Hemna 3ac42edd82 Force all the graphs to 0 minimum
This patch updates all the graphs to have a minimum
Y value of 0.  Doesn't make sense to have negative messages.
2021-04-02 11:57:06 -04:00
Hemna d6806c429c Added email messages graphs
This patch cleans up the layout of the admin web page stats graphs
as well as adds in the email stats.  Added the titles to each
graph, so you know what you are looking at.
2021-04-02 11:47:52 -04:00
Hemna bf8d2c6088 Reworked the stats dict output and healthcheck
This patch reworks the stats object dict and includes more data.
Also includes aprsis last update timestamp (from last recieved message).
This is used to help determine if the aprsis server connection is still
alive and well.
2021-04-01 23:12:25 -04:00
Hemna 123266c9ad Added callsign to the web index page
This patch adds the aprs-is server callsign that aprsd is listening
on for messages.
2021-03-31 11:32:09 -04:00
Hemna 34d2c31d90 Added log config for flask and lnav config file
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.
2021-03-31 11:07:39 -04:00
Hemna d1a2a14370 Added showing APRS-IS server to stats
This patch updates the client.py to collect which APRS-IS server
that aprsd is connected to and displays that info on the stats web page.
2021-03-30 10:43:31 -04:00
Hemna fb979eda94 Provide an initial datapoint on rendering index
This patch adds a single data point when rendering the
initial stats for the index page.
2021-03-30 10:18:56 -04:00
Hemna 6297ebeb67 Make the index page behind auth
This patch makes the index page ask for login/password in order
to see the stats.
2021-03-30 09:55:14 -04:00