mirror of
https://github.com/alexhopeoconnor/SunGather.git
synced 2026-10-23 02:52:10 +10:00
Improved error checking, added HTTP export, huge README update
This commit is contained in:
@@ -25,11 +25,11 @@
|
||||
## About The Project
|
||||
Access ModBus data from almost any network connected Sungow Inverter.
|
||||
|
||||
On first connection the tool will query your inverter, retreive the model and return the correct registers for your device. No more searching registers or creating model files.
|
||||
On first connection the tool will query your inverter, retrieve the model and return the correct registers for your device. No more searching registers or creating model files.
|
||||
|
||||
Register information based on official documentation: <a href="https://github.com/bohdan-s/Sungrow-Inverter/blob/main/Modbus%20Information/Communication%20Protocol%20of%20PV%20Grid-Connected%20String%20Inverters_V1.1.37_EN.pdf">Communication Protocol of PV Grid-Connected String Inverters</a> and <a hreh="https://github.com/bohdan-s/Sungrow-Inverter/blob/main/Modbus%20Information/communication-protocol-of-residential-hybrid-inverterv1.0.20-1.pdf">Communication Protocol of Residential Hybrid Inverters</a>
|
||||
|
||||
Has muliple export locations out of the box:
|
||||
Has multiple export locations out of the box:
|
||||
* Console - Log directly to screen
|
||||
* MQTT - Load into MQTT, and optionally Home Assistance Discovery
|
||||
* PVOutput - Load into PVOutput.org
|
||||
@@ -43,7 +43,6 @@ I have borrowed HEAVILY from the following projects, THANK YOU
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
|
||||
### TO DO
|
||||
* Commandline Arguments
|
||||
* Better Home Assistant Support
|
||||
|
||||
|
||||
@@ -81,16 +80,52 @@ python3 sungather.py
|
||||
docker pull bohdans/sungather
|
||||
docker run -v {path to}/config.yaml:/config/config.yaml -e TZ=Australia/Sydney --name sungather bohdans/sungather
|
||||
```
|
||||
Note: replace Australia/Sydney with relevent timezone
|
||||
Note: replace Australia/Sydney with relevant timezone
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
|
||||
|
||||
<!-- USAGE EXAMPLES -->
|
||||
## Usage
|
||||
|
||||
See config-exmaple.py it contains default options and comments.
|
||||
See config-example.py it contains default options and comments.
|
||||
|
||||
If you want to use the new Energy section in Home Assistant, follow the Home Assistant setup below.
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
|
||||
|
||||
## Exports
|
||||
|
||||
A collection of exports are available:
|
||||
|
||||
* console: Output information to console, useful for troubleshooting
|
||||
* http: Output to a simple website, default http://localhost:8080 or http://<serverip>:8080
|
||||
* mqtt: Output to a pre-existing MQTT server, needed for Home Assistant integration
|
||||
* pvoutput: Output to PVOutput.org, requires account and solar is set up on website first.
|
||||
|
||||
## Registers
|
||||
|
||||
This tool should be able to access most registers exposed.
|
||||
Set the following in config.yaml under inverters section.
|
||||
* level: 1 - This is the most useful data for day to day
|
||||
* Level: 2 - This should be everything your inverter supports
|
||||
* Level: 3 - This will try every register, you will get lots of 0/65535 responses for registers not supported.
|
||||
|
||||
* smart_meter: True - Set to true if you have a smart reader installed, this will return power usage at the meter box, without it you can not calculate house power usage.
|
||||
|
||||
### Useful Registers:
|
||||
This is just a brief list of registers I have found useful
|
||||
|
||||
**daily_power_yields** - Total Power in kWh generated today
|
||||
**total_power_yields** - Total Power in kWh generated since inverter install
|
||||
**total_running_time** - Total Hours inverter has been powered on since install
|
||||
**internal_temperature** - Internal temperature of the Inverter
|
||||
**total_active_power** - Current power being generated by the inverter in Watts
|
||||
**meter_power** - Power usage at the meter box, needs a smart meter installed. +ve means consuming from the grid, -ve means exporting to the grid
|
||||
**load_power** - Power being consumed in total
|
||||
**export_to_grid** - How much being currently exported to the grid. This is calculated from meter_power if -ve value, returned as a positive value
|
||||
**import_from_grid** - How much being currently imported from grid. This is calculated from meter_power if +ve value
|
||||
**timestamp** - Last time data was collected, based on Inverters clock by default
|
||||
|
||||
If you want to use the new Energy section in Home Assistant, follow the Home Assitant setup below.
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
|
||||
## Home Assistant setup
|
||||
@@ -143,7 +178,7 @@ sensor.sensor_inverter_import_from_grid_integral:
|
||||
friendly_name: Grid Import
|
||||
```
|
||||
Restart Home Assistant for the sensors.yaml and customize.yaml to be loaded.
|
||||
Make sure SunGather is running, wait 5 minutes for inital data to populate.
|
||||
Make sure SunGather is running, wait 5 minutes for initial data to populate.
|
||||
Navigate to the Energy platform (Configuration > Energy). Add these sensors to the following areas:
|
||||
|
||||
Electricity Grid > Grid Import - sensor.sensor_inverter_import_from_grid_integral
|
||||
|
||||
Reference in New Issue
Block a user