Monitoring a Growatt PV inverter over WiFi using Python

I recently had a 5kW solar array installed and it came with a Growatt 5000MTL inverter.  This inverter is installed in my garage and comes with RS232 and RS485 ports for monitoring.

I wanted to connect to PVOutput.org to publish my system’s production.

I found a Python script that could do the job on sisand.dk but it needed an RS-232 connection via a TTY on Linux.

Because of the location of the inverter, connecting a device directly to the inverter serial port would be tricky. I could use a Raspberry PI with a USB serial adapter, but that seemed a bit icky and I already have a Linux box running WView to upload my weather station data so I wanted to use that box if I could.

WiFi Terminal server
WiFi Terminal server

I found an inexpensive WiFi/Serial port solution on eBay and so now all I needed was some way to make the connection to Linux.  Initially I tried socat, but this needed to be restarted each time I wanted to connect to the inverter and proved to be unreliable.

A bit more searching revealed TruePort from Perle.  This is a kernel module that bridges between a network terminal server port and an entry in /dev and although it is designed to work with Perle’s products, it works with any generic serial-port-on-the-end-of-a-TCP-port device.

Getting it running required the usual Linux check-the-dependencies-recompile-the-kernel-install-the-mods drama, but once I got it running it has proven to be very reliable.

3 Replies to “Monitoring a Growatt PV inverter over WiFi using Python”

Leave a Reply

Your email address will not be published. Required fields are marked *