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.
- 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
- Clone this repository
- Create a virtual environment (optional but recommended):
python -m venv .venv .venv\Scripts\activate # On Windows source .venv/bin/activate # On Linux/Mac
- Install dependencies:
pip install -r requirements.txt
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.
The script expects a CSV with at least these columns:
entity_id(string)state(float, the error value)last_changed(timestamp)
- 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.csvif present.
MIT License