Skip to content

gitcodebob/HA-history-graph-csv-export-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Signal Frequency Analysis for Home Assistant PID Error Data

This project analyzes the frequency components of error signals exported from Home Assistant's history graph (e.g., PID controller error). It provides a GUI to select a CSV file, visualizes the signal and its spectrum, and prints dominant frequencies.

Features

  • GUI file picker for CSV selection
  • Handles Home Assistant history graph CSV format (columns: entity_id, state, last_changed)
  • Plots error signal and its frequency spectrum side by side
  • Prints top 5 dominant frequency components
  • Example CSV (example.csv) included for demo purposes

Setup

  1. Clone this repository
  2. Create a virtual environment (optional but recommended):
    python -m venv .venv
    .venv\Scripts\activate  # On Windows
    source .venv/bin/activate  # On Linux/Mac
  3. Install dependencies:
    pip install -r requirements.txt

Usage

Run the analysis script:

python analyse_frequency.py
  • Select your Home Assistant history graph CSV when prompted.
  • If you want to try the example, select example.csv.

CSV Format

The script expects a CSV with at least these columns:

  • entity_id (string)
  • state (float, the error value)
  • last_changed (timestamp)

Troubleshooting

  • If you see errors about missing columns, check your CSV format.
  • If you do not select a file, the script will offer to use example.csv if present.

License

MIT License

About

Analyse exports made using Home Assistants history graph export

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages