Get Sofar Inverter's data from solarman logger. Tested with LSW-3 (SN 17xxxxxxx, 21xxxxxx)
Clone whole project from github and put in crontab to run in intervals.
- Sofar Inverter support.
- Language support (Polish, English).
- Cleaned SOFARMap.xml file.
To upgrade overwrite all previous project files. To use prometheus+graphana support:
- Configure prometheus options in config.cfg
- Serve prometheus metrics file using any web server (name it index.html to be the default page in configured path)
- Configure prometheus target to access the file
- Add Prometheus datasource in Grafana
- Import grafana_en/pl.json file (Dashboards->Manage->Import). Enjoy :)
- Prometheus + grafana support.
- Verbose mode.
- 4-byte values (Total production, Total generation time) calculated correctly.
To upgrade overwrite all previous project files. To use prometheus+graphana support:
- Configure prometheus options in config.cfg
- Serve prometheus metrics file using any web server (name it index.html to be the default page in configured path)
- Configure prometheus target to access the file
- Add Prometheus datasource in Grafana
- Import grafana_en/pl.json file (Dashboards->Manage->Import).
To use InfluxDB support:
- Install InfluxDB
- Create database to store data (i.e: create database Data)
- Configure InfluxDB options in config.cfg
- Add InfluxDB datasource in Grafana (name it InfluxDB)
- Import grafana_ifdb_en/pl.json file (Dashboards->Manage->Import). Enjoy :)
- InfluxDB support
- Totaltime and totalpower zeroed befor being sent to MQTT (thx to pablolite for pointing that one out)
To upgrade overwrite all previous project files.
- Prometheus integration code (write to a file all data at once).
- Script writes values to InfluxDB/Promtheus/MQTT only if inverter status is Normal. In other states values can be unreliable - especially when inverter is starting in the morning.
- Grafana dashboard for InfluxDB datasource was changed and fixed in a few places.
To upgrade overwrite all previous project files.
- New script to read hardware/software/SN info from inverter. Two new files: InverterHWData.py (main script) and SOFARHWMap.xml (register configuration)
A few additions and changes.
- New parameters in config.cfg to define register address ranges
- Checking if logger response is correct (no empty values for defined registers). If not - report end exit.
- config.cfg format has slightly changed
MQTT support refactored and fixed
- New parameters in config.cfg for MQTT integration
- MQTT TLS support
- Always output data in JSON format (no matter if MQTT is enabled or not)
MQTT support (tested with Mosquitto)
Domoticz MQTT support
- New parameter in config.cfg to enable Domoticz MQTT support
- DomoticzIdx parameter in SOFARMAP.xml
- Removed unused parserRule parameter from SOFARMap.xml
Fix version
- Small fix for duplicated quotes for string values in MQTT Domoticz messages.
Fix version
- Reliable messages delivery to MQTT/Domoticz.
HomeAssistant support
- Home Assistant support (via MQTT) - code courtesy of @pablolite
- Minor cleanups.
MQTT support (including Domoticz/HomeAssistant) refactored
- Sending inverter's status to MQTT/Domoticz/HomeAssistant when the device is turned off.
- Basic MQTT message output as a separate option (independent from Domoticz or HomeAssistant support)
- Dedicated MQTT topic settings for basic support, Domoticz and HomeAssistant
- Additional parameters in config.cfg for above changes
Fixes, code refactoring and clean-ups
- Logger connecting messages in verbose mode
- Some code refactoring and unnecesarry parts removal
- Sending offline status to MQTT (basic, Domoticz, HomeAssistant)
Fix
- Small fix for potential charmap_decode error (especially in Windows environment)
Report 0 if logger/inverter is offline
Now script writes 0 to InfluxDB for all monitored parameters if logger/inverter is offline It helps getting more acurate data agregations (i.e. in Grafana)
Fixes, additional file and debug logging, InfluxDB v2.x support
- Logfile configuration in config.cfg
- Additional debug option in config.cfg - enables additional debug info written to a log file
- InfluxDB support now requires InfluxDB v2.x (instead of 1.x).
- InfluxDB config section in config.cfg to reflect InfluxDB v2.x access requirements
- Endless data gathering loop when inverter's status <> 0 (ready), that flooded logger and made it hang. That fixes issue #46