{"id":15306653,"url":"https://github.com/t0mer/redalert","last_synced_at":"2025-04-14T23:32:04.338Z","repository":{"id":38107039,"uuid":"223281530","full_name":"t0mer/Redalert","owner":"t0mer","description":"Ubuntu based image running python script that reads json from Oref Website. and publishes it over MQTT Protocol.","archived":false,"fork":false,"pushed_at":"2025-01-27T00:14:49.000Z","size":121,"stargazers_count":12,"open_issues_count":6,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T12:21:11.446Z","etag":null,"topics":["docker","home-assistant","homeassistant","mqtt","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/t0mer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-21T23:07:08.000Z","updated_at":"2025-01-27T00:14:52.000Z","dependencies_parsed_at":"2024-02-02T21:25:39.457Z","dependency_job_id":"bf957b59-4c24-4d6c-8273-1fd5298e854c","html_url":"https://github.com/t0mer/Redalert","commit_stats":{"total_commits":120,"total_committers":3,"mean_commits":40.0,"dds":0.04166666666666663,"last_synced_commit":"9376bcd79e3e35c78998fc6c87828851287ea2e8"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2FRedalert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2FRedalert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2FRedalert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t0mer%2FRedalert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t0mer","download_url":"https://codeload.github.com/t0mer/Redalert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248978969,"owners_count":21192883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","home-assistant","homeassistant","mqtt","python"],"created_at":"2024-10-01T08:06:43.881Z","updated_at":"2025-04-14T23:32:04.085Z","avatar_url":"https://github.com/t0mer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Red Alert Docker\n__________________________________________\n\nUbuntu based image running python script that reads json from [Oref Website](https://www.oref.org.il/). \u003cbr/\u003e\nand publishes it over MQTT Protocol.\n\n## Base Image\n`From ubuntu:18.04` described [here](https://hub.docker.com/_/ubuntu).\n\n\n## 18/05/2021 Major update\nThanks to the amazing work of [@caronc](https://github.com/caronc) on the [apprise](https://github.com/caronc/apprise) \nyou can now send notification using variety of notification channels, like:\n* Telegram - [tgram://bottoken/ChatID](https://github.com/caronc/apprise/wiki/Notify_telegram)\n* Home-Assistant - [hassio://user@hostname/accesstoken](https://github.com/caronc/apprise/wiki/Notify_homeassistant)\n* IFTTT - [ifttt://{WebhookID}@{Event}/](https://github.com/caronc/apprise/wiki/Notify_ifttt)\n* Slack - [slack://TokenA/TokenB/TokenC/Channel](https://github.com/caronc/apprise/wiki/Notify_slack)\n* Microsoft Teams - [msteams://TokenA/TokenB/TokenC/](https://github.com/caronc/apprise/wiki/Notify_msteams)\n\nAnd much musch more. you can find it all on the project [Wiki](https://github.com/caronc/apprise/wiki).\n\nThis update also contains:\n* Reducing the length of the data sends over the Mqtt prorocol, it is now contains regions only.\n* Added detaild log.\n* Fixed the bug that causing sendind multiple alerts.\n\n## Image configuration\n### Enviroment variables\n- *MQTT_HOST*\u003c/br\u003e\nused for setting the MQTT Broker address, default value is `127.0.0.1`.\n- *MQTT_PORT*\u003c/br\u003e\nused for setting the MQTT Broker Port, default value is `1883`.\n- *MQTT_USER*\u003c/br\u003e\nused for setting the MQTT Broker Username, default value is `user`.\n- *MQTT_PASS*\u003c/br\u003e\nused for setting the MQTT Broker Password, default value is `password`.\n- *DEBUG_MODE*\u003c/br\u003e\nused for setting the script to run in test mode wich will read json from test url.\n- *INCLUDE_TEST_ALERTS*\u003c/br\u003e\nused to show pikud ha oref tests, default is False.\n- *REGION*\u003c/br\u003e\nused for setting the region for monitoring. default is * (any)\n- *NOTIFIERS*\u003c/br\u003e\nuse apprise notification. you can use multiple notifiers separated by space python for example: \u003c/br\u003e\n```tgram://bottoken/ChatID hassio://user@hostname/accesstoken slack://TokenA/TokenB/TokenC/Channel```\n- *MQTT_TOPIC*\u003c/br\u003e\nCustom MQTT Topic. default value is `/redalert`\n\n\n## Usage\n### Run from hub\n#### docker run from hub\n```text\ndocker run  -e MQTT_HOST=\"broker ip / fqdn\" -e MQTT_PORT=\"1883\" -e MQTT_USER=\"username\" -e MQTT_PASS=\"password\" -e DEBUG_MODE=\"False\" -e REGION=\"*\" --name redalert techblog/redalert:latest\n```\n\n#### docker-compose from hub\n```yaml\nversion: \"3.6\"\nservices:\n  redalert:\n    image: techblog/redalert\n    container_name: redalert\n    restart: always\n    environment:\n      - MQTT_HOST=[Broker Address]\n      - MQTT_USER=[Broker Username]\n      - MQTT_PASS=[Broker Password]\n      - DEBUG_MODE=False\n      - REGION=[* for any or region name)\n      - NOTIFIERS=[Apprise notifiers]\n      - INCLUDE_TEST_ALERTS=[False|True]\n      - GREEN_API_INSTANCE = #GREEN_API_INSTANCE\n      - GREEN_API_TOKEN = #GREEN_API_TOKEN\n      - WHATSAPP_NUMBER = #WHATSAPP_NUMBER\n    restart: unless-stopped\n```\n### Adding Sensor in Home-Assistant\n#### Get full json (including date and id)\n```yaml\n  - platform: mqtt\n    name: \"Red Alert\"\n    state_topic: \"/redalert/\"\n    # unit_of_measurement: '%'\n    icon: fas:broadcast-tower\n    value_template: \"{{ value_json }}\"\n    qos: 1\n```\n\n#### Get json with alert areas only\n```yaml\n  - platform: mqtt\n    name: \"Red Alert\"\n    state_topic: \"/redalert/\"\n    # unit_of_measurement: '%'\n    icon: fas:broadcast-tower\n    value_template: \"{{ value_json.data }}\"\n    qos: 1\n```\n\n#### Alaram state (Value will be on/off)\n```yaml\n  - platform: mqtt\n    name: \"Red Alert\"\n    state_topic: \"/redalert/alarm\"\n    icon: fas:broadcast-tower\n    value_template: \"{{ value_json }}\"\n    qos: 1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft0mer%2Fredalert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft0mer%2Fredalert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft0mer%2Fredalert/lists"}