X1 Mini V34 not discovered + code version mismatch in pip package? #111
Description
I couldn't get the HA SolaX integration to load reliably, so tried some tests by calling the solax functions directly from Python using the test code from the front page of this repo.
I have two inverters for it to discover:
- X1 Hybrid G4 - solax_real_time_api(IP, pwd="pwd") eventually returns valid data (it's the last inverter in the list, hence the long wait I guess - though it's 5+ minutes which is VERY long for 12 or so HTTP requests)
- X1 Mini 2.0 - hangs for a very long time and eventually says it failed to connect to any inverter type.
Both are accessed using their local SSIDs via nginx reverse proxies presenting them on port 80. The proxy logs show the expected mixture of POSTs with query strings and POSTs with form data as the code tries to discover different inverter types. Both my inverters expect form data.
I remove all the other inverters from the list in discovery.py, leaving just X1miniV34, it still times out without finding my inverter. I've checked the API response with curl and it shows "type": 4, which is the discovery test for the X1miniV34 type. Counting the entries in the proxy logs, it looks like the X1miniV34 discovery tries both query string and form data POSTs, so it should work.
Looking at the full requirements in x1_mini_v34.py:
- type is integer 4
- sn is a string of 10 characters
- ver is a string, "3.003.02"
- Data is present and all numeric, an array of about 100 items (I may have lost count! ;-) )
- Information is present, an array of 10 items [num,num,str,num...num]
All of that looks like it fits the requirements.
What else should I check to find out why it's not discovering the X1miniV34?
Additional note: I just spotted that inverter.py in my installation is very different from the version in the git repo. pip says that the version of solax is 0.3.0, though. That would mean that the code I'm running might not be doing what I think based on reading the code in github. Why would the file differ if the version is correct?