dorkhub

homeassistant-blitzortung

Custom Component for fetching lightning data from blitzortung.org

mrk-its
Python33451 forksMITupdated 2 days ago
git clone https://github.com/mrk-its/homeassistant-blitzortung.gitmrk-its/homeassistant-blitzortung

Blitzortung.org lightning detector

hacs_badge

Buy Me A Coffee

Blitzortung.org is a worldwide, real time, community collaborative lightning location network. This component uses Blitzortung data and provides real time notifications about lightning strikes in a given area (by default within 100km radius of your home). Data is served through a public MQTT server (dedicated to serve requests for this component) - thanks to geohash-based topics and some other optimizations, it greatly reduces amount of data sent to clients comparing to direct websocket connection to Blitzortung servers (it is also required by Blitzortung data usage policy - third party apps must use their own servers to server data for their own clients).

Features

  • distance and azimuth sensors of lightning strikes nearby
  • counter of lightning strikes
  • emits geo_location events for lightning strikes (visible on the map)
  • data is realtime, with average delay of few seconds

Manual installation

Place custom_components/blitzortung directory inside custom_components dir and restart Home Assistant

HACS installation

This component is available on HACS default

Configuration

To configure the integration go to Settings >> Devices & services >> Add integration and search for Blitzortung. During configuration there are two ways of providing the location:

  • By providing latitude and longitude. Blitzortung integration defaults to the home location of your Home Assistant instance but you can override that.
  • By providing a location entity (device_tracker, person or zone). Blitzortung integration will then follow the coordinates provided by the selected entity.

You can change the coordinates for an existing Blitzortung configuration using the reconfigure flow, go to Settings >> Devices & services >> Blitzortung >> 3 dot menu >> Reconfigure.

To change the detection radius, time window, and max tracked lightnings, go to Settings >> Devices & services >> Blitzortung >> Configure.

Important

If you use a location entity as the coordinate source, the integration will use new coordinates if the location changes by more than 25% of the radius length.

Important

Integration can create many new geo_location entities in a short time, especially if the radius is set to a large value. To protect the database from data floods, it is recommended to exclude the geo_location domain from processing by the recorder.

recorder:
  exclude:
    domains:
      - geo_location

Reviews and How-Tos

You can read and see (YouTube) how this component was used in the following community video. How to Add a Lightning Sensor

Dashboard Card

You can use the Weather Radar Card to show real time lightning strikes.

wradar-wind-lightening.mov

How to create dev environment

git clone https://github.com/mrk-its/homeassistant-blitzortung.git
cd homeassistant-blitzortung
python3.13 -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
prek install

more like this

esphome_modbus_bridge

ESPHome Modbus TCP↔RTU Bridge – Transparent bridge for ESP8266/ESP32 that lets multiple Modbus TCP clients communicate…

C++53

ESPGeiger

☢️ ESP8266 / ESP32 Firmware for collecting and reporting statistics from Geiger counters

C++53

search

search projects, people, and tags