I was not aware of anyone being able to connect over Modbus via a Pocket Lan or Pocket WiFi.
Or is the owner of this Retrofit not using this custom_component with their Inverter?
yes he does, ive installed it on a pie.
i can check with him cus he did the connection him self, if i recall correctly…
@Kars Beta Release 0.6.0b1 adds Proper X3 MIC support.
Anyone who owns a Gen4 will also find plenty of new Sensors relating to the Dry Contact / SolaX Adapter Box.
Nice! Still didn’t get around to testing it, sorry… hopefully I’ll find some time tomorrow,
I tried to use Modbus/TCP directly, but that failed. No response.
The strange thing is, it does seem to listen on port 502. I can telnet to it, which gives me a connection. After some time it disconnects. Perhaps it needs some magic packet to allow access…
It is normal that a telnet session time out as the protocol is not telnet. So there is hope …
Are you using a Baudrate of 9600 with the Ethernet adaptor?
Each type of Inverter seems to use a different Baudrate!
Sorry, I meant directly with a tcp connection from Home Assistant to the inverter IP adress.
Haven’t tried the converter box yet, I first need to wire it up. I’m assuming I can just use a regular UTP-cable for that? Just have to connect the right colours.
My inverter gives signs of life! Apparently the serial number isn’t what I read from the label?
The following shows up in my log now:
Deze fout is ontstaan door een aangepaste integratie.
Logger: custom_components.solax_modbus
Source: custom_components/solax_modbus/__init__.py:148
Integration: SolaX Inverter Modbus (documentation, issues)
First occurred: 15:43:10 (2 occurrences)
Last logged: 15:45:28
unrecognized inverter type - serial number : UM08T2xxxxx
Ah, interesting, it’s swapped per 2 bytes, UM → MU, 08 → 80, T2 → 2T, etc.
So it does match, in a way.
Ok, the bytes are swapped in pairs.
This is a known problem with MIC inverters.
Will have to make an exception for mic in the code
I jerry-rigged the integration by hard coding invertertype = MIC | X3
, the actual values read look OK, so the endianness is handled correctly there. But strings should generally not be byteswapped.
It results in a limited list with of 11 sensors. The DC-side seems well represented, but on the AC side I only have 3 frequencies.
I tested with version 0.6.0b2.
I have just released 0.6.0b3 based on @infradom PR from earlier today.
This should correct the reading of the Serial and fix the missing sensors on the MIC.
I think intotal you should have 24 Sensors?
Just installed it, 24 sensors now. What I noticed:
- Today’s yield sensor is 0, which is incorrect.
- Total yield sensor is unavailable (turned off by integration). If I enable it, the value is wrong (way too high).
- There is no status sensor.
Since the sun is down now, I can’t verify the other values anymore.
But, nice progress!
If Today’s & Total Yield still return random numbers I might need to swap the Endian of them.
On the Hybrids all 16bit registers are read as Endian.Big
but the 32bit int & unit are read as Endian.Little
So I use wordorder=Endian.Little
for the 32bit registers which are in fact two separate 16bit registers, but read together to form a word.
I assumed the MIC’s were the same. But perhaps the 32bit registers are Endian.Big
Do you not see the sensor.solax_run_mode? Or is it showing as Unknown?
Edit:
Looks like I forgot to expose run_mode on the MIC Inverters
If you change line 1630 in const.py
from allowedtypes= GEN2 | GEN3 | GEN4,
to allowedtypes=ALLDEFAULT,
you will gain the run_mode
I’ll make the change ready for the next Beta release.
I have measurements now, looks good.
I also see daily yield now, with a valid number, but it appears to be the total yield (comparing it to the value on SolaX Cloud).
Total and Today are the wrong way in the Integration.
Does total yield return anything or is it blank?
@Kars Just released 0.6.0b4 with the previous correction of missing run_mode and swapped Total & Daily Yield.
Today’s yield loods good, run mode too.
Total yield says 1.846,0 MWh , this is actually 1.846,0 kWh.
Almost there!
There is a bit of discussion about MWh and kWh here.
When I started the Integration off for the Gen3 and then Gen2 I converted Total Yield into MWh to match how it’s displayed in the SolaX Cloud.
I left Daily Yield as kWh as per the docs as it’s not shown in the Cloud and daily you would never get into MWh numbers.
I forgot to scale the Total on the MIC to MWh, instead of the default kWh.
I did put a poll on GitHub two months ago asking if people either used Total Yield and if so do they want it keeping in MWh or converting back to kWh. But other than @infradom and myself we didn’t get any feedback.
Other than Total Yield saying MWh, when the Numbers shown are actually kWh.
Does Total and Today’s Yield both show correct numbers?
I don’t mind whether it’s MWh or kWh, as long as the scaling is correct.
Yes, the values are correct (comparing to SolaX Cloud).