squishykid / solax

🌞 Solax Inverter API Wrapper
MIT License
97 stars 57 forks source link

X3-MIC/PRO returns "Connection refused" after 2000+ms (via LAN) #109

Open ramondeklein opened 1 year ago

ramondeklein commented 1 year ago

I have the Solax X3-MIC/PRO (5kW) inverter and it uses the LAN adapter (Pocket LAN 2.0). The cloud connection is fine and I am able to ping the converter on 192.168.1.60. It also connects properly to the cloud and I am able to access it via Solax Cloud.

$ curl -v -d "optType=ReadRealTimeData&pwd=SP2JXXXX4F" -X POST http://192.168.1.60
curl: (7) Failed to connect to 192.168.1.60 port 80 after 2028 ms: Connection refused

I read that the WIFI dongle doesn't expose the API on the local network. I did use a WIFI dongle for two weeks before I got my LAN dongle. Maybe I need to re-enable something?

nazar-pc commented 1 year ago

Wi-Fi does expose API on local network and works just fine, but maybe not in 100% of cases (hard to tell, manufacturer doesn't disclose that kind of information).

Mobile application doesn't support Pocket LAN as far as I can tell from reaching Android application's source code, so it may physically be unable to return you that data and with firmware being closed source we may not be able to do anything about it.

letsjustfixit commented 1 year ago

@ramondeklein Try it this way (replace YOURIP with your inverter's ip: YOURPASSWORD with your admin password by default: admin)

curl -X POST http://YOURIP  -H 'X-Forwarded-For: "5.8.8.8"' --data 'optType=ReadRealTimeData&pwd=YOURPASSWORD'
curl -X POST http://YOURIP  -H 'X-Forwarded-For: "5.8.8.8"' --data 'optType=ReadSetData&pwd=YOURPASSWORD'