1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-12-21 00:51:06 -05:00
Commit Graph

542 Commits

Author SHA1 Message Date
d0d0aef077
Merge pull request #48 from craigerl/dependabot/pip/bleach-3.3.0
Bump bleach from 3.2.1 to 3.3.0
2021-02-03 11:12:04 -05:00
a5cc274ff5 Wrap all imap calls with try except blocks
The Email Thread has been unstable due to some IMAP servers
being crap.  This patch wraps more of the imap server calls
in try except blocks to try and trap errors.
2021-02-03 11:00:20 -05:00
dependabot[bot]
d71937b176
Bump bleach from 3.2.1 to 3.3.0
Bumps [bleach](https://github.com/mozilla/bleach) from 3.2.1 to 3.3.0.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v3.2.1...v3.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-02 23:17:59 +00:00
Craig Lamparter
47135c6086 EmailThread was exiting because of IMAP timeout, added exceptions for this 2021-02-02 11:13:17 -08:00
db2b537317 Added memory tracing in keeplive 2021-01-29 11:02:21 -05:00
0b44fc08eb Fixed tox pep8 failure for trace 2021-01-29 10:15:20 -05:00
af48c43eb2 Added tracing facility
You can enable debug tracing iff loglevel == DEBUG AND
config file has aprsd:trace:True
2021-01-29 10:07:49 -05:00
94bad95e26 Fixed email login issue.
This patch undoes an overzealous reworking of the
config.  the arps login didn't move.
2021-01-26 13:33:39 -05:00
Craig Lamparter
57d768e010 duplicate email messages from RF would generate usage response 2021-01-26 09:18:43 -08:00
030b02551f Enable debug logging for smtp and imap
Add the new config options for
aprsd:
  email:
    imap:
      debug: True

    smtp:
      debug: True
2021-01-25 16:16:08 -05:00
Craig Lamparter
cfb172481d more debug around email thread 2021-01-25 12:54:24 -08:00
Craig Lamparter
3ca0eeff56 debug around EmailThread hanging or vanishing 2021-01-25 12:24:20 -08:00
c1e6792721 Fixed resend email after config rework
This patch fixes 1 missed access to the shortcuts after
the restructuring of the config file
2021-01-25 15:15:53 -05:00
aa290692ab Added flask messages web UI and basic auth
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>
2021-01-25 11:24:39 -05:00
0d18e54969 Fixed an issue with LocationPlugin
When calling LocationPlugin with a callsign outside of the US,
the forecast.weather gov wasn't raising an exception.  A valid json
dict was coming back, but it didn't have location data we were
expecting.
2021-01-22 16:32:49 -05:00
51894bbab8 Cleaned up the KeepAlive output
This patch cleans up the KeepAlive output a bit.
2021-01-22 16:05:48 -05:00
8bfdefd5ad updated .gitignore
This patch updates .gitignore to ignore the docs/_build output dir
2021-01-22 15:36:22 -05:00
f5ae161ab8
Merge pull request #46 from craigerl/healthcheck
Added healthcheck app
2021-01-22 14:30:44 -05:00
c870207a96 Added healthcheck app
This patch adds the healthcheck app that uses the flask stats url
to fetch the internal stats of a running aprsd server.  If the server is
up the stats will return and be checked for 'healthy' status.
IF the url fails to return, healthcheck will exit with -1.  You can use
this script to restart aprsd if healthcheck exits with -1 status.

There is a check against the email thread.  The email thread updates a
deadman's timer every 5 seconds.   If that time gets older than 5
minutes, then healthcheck will say that's a failure and exit with -1.

You can call healthcheck and restart aprsd if it fails (exit -1)
2021-01-22 12:51:11 -05:00
f932c203d7
Merge pull request #45 from craigerl/flask
Flask
2021-01-22 08:21:20 -05:00
cae8746690 Add flask and flask_classful reqs 2021-01-21 21:11:41 -05:00
5c949343ec Added Flask web thread and stats collection
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.
2021-01-21 20:58:47 -05:00
9630279d14 First hack at flask 2021-01-21 15:11:44 -05:00
c686543323
Merge pull request #44 from craigerl/optional_email
Allow email to be disabled.
2021-01-21 13:53:59 -05:00
982f24c5f5 Allow email to be disabled.
The config file defaults to email being off now.  This requires
the user to set the email settings anyway, so the default is off.
2021-01-21 13:50:19 -05:00
a656508ba6
Merge pull request #43 from craigerl/rework_config
Reworked the config file and options
2021-01-21 13:36:44 -05:00
ce5b09233c Reworked the config file and options
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.
2021-01-21 13:32:19 -05:00
2f7c1bfcc1
Merge pull request #41 from craigerl/openweathermap
Added openweathermap weather plugin
2021-01-21 10:10:26 -05:00
a35cb04ca7 Updated documentation and config output
This patch reformats the sample-config output for more
informative comments for the 3 external services:
openweathermap
opencagedata
avwx-api
2021-01-21 10:05:49 -05:00
fefb626c97 Fixed extracting lat/lon
This patch fixes an issue when aprs.fi returns a non error, but
doesn't have any real entries as the response
2021-01-20 19:51:59 -05:00
2349024539 Added openweathermap weather plugin
This patch adds the openweathermap weather plugin.
Also adds a new config option to set the overall
units setting from imperial (default) to metric.

to change it add the following to the ~/.config/aprsd/aprsd.yaml

...
aprsd:
  units: metric
2021-01-20 16:12:17 -05:00
Craig Lamparter
f8c001dc49
Merge pull request #40 from craigerl/new_plugins
Added new time plugins
2021-01-20 08:26:48 -08:00
fc3a747aa4 Added new time plugins
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>
2021-01-20 10:19:49 -05:00
fdd5a6ba41
Merge pull request #38 from craigerl/timezone-fix
Fixed TimePlugin timezone issue
2021-01-19 11:29:59 -05:00
9f38fd179e Fixed TimePlugin timezone issue
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.
2021-01-19 11:26:07 -05:00
Craig Lamparter
ca05676c98 remove fortune white space 2021-01-17 08:02:45 -08:00
Craig Lamparter
83f42dd7b7 Merge branch 'master' of https://github.com/craigerl/aprsd 2021-01-17 07:57:10 -08:00
Craig Lamparter
5fb363c9e7 fix git with install.txt 2021-01-17 07:56:59 -08:00
Craig Lamparter
7de2820caa change query char from ? to ! 2021-01-17 07:55:59 -08:00
55360ba5d0
Merge pull request #35 from craigerl/aprsd-dev
Added aprsd-dev plugin test cli and WxPlugin
2021-01-17 08:10:06 -05:00
b9f6fcfa0c Updated readme to include readthedocs link 2021-01-16 10:46:00 -05:00
cc8fd178ce Added aprsd-dev plugin test cli and WxPlugin
This patch adds a new CLI app called aprsd-dev.  arpsd-dev is
used specifically for developing plugins.  It allows you to run a
plugin directly without the need to run aprsd server.

This patch also adds the Weather Metar plugin called WxPlugin.
You can use it to fetch METAR from the nearest station for a callsign
or from a known METAR station id.  Call WxPlugin with a message of
'wx' for closest metar station or 'wx KAUN' for metar at KAUN wx station
2021-01-15 22:30:34 -05:00
658e6b6202 Updated Changelog for v1.5.1 2021-01-15 13:35:04 -05:00
98e3c246ad Updated README to fix pypi page
This patch updates the README to fix the overview image for
pypi.  This patch also updates the makefile to force broken
tox -p commands
2021-01-15 13:35:04 -05:00
Craig Lamparter
47ccce53ea
Update INSTALL.txt 2021-01-15 09:36:30 -08:00
33a0e6c18d Updated Changelog for v1.5.0 release 2021-01-15 12:12:41 -05:00
278e258648
Merge pull request #33 from craigerl/craiger-stable
add null reply for send_email
2021-01-15 12:09:55 -05:00
0e9cfdd847 Fix tox tests. 2021-01-15 12:06:09 -05:00
Craig Lamparter
f538fb26ae fix usage statement 2021-01-15 08:51:12 -08:00
d81bfd6fd5 Enabled some emailthread messages and added timestamp
This patch re-enables some log.debug messages for email, to ensure
we can see emailthread is running correctly.  Also adds a timestamp
to the query pending messages, so radios don't think it's a duplicate
message.
2021-01-15 11:12:43 -05:00