Script collection for monitoring older Samil Solar River inverters using the RS232 (serial) connection, and logging data to InfluxDB.
- Logging Solar Inverter Output with a Raspberry Pi by Lucas Costi
- inverter_monitor Perl Scripts by trollkarlen
- Publishing Solar River inverter stats using a Raspberry PI computer by belly
- CMS200 Inverter RS232 Serial Port Hack Thread (now offline)
- SolarRiver 3600TL (my inverter)
- SolarRiver SP2200
Please raise an issue if it works for you and your inverter is not listed!
- A RS232 to USB or UART adapter
- Raspberry Pi (or similar) running a modern version of Linux
- A Samil SolarRiver inverter with RS232
You will need:
- Git
- Python3 and Pip3
- Perl
- Various Packages
To install Git, Perl and Pip
sudo apt install git perl python3 python3-pip
Next, install the Perl and Python dependencies
sudo cpan # This will drop you in to the CPAN shell
install AppConfig Device::SerialPort HTTP::Request::Common LWP::UserAgent
exit
pip3 install influxdb configparser
Lastly, clone the repository (replace /home/pi with the directory you want)
cd /home/pi
git clone https://github.com/kevdagoat/samil-influxdb-collector ii
Simply run:
/home/pi/ii/run.sh
and the process will be spawned in the background.
To make this process automatic, I suggest using a crontab. In my case, I have set it to start at 6am. Make sure this isn't before the start time defined in config.ini as it will instantly fail!
* 6 * * * /home/pi/ii/run.sh
In influx.ini
is the InfluxDB connector configuration and config.ini
contains the polling perl script configuration.