Adventures in home solar hacking!
I was on craigslist the other day, and found a real great deal on these solar microinverters. $50 a pop for a 250 watt capacity device is a great deal in most cases.Â
In case youâre wondering, a micro-inverter is a little box that attaches to the back of a solar panel and boosts the voltage and matches the frequency and phase of itâs output to match your homeâs power, and pushes power back in to the grid, literally spinning your electrical meter backwards. You basically just plug them in and it goes. These things can go $200 a pop, and to find them for $50 is magical. This is the basics of a grid tie solar inverter. It first offsets whatever load you have in your house, literally stopping your electrical meter in itâs tracks and whatever is left over will spin the meter backwards and then gets exported out to your immediate neighbors, and if they canât soak up the extra power, out to the greater grid it goes. So I hopped in to the car and met a dude at a storage unit and bought a pair of these microinverters from some no-name Chinese company called Renesola, hooked them to a couple of $100 panels the dude also had for sale (230 watts each!) plus another $20 in extra chingaderas to connect everything to the house, and I was off and running.Â
Hookup: The diagrams were shit, like most crappy Chinese no-name products, pixelated and printed too small, but they were sort of legible and the pictures made sense. L and N go to each hot leg of the 220, which should give anybody with half a brain some serious pause without a picture. N is basically ground in US electrical systems, though not technically, But the picture called for hooking it to a hot 220 leg, so fuck it. There were fuses and breakers and they were only $50. Then there was the PE wire. I had to look that up. PROTECTIVE EARTH. Thatâs what PE stands for. We call that one GROUND.Â
Now, let me be really frank here - The first setup was a little bootleg, coming in through the air conditioner power box. There were wire nuts involved. The inverters hook to 220, and the A/C is handy. Things like disconnects and maybe even fuses have since been added, so donât do anything stupid at home (for very long or unattended) Â
Sure enough, the mechanical meter spun backwards. I donât know what will happen with a digital meter - Maybe theyâll immediately call the fun police on you, who knows, but my meter is ancient and just fine.Â
So here comes the fun part. I wanted better performance monitoring, and some liquidator across town had a bundle of these monitoring boxes called the âReneSola MRG Micro Replus Gateway â that would talk to each inverter with âPower Line Communicationâ like the old X-10 devices, it basically superimposes data during the zero crossing (when the sine wave of your AC power is zero volts) and anything plugged in can talk during those very brief times. There are lots of different protocols for this, and Renesola does NOT use any of them. They use some rando chip called the Miartech MI200E, which appears to only be available on alibaba. Datasheets (in Chinese) can be found with a fair degree of hunting, but theyâre probably of little use.Â
So I got this stupid box, which is a Linux box with a touch screen, 220V power input, USB and ethernet ports, that tries to connect to âThe Cloudâ which is some server in China thatâs only referred to by itâs IP address, and itâs long gone. You canât change it, and itâs pretty well locked down, despite the USB port and old versions of lightHTTPd running on it. Iâll post the results from a nmap session at some point. BUT, I donât feel entirely comfortable with it on my network, but itâs not doing anything weird, plus I gave it a bad gateway address, so itâs probably going to have to work pretty hard to get on the internet. Â
Youâd figure that with an Ethernet port, you could log in to it and get some web page for looking at statistics, but no. You get 404 errors. Itâs got an SSH port open, but I wasnât able to figure out the credentials. So, useless, but after some digging, and then backing up the device to a thumb drive, I discovered that it made a big old tarball with a directoy structure that started with root. So there was that. It started with root>Gateway>data>0>day.dat and a bunch of other files. And it just so happened to perfectly mirror the structure of the onboard web server. So putting in http://10.41.61.21/data/0/min.dat would download a file (on your own LAN of course) of minute-by-minute data that was literally every minute since midnight of that day. It looked like this, human readable and space delimited. And all day, it just appends more data to the end of the file, and overwrites every day at midnight.Â
So thereâs Date,Time, kW, MPPT/DC voltage, AC voltage, AC amps, AC frequency, temperature, total kWh, RSSI maybe, mystery and mystery.Â
The graphs look great in Google Sheets when you import this data, so itâs working.
So my plan is to put this data in to an open source system called Homeassistant - which is a Raspberry Pi (usually) powered home automation hub, which as far as I can tell, is superior in every way to anything else out there. You can connect ANYTHING to it. Cameras, cars, every kind of smart device, thermostat, lock, TV, projector, server, web service, sensor, smart speaker, alarm system, zigbee, z-wave, you name it and you can voice control it. I run Homeassistant at my house and itâs fantastic. BUT IT NEEDS MORE DATA!
So now I need to learn python, and write my own integration and parse these files.Â
Now hereâs the thing about Renesola. Theyâre GONE. That 20 year warranty? Gone with them. Check out their listing on the NYSE. So long.Â
And what Iâm writing here is literally the only data out there that youâll ever see on these devices unless some brave ex-Renesola IT soul should come forward with better information and keep these things useful for a few more years.Â
SO on to this HTTP directory structure. As follows:Â
.
âââ data
â Â âââ 0
â Â âââ 1
â Â âââ 2
â  and so on and so on
â Â âââ 254
â Â âââ 255
âââ ddata
âââ mdata
âââ total
âââ ydata
In the numeric folders in âdataâ, you have files called day_base.dat  day.dat  hour_base.dat  hour.dat  min.dat  min_tx.dat (with min.dat and min_tx appearing literally identical) Maybe other files are redundant too...
ddata, mdata and ydata have files called module0.dat thru module255.dat
and then in the total folder thereâs two plain, extensionless files called
dayEnergy and energy
which is linux time, first line is the system total, followed by each panel on each line. Energy is the same data, but without timestamps.Â
As for these moduleX.dat files, I canât really say. Itâs linux time, followed by zeros, and terminating with some unprintable characters that I havenât figured out. The backup I took was from the first day of operation, so maybe this isnât fleshed out yet, and will probably look a lot different a few days in. Oddly, I canât seem to make another backup, so Iâm lucky to have picked this one up. More to follow I guess, as I perhaps write a Homeassistant integration.Â
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
â Live Streamingâ Interactive Chatâ Private Showsâ HD Qualityâ Free Actions
Free to watch ⢠No registration required ⢠HD streaming
Iâm putting my Renesola solar hacking project on Github for all to criticize.Â
https://github.com/DrFrankReade/ReneSola_MRG
Hopefully all those poor saps that got burned when the company vanished can now once again start talking to their hardware and getting stats and troubleshooting. And one day maybe Iâll python-ize it.Â