Skip to content

Commit

Permalink
Merge pull request #28 from joergschultzelutter/26-migration-to-openw…
Browse files Browse the repository at this point in the history
…eather-onecall-api-30

WX code migration to met.no
  • Loading branch information
joergschultzelutter authored Jun 3, 2024
2 parents 232a253 + 2059d6b commit 936c462
Show file tree
Hide file tree
Showing 37 changed files with 2,434 additions and 831 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
10 changes: 10 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ hearham_raw_data.json
mpad_repeater_data.json
mpad_message_counter.txt
data_files
mpad_apprise_config.yml
nohup.out
mpad_crash_dump_*
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ Python implementation of a multi-purpose APRS daemon (WX/METAR/TAF/CWOP reports,
- Automatic detection of incoming duplicate / delayed APRS message requests
- Full UTF-8 support for incoming messages. For outgoing APRS messages, the configuration can be set to either 'plain ASCII' (default) or UTF-8. Email messages are not affected by this restriction

## MPAD on YouTube
## MPAD in the media

Thank you Jason/KM4ACK for your kind video review!
[![MPAD on YouTube](https://img.youtube.com/vi/75W0UTL5eOY/0.jpg)](https://www.youtube.com/watch?v=75W0UTL5eOY)

MPAD has been added to KC2SAH's off-grid radio reference (thank you!). [Order yours here!](https://offgridweather.com/)
[![Great Off-Grid Radio Reference Solution!](https://img.youtube.com/vi/65AeOBy7fDM/0.jpg)](https://www.youtube.com/watch?v=65AeOBy7fDM)

## Sample dialogue with MPAD

![Screencast](https://github.com/joergschultzelutter/mpad/blob/master/docs/screencast.gif)
Expand Down
26 changes: 11 additions & 15 deletions docs/COMMANDS/ACTION_KEYWORDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,23 @@ Spaces between the various parts of the message and the separators are permitted

A wx response consists of 1..n lines, The actual content as well as the message lenght is dependent on how much data is actually available. Here is an example for a wx report in metric format:

```10-Jan-21 San Francisco,CA overcast clouds morn:10c day:13c eve:12c```
```saturday Schorborn,37627;DE LightRain Nite:11C Morn:12C Day:18C```

```nite:11c sunrise/set 16:24/02:09UTC clouds:90% uvi:1.9 hPa:1026```

```hum:57% dewpt:4c wndspd:2m/s wnddeg:52```
```Eve:17C avghum:87% rain:2mm wind:3-6m/s NW-NNW cld:100% prs:1017hPa```

Glossary:

- ```morn``` - morning temperature
- ```day``` - daytime temperature
- ```eve``` - evening temperature
- ```nite``` - nighttime temperature
- ```sunrise/set``` sunrise and sunset in UTC time zone format
- ```clouds```
- ```cld``` cloud coverage in percent
- ```uvi``` - UV index
- ```hPa``` - air pressure
- ```hum``` - humidity
- ```hPa``` - air pressure in hectopascal
- ```hum``` - humidity (non-full-day requests only)
- ```avghum``` - Average humidity (full day requests only)
- ```dewpt``` - dew point
- ```wndspd``` - wind speed
- ```wnddeg``` - wind degrees
- ```wind``` - wind speed and degrees

### Zip Codes

Expand Down Expand Up @@ -636,7 +633,7 @@ Action Keyword can be combined with [date](DATE_KEYWORDS.md) / [daytime](DAYTIME
By default, the program will automatically switch from the metric system (default) to the imperial system if the __sender's__ call sign is from Liberia, Myanmar or the United States (per Wikipedia, these are the only three countries which still use the imperial system over the metric system).

- metric system (__default__): temperatures in degrees Celsius, speed in km/h, rain levels in cm etc.
- imperial system: temperatures in degress Fahrenheit, speed in mph, rain levels in inch etc.
- imperial system: temperatures in degress Fahrenheit, speed in mph etc.

If you don't want to rely on the automatic mode, you can always override this automated setting by specifying one of the following keywords:

Expand Down Expand Up @@ -669,15 +666,15 @@ Now let's request the same wx report - but this time, we want it to be delivered

```hum:68% dewpt:43f wndspd:2mph wnddeg:50```

MPAD does not perform an imperial-to-metric calculation (or vice versa) but requests the desired format as part of its REST requests to e.g. Openweathermap and other services. Apart from rounding these values in order to limit the message length, all data is displayed 'as is'.
MPAD then performs an imperial-to-metric calculation in case the user has requested imperial format. Apart from rounding these values in order to limit the message length, all data is displayed 'as is'.

## Language

Allows you to specify a language in a (somewhat) ISO639-1 format. Default language is 'en'.

Action Keyword can be combined with [date](DATE_KEYWORDS.md) / [daytime](DAYTIME_KEYWORDS.md) keyword parameters: __YES__

Currently, this keyword is __only__ used for WX reports from Openweathermap. In addition, it only provides a localised version of the wx free text, e.g. en=```snow```, de=```Schnee```, pl=```Snieg```. If you enable your MPAD instance for UTF-8 support, those parts of the nessage may contain e.g. cyrillic characters.
Currently, this keyword is __only__ used for the Fortuneteller /Magic8Ball keyword. If you enable your MPAD instance for UTF-8 support, those parts of the nessage may contain e.g. cyrillic characters.

#### Formats

Expand All @@ -686,8 +683,7 @@ Currently, this keyword is __only__ used for WX reports from Openweathermap. In

#### Example requests

- ```lang de```
- ```Erding;de lng pl``` returns a wx report for the city of Erding in Germany where the wx report's free text part will be in Polish.
- ```m8b lang de```

#### Supported languages

Expand Down
9 changes: 8 additions & 1 deletion docs/COMMANDS/DAYTIME_KEYWORDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ MPAD is able to understand the following keywords:
-
```tonite``` and ```tonight``` keywords will set the ```date``` keyword to ```today``` unless the user has already specified a different day.

All references are to UTC time zone settings.
MPAD 0.60 or later:
- WX reports: all references are in the user's local time zone (based on the coordinates associated with the user's call sign or the given reference such e.g. a city name)
- Night: 00:00 / 12AM local time
- Morning: 06:00 / 6AM local time
- Daytime: 12:00 / 12PM local time
- Evening: 10:00 / 6PM local time
- Note that this is also the order in which e.g. wx data is pulled. A day always starts with the "Night" and ends with the "Evening" values.
- Everything else: unless noted differently, all other time references are in UTC

Whereas noted for the respective [action keyword](ACTION_KEYWORDS.md), these daytime setting keywords (and also the [date](DATE_KEYWORDS.md) setting keywords) can be combined with the action keywords. Examples:

Expand Down
4 changes: 2 additions & 2 deletions docs/DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Dependent on your OS' flavor, you may be required to install the following addit
- [aprs.fi](https://aprs.fi/page/api) - thank you Hessu!
- [aprs-is](http://www.aprs-is.net/Default.aspx) - thank you Steve Loveall!
- [findu.com](https://www.findu.com) - thank you Steve Dimse!
- [openweathermap.org](https://www.openweathermap.org)
- [met.no](https://developer.yr.no/featured-products/forecast/) - thank you Meterologisk institutt!

Both aprs.fi and openweathermap.org require an API access key which needs to be added to the program's configuration file - see [installation instructions](INSTALLATION.md)
aprs.fi requires an API access key which needs to be added to the program's configuration file - see [installation instructions](INSTALLATION.md)

## Additional external data dependencies

Expand Down
Loading

0 comments on commit 936c462

Please sign in to comment.