Skip to content

Commit

Permalink
final cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joergschultzelutter committed Apr 23, 2024
1 parent 07f8bd9 commit afd0c98
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 52 deletions.
10 changes: 1 addition & 9 deletions docs/ADDITIONAL_INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,8 @@ The potential side effect for this constraint is that if you start the program a

- In order to match with a given watch area, the user's coordinates (```mowas_watch_areas``` from the program config file) have either to be _inside_ of the given polygon or _intersect_ with it.
- Currently, there is no option that enables the user to specify and additional proximity to that polygon ("Polygon plus 10km distance")
- This program uses native MOWAS data. All warning messages are in German. However, you can activate an auto-translation for these messages (via [deepl](www.deepl.com)). The translated content will be displayed _in_ _addition_ to the original German text (Email, Telegram) which should make it easier for German citizens to help you in case of emergencies. Due to the lack of UTF-8 support, the DAPNET part of the program will only support English for translated content and will ignore translations in other languages.
- Obviously, the current version of this program does not scale and cannot support multiple user's needs with just one program instance - you can specify only _one_ DAPNET/Telegram/Email target account.
- This program uses native MOWAS data. All warning messages are in German. However, you can activate an auto-translation for these messages (via [deepl](www.deepl.com)). The translated content will be displayed _in_ _addition_ to the original German text (Email, Telegram) which should make it easier for German citizens to help you in case of emergencies. Due to the lack of UTF-8 support, SMS messages will be rendered as plain ASCII.
- As the MOWAS APIs are not officially available to end users, government authorities might either terminate the services without notice and / or change the format settings of the services that are currently exposed (but not officially available to end users)
- Although all MOWAS messages do contain warncell references (which allows the program's DAPNET part to use the region's abbreviated region description), certain messages do contain invalid warncell identifiers. If such an case is encountered, MOWAS will use the (lenghty) original regional description instead. For DAPNET messages which are limited to 80 characters per message, the program will try to shorten that description by removing some clutter from that message.
- If you want to use this program for a different country's warning system:
- remove the call for retrieving the 'warncell' information - this one is only relevant to German users
- replace the MOWAS module with your country's native warn system parser code
- change the DAPNET message group setting from ``dl-all`` (Germany) to your locale's transponder group.
- There is no message dupe check _on a content level_; if the same message is present in more than one MOWAS category and ``mowas-pwb`` deemed this message to be valid for your coordinates and program parameters' selection, you may receive that message more than once - unless the MOWAS government feed provides the message with the same unique identifier.
- All MOWAS messages contain a LOT of text, meaning that DAPNET users will likely receive a lot of messages in case an alarm is triggered (keep in mind that DAPNET is limited to 80 chars per messages). Unfortunately, abbreviated warning messages are not available.
- You may want to set up you Telegram bot as a private bot, thus preventing other Telegram users from discovering and using it. Good instructions on how to do this can be found here: [https://sarafian.github.io/low-code/2020/03/24/create-private-telegram-chatbot.html](https://sarafian.github.io/low-code/2020/03/24/create-private-telegram-chatbot.html).

Have a look at the [legal information](LEGAL.md)
12 changes: 6 additions & 6 deletions docs/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ The following section describes the command line parameters which can be used to
[--standard-run-interval STANDARD_RUN_INTERVAL]
[--emergency-run-interval EMERGENCY_RUN_INTERVAL]
[--ttl TIME_TO_LIVE]
[--dapnet-destination-callsign DAPNET_DESTINATION_CALLSIGN]
[--telegram-destination-id TELEGRAM_DESTINATION_ID]
[--follow-the-ham FOLLOW_THE_HAM]
[--warning-level {MODERATE,MINOR,EXTREME,SEVERE}]
[--dapnet-high-prio-level {MODERATE,MINOR,EXTREME,SEVERE}]
[--high-prio-level {MODERATE,MINOR,EXTREME,SEVERE}]
[--email-recipient EMAIL_RECIPIENT]
[--enable-covid-content]
[--translate-to TARGET_LANGUAGE]
Expand All @@ -32,10 +30,10 @@ The following section describes the command line parameters which can be used to
| ``ttl`` | This numeric value defines the time-to-live for the program's decaying memory dictionary in hours. Default is ``8`` (hours); once a message has been present in the program's decaying memory cache for __ttl__ hours, it will be resent to the user. See the separate chapter on how the TTL logic works. |
| ``follow-the-ham`` | This will _not_ provide you with the directions to the nearest restaurant :meat_on_bone: but enables you to track one APRS call sign's position. In addition to the program's default set of (static) coordinates which are monitored by default, this option will look up the user's call sign on aprs.fi, retrieve its lat/lon coordinates and then monitor these dynamic coordinates, too. This is a useful option if you're in a disaster area along with your APRS-capable HT and need to be aware of any dangers and emergencies that might be related to your current position. __Please use this option responsibly and only when necessary__. This program option is __not__ supposed to be used on a permanent basis. Remember: with great power comes great responsibility. This program option has no default setting, meaning that unless you specify a call sign, only the static coordinates from the program's config file will be monitored. |
| ``warning-level`` | Defines the minimal warning level that a message must have before the program considers it for processing. Currently, MOWAS supports four warning levels (listed in ascending order of importance): ``MINOR`` (default setting), ``MODERATE``, ``SEVERE`` and ``EXTREME``. If your message's warning level is below the given value for the ``warning-level`` parameter, it will be ignored - even if its coordinates match with your watch coordinates. |
| ``high-prio-level`` | Similar to the ``warning-level`` parameter, you can specify a MOWAS warning threshold for MOWAS messages of the "Alert" and "Update" categories. If the MOWAS messages' warning level is greater or equal to ``dapnet-high-pro-level``, then the outgoing DAPNET message will be sent to the user with high priority. In any other case, normal priority settings will be applied. Note that MOWAS "Cancel" messages will always be sent with standard priority. Default value for this option is ``SEVERE``. |
| ``high-prio-level`` | Similar to the ``warning-level`` parameter, you can specify a MOWAS warning threshold for MOWAS messages of the "Alert" and "Update" categories. If the MOWAS messages' warning level is greater or equal to ``high-pro-level``, then the outgoing message will be sent to the user with high priority (whereas supported by the Apprise messenger target). In any other case, normal priority settings will be applied. Note that MOWAS "Cancel" messages will always be sent with standard priority. Default value for this option is ``SEVERE``. |
| ``enable-covid-content`` | By default, ``mowas-pwb`` __suppresses__ Covid related alerts. Due to the sheer number of Covid related messages issued by the German government on a daily basis, I've added this constraint which simply omits all messages containing the terms ``covid`` or ``corona``. If you still want to receive these messages, you can set this program flag. |
| ``translate-to`` | allows users to auto-translate the MOWAS messages. This option uses [www.deepl.com](www.deepl.com) and requires that you configure a deepl.com API access key in the program's configuration file. The language code needs to be provided in ISO-639-1 format. Valid language codes: ``bg``,``cs``,``da``,``el``,``en-gb``,``en-us``,``es``,``et``,``fi``,``fr``,``hu``,``it``,``ja``,``lt``,``lv``,``nl``,``pl``,``pt-br``,``pt-pt``,``ro``,``ru``,``sk``,``sl``,``sv``,``zh``. As DAPNET messages do not support unicode, the only valid language codes for _translated_ DAPnet messages are ``en-us`` and ``en-gb`` |
| ``text-summarizer`` | Used for all SMS messages. Valid settings: ``internal`` (default), ``generic``, ``openai``, ``palm``. ``openai`` and ``palm`` require additional access keys in the program's config file |
| ``translate-to`` | Allows users to auto-translate the MOWAS messages. This option uses [www.deepl.com](www.deepl.com) and requires that you configure a deepl.com API access key in the program's configuration file. The language code needs to be provided in ISO-639-1 format. Valid language codes: ``bg``,``cs``,``da``,``el``,``en-gb``,``en-us``,``es``,``et``,``fi``,``fr``,``hu``,``it``,``ja``,``lt``,``lv``,``nl``,``pl``,``pt-br``,``pt-pt``,``ro``,``ru``,``sk``,``sl``,``sv``,``zh``. |
| ``text-summarizer`` | Used for all SMS messages. Valid settings: ``internal`` (default), ``generic``, ``openai``, ``palm``. Both ``openai`` and ``palm`` require additional access keys in the program's config file. |
| ``localfile`` | Optional file name, used for testing purposes only. Specify a local MOWAS json file name and use it as sole data source. |

If you have specified the ``follow-the-ham`` parameter AND aprs.fi's access key is configured,``mowas-pwb`` will initiate one request to ``aprs.fi`` during its startup process. This pre-check allows it to detect if the call sign does exist on aprs.fi and if the aprs.fi API access key is configured in a proper way. If that check is not passed successfully, the program startup will abort. Any _further_ errors in retrieving that call sign's position data during its processing cycles will _not_ cause a program error, though. ``mowas-pwb`` will simply continue to monitor the static watch areas which were specified in the program config file; the call sign's availability on aprs.fi simply might have expired.
Expand All @@ -50,4 +48,6 @@ If you have specified the ``follow-the-ham`` parameter AND aprs.fi's access key

At least __one__ of these three output options (``messenger-config-file`` _or_ ``sms-messenger-config-file`` _or_ ``email-recipient``) needs to be configured in the program's config file __and__ also provided via command line parameters - otherwise, the program will exit with an error message during startup. Keep in mind that you can disable notification options without the need for modifying the program configuration file.

An Apprise demo YAML template can be found [here](https://github.com/joergschultzelutter/mowas-pwb/blob/master/src/apprise_demo_template.yml).

Have a look at the [program's processing logic and known issues](ADDITIONAL_INFO.md)
Loading

0 comments on commit afd0c98

Please sign in to comment.