I Reverse-Engineered My Solar Inverter API to Export 5kW to the Grid
I Reverse-Engineered My Solar Inverter's API to Export 5kW to the Grid — Here's What I Found TL;DR: Solplanet/AISWEI hybrid inverters have a hidden "Custom mode" (mod_r=4) that enables force grid e...

Source: DEV Community
I Reverse-Engineered My Solar Inverter's API to Export 5kW to the Grid — Here's What I Found TL;DR: Solplanet/AISWEI hybrid inverters have a hidden "Custom mode" (mod_r=4) that enables force grid export. The documented TOU mode (mod_r=5) is broken on current firmware. This took 12 hours of debugging to discover, and the fix is 3 lines of code. Last week I installed a 46kWh battery system with a Solplanet ASW12kH-T3 hybrid inverter. The goal was simple: charge from solar during the day, export to the grid during peak pricing windows on Amber Electric, and pocket the difference. The hardware was ready. The Amber API was feeding real-time spot prices. The automation was running every 5 minutes. Everything looked perfect — except the battery refused to export a single watt to the grid. The Problem Solplanet exposes a local HTTP API on the inverter's WiFi dongle (an ESP32). You can read battery state, solar production, and grid power. You can also write settings — battery work mode, charge/