NOAA space weather data in Home Assistant
Go to file
Cyberes 6b62346d99 add timestamp sensor for space weather pred., fix not correctly doing pred. for tommorow, get pred. card working 2024-08-18 14:49:30 -06:00
custom-component/space_weather add timestamp sensor for space weather pred., fix not correctly doing pred. for tommorow, get pred. card working 2024-08-18 14:49:30 -06:00
dashboard/www add timestamp sensor for space weather pred., fix not correctly doing pred. for tommorow, get pred. card working 2024-08-18 14:49:30 -06:00
lib ionex data is actually predictions 1 day ahead so get the current day not just the last one in the file list 2024-08-17 07:08:43 -06:00
.gitignore add files 2024-08-16 23:20:58 -06:00
LICENSE Initial commit 2024-08-16 19:28:05 -06:00
README.md ionex data is actually predictions 1 day ahead so get the current day not just the last one in the file list 2024-08-17 07:08:43 -06:00
main.py ionex data is actually predictions 1 day ahead so get the current day not just the last one in the file list 2024-08-17 07:08:43 -06:00
requirements.txt add files 2024-08-16 23:20:58 -06:00
vtec.service move service file 2024-08-16 23:41:54 -06:00

README.md

ha-noaa-space-weather-sensor

MQTT sensor to send NOAA space weather data to Home Assistant.

Install

  1. Create an account at https://urs.earthdata.nasa.gov
  2. pip install -r requirements.txt
  3. sudo apt install p7zip-full

Google Chrome

If you don't have Google Chrome installed (used to log into the NASA site), here's how to install it.

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install ./google-chrome-stable_current_amd64.deb

Run

The lat/lon range is used to pick the region of the planet for generating statistics, for example your home state. To

LAT_RANGE_MIN=<lower range for lat bounding box> \
LAT_RANGE_MAX=<upper range for lat bounding box> \
LON_RANGE_MIN=<lower range for lon bounding box> \
LON_RANGE_MAX=<upper range for lon bounding box> \
CDDIS_USERNAME=<username> CDDIS_PASSWORD=<password> \
MQTT_BROKER_HOST="<Home Assistant IP>" MQTT_BROKER_PORT=1883 MQTT_USERNAME="user" MQTT_PASSWORD="<password>" \
python3 main.py

An example systemd service file is provided.

Home Assistant MQTT Config

- state_topic: "space-weather/vtec"
  name: "VTEC"
  unit_of_measurement: "(10^16 el) / m^2"
  state_class: measurement
  unique_id: space_weather_vtec

Data

VTEC

https://www.spaceweather.gov/products/us-total-electron-content

Unit: (10^16 el) / m^2

VTEC, or Vertical TEC, is a specific type of TEC measurement that is taken along a path extending vertically from the Earth's surface to the edge of the atmosphere. So essentially, VTEC is a subset of TEC, with the difference lying in the specific path along which the measurement is taken.

Updated hourly.