|
Post by Admin on Sept 15, 2018 14:33:39 GMT
Hi all, I wrote some Python code to run on a Raspberry PI and log almost all of the SRNE ML2420 /ML2430 /ML2440 and therefore Renogy Rover data (that you can access with their software on a PC) into a database as well as write it to a hosted webpage, that you can access anywhere from your cellphone etc (with the right router setup of course). See the screenshot attached (this also includes some monitoring of directly attached devices through a shunt). I'm considering doing a write-up and giving the code to anyone who wants it, just let me know. The setup is quite involved and technical  Attachments:
Please note I have attached my write-up on how to do the above as an attached pdf. I was unable to copy and paste it directly here as I kept getting blocked by the forum! I doubt I will be able to upload the attachments I reference in the pdf, such as the code and diagrams. If you would like these then please message me. Thanks! Hello. I messaged you the other day, would like a copy please. Sounds interesting. Thanks! I've attached the code (in the .zip) and some additional documents I didn't manage to attach previously, enjoy! I hadn't heard of that, but it sounds compatible with the Raspberry PI, so I'm sure you should be able to run the Python script (maybe with some small modifications). Let me know how it goes! It works perfectly, I modifed the code a bit and took out the GPIO pieces and I was pleasantly surprised that the USB drivers worked. Plugging the cord that came with the bt-50 into the tinkerboard I luckily saw in syslog usb 1-1.2: Product: FT232R USB UART ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0 Thank you for nailing down all the registry mappings. No problem, glad to hear you got it working
|
|
|
Post by playersz28 on Sept 16, 2018 19:45:48 GMT
The attachments didn't make it over from the old site?
|
|
|
Post by Admin on Sept 17, 2018 4:58:32 GMT
It looks like the files are experiencing errors. We will look into this issue and restore them soon.
-Renogy Team
|
|
|
Post by lindsay on Sept 17, 2018 15:52:08 GMT
Admin, let me know if you have problems restoring them, then I'll upload them again.
|
|
|
Post by Admin on Sept 17, 2018 21:05:06 GMT
Admin, let me know if you have problems restoring them, then I'll upload them again. We apologize for the inconvenience by we can't seem to find the original file source. Your help would be much appreciated. -Renogy Team
|
|
|
Post by playersz28 on Sept 19, 2018 13:10:31 GMT
lindsay,
I'm interested in the doc's & code. I recently switched to a Rover from an older Tracer that I was using an Arduino to display the port data.
|
|
|
Post by lindsay on Sept 20, 2018 14:22:12 GMT
I just want to update it for the last changes I made (allowing the inputs of my ADC to still be connected to the shunt when the power to the Raspberry PI switched off caused the ADC to break, added a reed relay to disconnect the inputs). I hope to post the full code, write-up and diagrams early next week.
|
|
|
Post by playersz28 on Sept 20, 2018 15:12:25 GMT
Do you have some doc's on the serial protocol in/out of the Rover?
Looking forward to seeing your code & setup.
|
|
|
Post by lindsay on Sept 20, 2018 15:42:23 GMT
No, I used some software to intercept the serial data from the official solar monitoring windows application and then figured out what each register was.
|
|
|
Post by playersz28 on Sept 20, 2018 15:56:56 GMT
I've logged the serial port but not recognizing the data as anything displayed in the PC app. I did find a doc that showed a bunch of ModBus registers.
Is the port std RS232 or 485?
Do you have it pulling the historical data from the ctlr?
|
|
|
Post by lindsay on Sept 21, 2018 7:27:20 GMT
Pretty sure it's RS232, using Modbus, but the registers are a bit difficult to figure out, for example the device and battery temperature are shoved in one register. I was getting global counters, current daily counters (with minimum and maximums) and real-time data which I was logging around every 20 seconds. I didn't try to get data from the previous day and further back since I was logging the current data to a Sqlite database and could just look in there. So for me it wasn't worth the effort to try to get that data as well.
I've actually retired this controller now, and am using one of those 24V MPPT inverter hybrids that they refer to as the PIP in the USA. But I will still finish my writeup and repost early next week.
|
|
|
Post by lindsay on Sept 27, 2018 11:08:41 GMT
Hi, I will attach the following to this post (and possibly the next one if I can't upload it all in one): Python code: SolarMonitor.zip Instructions: Raspberry PI Writeup.pdf Controller wiring: RS232.png Raspberry PI wiring: PiHeader.png Database query/columns: DatabaseQuery.txt Web screenshot: Screenshot_android.chrome.png
|
|
|
Post by lindsay on Sept 27, 2018 11:09:30 GMT
Raspberry PI wiring: PiHeader.png Database query/columns: DatabaseQuery.txt Web screenshot: Screenshot_android.chrome.png Attachments:DatabaseQuery.txt (3.08 KB)


|
|
|
Post by lindsay on Sept 27, 2018 11:10:06 GMT
That's it, let me know if you have any issues!
|
|
|
Post by redtrini on Mar 2, 2019 0:00:58 GMT
Hello Everyone,
New to this board. I am attempting to run lindsay SolarMonitor.py script but it gives me an "unindent does not match any outer indentation level" error any suggestions as to what I am doing wrong?
|
|