Skip to content

cole8888/SRNE-Solar-Charge-Controller-Monitor

Repository files navigation

SRNE-Solar-Charge-Controller-Monitor

Read data from SRNE solar charge controllers via modbus over RS232.

This repository contains several example programs for reading data from SRNE solar charge controllers using Raspberry Pi, ESP32, ESP8266 and Arduino Nano / Uno.

Based on the modbus manuals, this should also work with some Renogy controllers, but I don't have one to test with. Also, verify the wiring is compatible with your controller.


Example Setups:

Here are some example programs to get started. If you follow the setup instructions in the readme files of each directory, you should be able to talk to your controller. If you are just getting started, don't use the MQTT ones.


Web-Interface and MQTT

I've included an example web interface you can use in combination with the MQTT-enabled example programs. To use it, you will need to setup an MQTT broker such as Mosquitto or use a cloud broker. You will also need to set all the appropriate settings in the chosen program and the index.js file.

Web-Interface-Screenshot

I also included my custom web interface which I am using for my setup. It has the ability to read data from and control smart plugs flashed with Tasmota.


My Current Setup:

The setup I use is a customized version of the ESP32 Example, I also designed a custom PCB. Have a look at My-Current-Setup if you want some inspiration for your own setup!

ESP32 PCB Image


Troubleshooting:

If you notice lots of timeouts, or other errors, try some these steps before creating an issue:

  • Try a different power supply and USB cable. My ML2440 does not respond when I use one of my USB power bricks, but it does with another.
  • Try increasing the modbus timeout value.
  • Try using a shorter cables and moving them away from interference.
  • Verify you are using straight cables and not ones that reverse from one end to the other.
  • Try using HardwareSerial instead of SoftwareSerial. I've found HardwareSerial is more reliable, configure the program to use it if you are having problems.

If these don't help or if you need clarification, feel free to create an issue and I'll see what I can do!


Other notes: