Skip to content

cooldil/solaredge-exporter_dual-database

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SolarEdge InfluxDB and Prometheus monitor

This is a simple python tool to export SolarEdge inverter data to multiple monitoring platforms; InfluxDB as well as Promethus. It works by reading the inverter data from a SolarEdge inverter that has its ModBusTCP interface activated. It then connects via TCP, reads the SunSpec modbus registers via ModBusTCP, pushes the data to InfluxDB and exposes the values via an exporter for Prometheus consumption.

See https://www.solaredge.com/sites/default/files/sunspec-implementation-technical-note.pdf for details of the SunSpec implementation from solarEdge.

Docker Usage

docker run -d \ 
    -e INFLUX_SERVER=<hostname/IP of InfluxDB server - default=192.168.1.1> \ 
    -e INFLUX_PORT=<port InfluxDB is running on - default=8086> \ 
    -e INFLUX_DATABASE=<name of the InfluxDB database - default=solaredge> \
    -e INVERTER_IP=<hostname/IP of SolarEdge Inverter - default=192.168.1.2> \
    -e INVERTER_PORT=<ModbusTCP port on Inverter - default=502> \
    -e METERS=<number of Modbus meters attached to Inverter - default=0 range=0-3> \
    -e UNITID=<Modbus ID of Inverter - default=1> \
    -e PROMETHEUS_EXPORTER_PORT=<Port to have the prometheus exporter listen on - default=2112> \
    -e LEGACY_SUPPORT=<set to True to have Meter 1 prometheus metrics start with M_ vs M1_  default=False> \

Please replace user variables in the above command defined by <> with the correct values. Environment variables can be excluded if the defaults are suitable.

Docker Example

docker run -d \ 
    -e INFLUX_SERVER=192.168.1.50 \ 
    -e INVERTER_IP=192.168.1.200 \
    -e METERS=1 \

Command Line Usage:

./solaredge.py [inverter IP]

In addition, you can specify additional flags to customize the tool:

  • --influx_server specifies the IP or hostname of the InfluxDb (default localhost)
  • --influx_port specifies the port InfluxDb is running on (default 8086)
  • --influx_database specifies the InfluxDb database to use (default solaredge)
  • --unitid specifies the ModBus ID used by the inverter (default 1)
  • --inverter_port specifies the ModBus TCP port to connect to (default 1502)
  • --meters specifies the number of ModBus meters connected to the inverter (default 0) (range 0-3)
  • --prometheus_exporter_port specifies the port for Prometheus scraping (default 2112)
  • -d or --debug activates debug logging

About

SolarEdge to InfluxDb monitor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 98.2%
  • Dockerfile 1.8%