Package: alarmpy
🚨 Pikud Ha'oref Alarm TrackingA simple CLI tool for tracking Pikud Ha'oref alarms.Polls the unofficial API endpoint every second for incoming alarms. Prints active alarms as they occur. Prints routine messages once every 5 minutes by default.⚠️ Disclaimer ⚠️This tool is based on an unofficial API, and cannot be guaranteed to show correct or timely data.Do notuse it if human life is at stake.Do notassume it shows you correct data.Do notassume it works properly, or even works at all. Always follow official guidelines and procedures published byPikud Ha'oref.Further fine-print covering the terms of use of this tool can be found in theGPLv3 licensefile.InstallPipThe easiest way to install is from PyPI withpip:$pipinstallalarmpyYou can then run thealarmpyexecutable directly:$alarmpy--helpPipenvFor development usage it's recommended to clone the git repo and usepipenv:$gitclonehttps://github.com/yuvadm/alarmpy
$cdalarmpy
$pipenvsync-d
$pipenvrunalarmpyUsageFor the default usage after installation, just run:$alarmpyDisplaySet the output language using--language [en|he|ar|ru], this uses the official city and area name translations for Hebrew, Arabic, English and Russian.In case of RTL issues in the terminal use--reverseto output all names in reverse.Use--highlight abcin order to highlight any alarm which contains the stringabc.ProxyThe unofficial API is limited for use for Israeli-originating IPs only. In order to use alarmpy from outside Israel, users must route traffic through an Israeli exit point. TheHTTPS_PROXYenvironment variable is supported for this use case.AdvancedAdvanced flags can be set as described in the usage:$pipenvrunalarmpy--help
Usage:alarmpy.py[OPTIONS]Options:--language[en|he|ar|ru]Alertlanguage--highlightTEXTStringtosearchforandhighlightincaseofalarm--reverseReverseHebrew/ArabicoutputforterminalswithRTLbugs--polling-delayINTEGERPollingdelayinseconds--routine-delayINTEGERRoutinemessagedelayinseconds--alarm-idPrintalarmIDs--repeat-alarmsDonotsuppressongoingalarms--quietPrintonlyactivealarms--desktop-notificationsCreatepushnotificationsonyourdesktopnotificationcenter(currentlyonlyinMacOS)--mqtt-serverTEXTHostname/IPofMQTTserver(optional)--mqtt-client-idTEXTMQTTclientidentifier--mqtt-portINTEGERPortforMQTTserver--mqtt-topicTEXTTopiconwhichtosendMQTTmessages--mqtt-filterTEXTPayloadvaluetofilterbeforesendingasamessage(semicolonseparated)--output-testPrintadebugoutputandexit--helpShowthismessageandexit.MQTT NotificationsIntegration with an MQTT server provides the ability to send custom MQTT messages for all or some of the alerts that are received. MQTT requirespaho-mqttto be installed separately as an optional dependency.To enable, specify at least the following parameters via the command line:mqtt-server- The MQTT Server hostname or IP, e.g.localhostmqtt-topic- The MQTT topic to which the MQTT message will be sent, e.g.alarmpy/zoneAdditional optional parameters for MQTT integration are:mqtt-client-id- The ID of the MQTT client used by alarmpy. This will be used to connect to the MQTT server. Default:alarmPyClient. This only needs to be change in case you plan to have more than one instance of alarmpy runningmqtt-port- The port on which the MQTT server is listening to. Default:1883FilteringWhen MQTT is enabled, all alerts are sent as separate messages on the specified topic. In case there is a desire to include only specific alert, use themqtt-filterparameter to provide a semicolon separated list of substrings enclosed in double quotes. Each alert city and area will be checked against all filters, and only when a match is found, will an MQTT message be sent. For example:--mqtt-filter "gaza;negev".LicenseGPLv3