https://github.com/qcda1/ha_midnite_classic
Home Assistant integration to get Midnite Solar Classic solar charge controller data into HA
https://github.com/qcda1/ha_midnite_classic
classic hacs-integration homeassistant homeassistant-integration midnite solar
Last synced: 3 months ago
JSON representation
Home Assistant integration to get Midnite Solar Classic solar charge controller data into HA
- Host: GitHub
- URL: https://github.com/qcda1/ha_midnite_classic
- Owner: qcda1
- Created: 2026-03-28T20:20:57.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-04-07T18:51:11.000Z (4 months ago)
- Last Synced: 2026-04-07T20:36:15.766Z (4 months ago)
- Topics: classic, hacs-integration, homeassistant, homeassistant-integration, midnite, solar
- Language: Python
- Homepage:
- Size: 673 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Midnite Solar Classic — Home Assistant Integration
---
### Custom integration for **Midnite Solar Classic 150** solar charge controllers (and compatible models). Communicates with the device over **Modbus TCP**.
## Features
- Periodic polling of all Classic registers via Modbus TCP
- Configurable polling interval from **10 to 3,600 seconds**
- Select which parameters to expose as HA entities via the UI
- Connection validation and automatic device name retrieval during setup
- Multi-device support (multiple Classic controllers with different IP addresses)
- Options flow (⚙️ icon) to change interval and parameters without reconfiguring (To be fixed)
## Requirements
| Component | Description |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Home Assistant OS | Built on version 2026.3+ |
| pymodbus | Built with version ≥ 3.6.0 (installed automatically in HAOS) |
| network | The Classic must be connected to the local network and reachable from Home Assistant.Need the address and the Classic's name must be set in the unit. See Network in user manual. |
## Installation
### 1 - Install HACS (if not allready done)
- Goto Settings → Devices & Services → Add integration
- Find HACS and follow the installation
- Login with GitHub
### 2 - Add the repository as a Custom repository
In the HACS interface:
- Click on the 3 dots on top right corner
- Select Custom repositories
- Add the repo's URL [https://github.com/qcda1/ha_midnite_classic](https://github.com/qcda1/ha_midnite_classic)
- Use Type Integration
- Click Add
### 3- Add the integration through HACS
Once the addition of the repository:
- Search for Midnite Solar Classic in HACS
- Click on "Download"
- Restart Home Assistant: Settings → System → Restart (Restart icon top right).
### 4 — Add the integration
Settings → Devices & services → **+ Add integration** → search for **Midnite Solar Classic**.
## Configuration
### Step 1 — Connection
| Field | Description | Default |
| --------------- | -------------------------------------- | ------- |
| IP Address | Classic's IP on the local network | — |
| Modbus TCP Port | Classic's Modbus server port | **502** |
| Interval (s) | Polling frequency in seconds (30–3600) | **60** |
The integration connects immediately to validate the connection and read the device name (`Name` register).
### Step 2 — Monitored parameters
A checklist displays all parameters returned by your Classic.
Checked by default:
`BatVoltage`, `PVVoltage`, `BatCurrent`, `EnergyToday`, `Power`, `ChargeStage`, `State`, `PVCurrent`, `TotalEnergy`, `Name`, `ChargeStateText`
## Created entities
Each selected parameter becomes a `sensor` entity with unit, device class and state class assigned automatically.
For example:
| Parameter | Unit | Class |
| --------------- | ---- | ------------------------- |
| BatVoltage | V | voltage / measurement |
| PVVoltage | V | voltage / measurement |
| BatCurrent | A | current / measurement |
| Power | W | power / measurement |
| EnergyToday | kWh | energy / total_increasing |
| TotalEnergy | kWh | energy / total_increasing |
| ChargeStateText | — | — |
## Options
Click ⚙️ to change the polling interval or the monitored parameter list.
Changes take effect immediately.
## Multiple Classic controllers
Repeat "Add integration" with a different IP address for each device.
## Troubleshooting
| Symptom | Solution |
| -------------------- | ------------------------------------------------------------------------ |
| "Cannot connect" | Check IP, port, and that the Classic is powered on and reachable from HA |
| Unavailable entities | Check HA logs: Settings → System → Logs |
| pymodbus error | Restart HA — pymodbus ≥ 3.6.0 is installed automatically |
## License
MIT.
Based on the work of [ClassicDIY/ClassicMQTT](https://github.com/ClassicDIY/ClassicMQTT) and [qcda1/MidniteClassic](https://github.com/qcda1/MidniteClassic).
### Exemple config / Config example
