Commit Graph

20 Commits

Author SHA1 Message Date
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 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 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 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 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 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 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 23cbf32814 New Admin ui send message page working. 2021-09-01 17:10:13 -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 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 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 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 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 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