Record when the server received a request and use that, not the time the inverter answered, for the cache window, so slow inverter reads no longer shorten or stretch it for other clients. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Deye Dashboard
A Flask-based application for monitoring Deye Inverters (and compatible models) using the Solarman V5 protocol. This tool connects directly to the inverter via Modbus over TCP to read real-time data including voltages, currents, battery status, and BMS information.
Features
- Real-time Monitoring: Reads critical data such as Input/Output Voltage, Grid/Load Currents, Battery SOC, Temperature, and Power.
- BMS Integration: Retrieves Battery Management System (BMS) data for any of up to 15 battery packs. All pack slots are scanned at start-up and every 5 minutes; packs that report only zeros are hidden, and byte-swapped packs are detected automatically.
- Web Interface: Provides a user-friendly dashboard to view inverter status (served at
/). - Settings Editor: The dashboard can change registers 230 (grid charge current, 0–115 A) and 293 (grid peak shaving power, 0–6500 W), with strict validation on both the page and the server, read-back verification, and a Default button (43 A / 4500 W). Limits live in
writable_registers.py. There is no authentication, so only expose the app on a trusted network. - JSON API: Exposes raw data via a RESTful endpoint (
/api/data) for integration with other systems. - PDF Utility: Includes a tool to extract register information from Deye Modbus PDF manuals.
Prerequisites
- Python 3.x
- A Deye Inverter (or compatible) connected to the network.
- Inverter IP address, Serial Number, and Modbus Slave ID.
Installation
-
Clone the repository:
git clone https://git.vaku.org.ua/VaKU/deyeDashboard.git cd deyeDashboard -
Create and activate a virtual environment:
python -m venv venv # Windows .\venv\Scripts\activate # Linux/Mac source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt -
Configuration:
Copy the example configuration file and update it with your inverter details:
cp config.py.example config.pyEdit
config.py:INVERTER_IP = "192.168.x.x" INVERTER_SERIAL = 1234567890 INVERTER_PORT = 8899 INVERTER_SLAVE_ID = 1
Usage
-
Start the application:
python app.py -
Access the dashboard:
Open your web browser and navigate to
http://localhost:5000.
Utilities
Register Reader/Writer
test/read_registers.py reads (and optionally writes) holding registers using the settings from config.py or environment variables.
python test/read_registers.py # default register list
python test/read_registers.py --read 185 --read 600-627 --read 314:12 # N, START-END or START:COUNT
python test/read_registers.py --write 230 43 # whitelisted, range-checked writes
PDF Register Extractor
Located in docs/extract_pdf.py, this script helps identify Modbus registers from Deye PDF manuals.
Usage:
- Install the extra dependency:
pip install -r docs/requirements.txt - Place your PDF manual in the
docs/folder (the first*.pdfthere is used), or pass--pdf PATH. - Run the script (optionally
--registers 94 245 320and--output PATH):python docs/extract_pdf.py - Check
docs/pdf_output.txtfor the extracted register locations and context.