Skip to content
caiosweet edited this page Dec 19, 2021 · 9 revisions

Welcome to the Package-Natural-Events wiki!

Requirements

Burze.dzis.net sensor

DPC - ITALY METEO-HYDRO ALERT - Civil Protection Department

INGV - National Institute of Geophysics and Volcanology

MeteoAlarm (EUMETNET)

GDACS - Global Disaster Alert and Coordination System

Packages

HACS (Home Assistant Community Store)

Lovelace Custom Cards

lovelace-card-tools

lovelace-auto-entities

lovelace-card-mod

lovelace-fold-entity-row

vertical-stack-in-card

lovelace-paper-buttons-row

config-template-card

Optional

Not yet implemented in the package

Blitzortung

text-divider-row

Configuration secrets.yaml

###########################################################
## EXAMPLE NATURAL EVENTS SECRETS FILE
###########################################################
## DEFAULT
pkg_natural_events_script: "script.notify_hub"
pkg_natural_events_notify: "telegram"
pkg_natural_events_google: "media_player.red,media_player.black,media_player.black_due"
pkg_natural_events_alexa: "media_player.sala,media_player.studio"
pkg_natural_events_service_tts: "tts.google_translate_say"

## DND TTS (Orario Non Disturbare - Per script.notify_hub)
pkg_natural_events_dnd_start: "23:00"
pkg_natural_events_dnd_stop: "07:00"

## FOLDER DOWLOADS [Se la cambi, ricorda di farlo anche in lovelace!]
pkg_natural_events_download_dir: "/config/www/hassiohelp/downloads/"

## CONFIGURATION
pkg_natural_events_latitude_home: 41.9109
pkg_natural_events_longitude_home: 12.4818
pkg_natural_events_radius_geoalert: 1000000 # Metri
pkg_natural_events_radius_meteoalert: 25000 # Metri
pkg_natural_events_magnitude: 2.0
pkg_natural_events_radius_quake: 1000 # Km
pkg_natural_events_meteoalarm_region: "Lazio"
pkg_natural_events_meteoalarm_custom_id: "IT012-Lazio"
pkg_natural_events_burze_api_key: "x123456789012xx12xxx12aa345bb6c67890d12e"
pkg_natural_events_radius_burze: 25 # Km

Antoher exaple

###########################################################
## EXAMPLE NATURAL EVENTS SECRETS FILE TEMPLATE OR ENTITY
###########################################################
## DEFAULT
pkg_natural_events_script: "{{states('input_select.centro_notifiche')}}"
pkg_natural_events_notify: "{{states('input_select.text_notify')|lower}}"
pkg_natural_events_google: "{{states('sensor.media_player_google')}}"
pkg_natural_events_alexa: "{{states('sensor.media_player_alexa')}}"
pkg_natural_events_service_tts: >
  tts.{{states('input_select.tts_notify')|lower
  |replace(' ','_')|replace('google','google_translate')
  |replace('reverso','reversotts_say')|default('google_translate_say')}}

## DND TTS (Orario Non Disturbare - Per script.notify_hub)
pkg_natural_events_dnd_start: "input_datetime.dnd_start_weekdays"
pkg_natural_events_dnd_stop: "input_datetime.dnd_end_weekdays"

## FOLDER DOWLOADS [Se la cambi, ricorda di farlo anche in lovelace!]
pkg_natural_events_download_dir: "/config/www/hassiohelp/downloads/"

## CONFIGURATION
pkg_natural_events_latitude_home: 41.9109
pkg_natural_events_longitude_home: 12.4818
pkg_natural_events_radius_geoalert: 50000 # Metri
pkg_natural_events_radius_meteoalert: 25000 # Metri
pkg_natural_events_magnitude: 3
pkg_natural_events_radius_quake: 300 # Km
pkg_natural_events_meteoalarm_region: "Lazio"
pkg_natural_events_meteoalarm_custom_id: "IT012-Lazio"
pkg_natural_events_burze_api_key: "x123456789012xx12xxx12aa345bb6c67890d12e"
pkg_natural_events_radius_burze: 25 # Km

N.B pkg_natural_events_script: "{{states('input_select.centro_notifiche')}}"

This is a selector I made myself, to change scripts on the fly and test them.

input_select:
  centro_notifiche:
    options:
      - script.my_notify
      - script.notify_hub

If you just want to use the "Centro Notifiche" (Notifier App) script only, obviously it goes like this:

pkg_natural_events_script: "script.my_notify"

Work in progress

SCRIPT INTERNAL (script.notify_hub)

service: script.notify_hub
data:
  title: <title for the notification>
  message: <message>
  notify: <notify or more then one service notificstion> (next release)
  url: <url for send a photo>
  file: <file for send a photo>
  link: <URLs format in markdown for link with alias>
  alexa: <bool/dict>
    message: <message> or message_tts: <message>
    media_player: <media_playeror or more then one media player>
    audio: <From Alexa Skills Kit Sound Library for send initial sound>
  google: <bool/dict>
    message: <message> or message_tts: <message>
    media_player: <media_player or more then one media player>
    audio: <audio url file for send initial sound>

Download package

wget -N
https://raw.githubusercontent.com/caiosweet/Package-Natural-Events/main/config/packages/natural_events.yaml
-P /config/packages/