tobiasfaust / SolaxModbusGateway

Modbus RTU to MQTT Gateway
GNU General Public License v3.0
54 stars 17 forks source link

X1 Boost Gen 3 #18

Closed kommando828 closed 1 year ago

kommando828 commented 1 year ago

I have attached the Modbus register PDF I obtained from Solax for the X1 Boost G3.0/G3.1/G3.2, my inverter has a serial number starting XB32 which may indicate a Gen3.2. I have access to the Cloud but would prefer to access the data locally. I have connected to the inverter's RS485 wires via an EW11 which converts to Modbus TCP but while I can communicate the signals back show as invalid in Modbus poll but at least communication is there. The HEX register list in the PDF looks to match the ones posted in Benjamin's ESPHome from this forum thread which you started. https://community.home-assistant.io/t/universal-solar-inverter-over-modbus-rs485-to-mqtt-formally-solax-no-pocket-wifi/483606/4

Solax Power X1-BOOST Single phase inverter Modbus-RTU comms protocolV1.0 - Public version.pdf

tobiasfaust commented 1 year ago

Hi, I dont Support an EW11. Please Look into the Wiki to figure out which hardware you need ;)

After that you can Start with the Settings of „Solax-MIC“. It has the same Protocol by the First view

kommando828 commented 1 year ago

The EW11 was to hand and showed me the comms is working, will not be using it in place of your solution. Sorry for confusion.

tobiasfaust commented 1 year ago

I think with the settings of SOLAX-MIC it will work out-of-the box. We will see ……

kommando828 commented 1 year ago

Yes, it looks like the X1 Boost uses a truncated version of the Solax-MIc register. The machine type returned digit maps to a different description is the one difference I can see. For example a return of a 2 from 0x34E refers to a #define 3.3Kw in the X1 Boost PDF but in the Mic PDF refers to a POWER_4KW_MIC. As they could be used together you would have expected Solax to extend the list and have no duplicates.

tobiasfaust commented 1 year ago

If you want or if too much differences between both you can create a new section for your X1 Boost as a copy of MIC and then do your changes :)

After you have finished you can share your X1-Boost section here for the community:)

kommando828 commented 1 year ago

I will first check the register maps for any differences other than it being truncated, assuming no differences then order up the parts. Then try based on the inverter being a MIC, in the item config only ask for the X1 Boost registers to be returned and see what happens.

kommando828 commented 1 year ago

A side by side check of the two register maps shows the X1-boost is a truncated version of the MIC and where there is a register in the X1-boost it matches the format and name of the MIC register. Where a MIC code is not used in the X1-boost register it shows as reserved in the X1-boost register. As the machine type listing for the X1-Boost also includes the X1 Mini,X1 Mini G3 and X1 Air then if the current code works for the X1 Boost it may also work for these. I will not be able to test this however.

tobiasfaust commented 1 year ago

It sounds good :) Please inform us if your X1 boost fits to the MIC settings. So i can insert the Boost in the compatibly list:)

kommando828 commented 1 year ago

The ESP32 arrived, using Visual Studio I have loaded the ver 3 firmware to the ESP32. I have connected to it and set the parameters including the Baud rate to 9600 etc. Still to do the soldering over the weekend to get the RS485 signal to it but under Inverter Type I have set it to Solax X1, I assume that is correct for a X1-boost using the X1-MIC register ?

tobiasfaust commented 1 year ago

Try it out what fits for you ;) Solax X1 and Solax MIC use different Register adresses

kommando828 commented 1 year ago

So the register.h on Firmware ver 3 does not include the MIC but the register.h in Github does. As programming is not one of my skills do I copy the Github register.h which included MIC into the Ver 3 folder overwriting the current version recompile and then send this firmware to the ESP32.

tobiasfaust commented 1 year ago

Ok, but easier by using gitpod, See my wiki

kommando828 commented 1 year ago

Ok, heads bursting but got the 3 files downloaded ;) now to load the firmware and get the ESP32 up and running again. I assume when I test and if I find the MIC extra registers causes issues then I will need to create a new register.h with an extra X1-boost section with only the X1-boost registers. That will then add an extra option for the X1-boost.

tobiasfaust commented 1 year ago

Not a new register.h, only a new section. You will understand if you take a look into it and understand the json Format ;) The wiki explains it too ;)

kommando828 commented 1 year ago

No joy with the firmware upload, showed as Finish in Blue but the ESP32 is still up and running after a reboot on Ver 3 with all the settings retained. I had expected it to go back to showing as a WiFi AP and needing to scan for WiFi to connect to and then need to change Baud rate etc, Must be this error in the terminal that is the cause

NO XMC flash detected!

So need to find out exactly which ESP32 version chip I have

kommando828 commented 1 year ago

Tried Gitpod after a factory flash erase and reload, still did not work. Went back to Visual Studio after a second factory erase and reload, used the current Github files and followed same procedure with a build and load and it works plus MIC is now selectable. No idea what the issue is with Gitpod but my ESP32 (esp32-wroom-32) does not like it. Solax Modbus Version shows as 3.1

kommando828 commented 1 year ago

Hardware is up and running, RX and TX are flashing and a serial monitor shows no data is being lost/dropped. However as with all the previous attempts with software on my Win11 laptop, the response back from the X1-boost under raw data shows as being 'undefined', similar to 'invalid' as declared by Modbus Poll and others. I have a suspicion Solax have not implemented Modbus on this inverter at all as the same 2 pins on the RJ45 are also defined as being the comms with the output limiting meter. Will have to try other methods even if it ends up just being a CT meter monitoring the output KwH. This is 100% a Solax issue IMHO.