@dr3am.r, I hesitate to do that because there are users that report that they cannot connect to the dongle anymore after installing this custom firmware.
For now I am using the reverse proxy method described here with a Raspberry Pi 4b that was collecting dust. This works perfectly for now.
@witterholt seems that I dodged a bullet then even though I had same firmware version as the Custom one which is 2.034.06. I did not have a v3 one. For me the proxy variant somehow never worked … working with nginx is not new for me thus, don’t think there were configuration issues (it’s mostly copy-paste anyway), after accessing the dongle ui through the rpi IP:port, I would get the basic authentication pop-up, but after providing credentials (which I know work as I connected to the dongle directly with them), I get some empty response (no page returned). So for me not using another component (rpi) in between, works perfectly.
First off @Doublet thanks for a great write up. Recently had an X1 G4 installed on firmware 3.003.02 and followed your instructions to get proxy set up. Which worked great.
However, adding solax integration didnt work, cant do in yaml anymore and when I added integration it just hangs trying to configure inverter, wont install.
I managed to get some sensors set up looking at what @reinhard.ruemer did… Then I thought the mapping for the data must be in the Solax Power integration code, so looked at that and noticed the set-up is same (i.e. the api call is to ‘optType=ReadRealTimeData&pwd=SX…’)… Andf thought… thats odd, why would it work from curl not the integration if its the same call??..
Anyhow did a little debugging and turns out there is some issue in the discovery loop of the integration (its actually in the solax lib it uses) so I crated a custom_integration from the Solax Power one, just taking out the discovery loop and telling it to add X1 G4 only… and it WORKS!!!
So got Solax Power integration set up… my wifi dongle IS connected to wifi (internet) AND it still exposes its own access point which is what I connected to for this revers proxy set up… It gives me the data AND sends to solax cloud… Which got me thinking could I connect the now working integration to the inverters IP directly and skip the revers proxy… answer YES!!!
Am I just lucky that my wifi dongle on V3 firmware just works?? or is it it appeared to not work for others due to the Solax Power bug on firmware v3?
Not uploaded it yet, can do… but don’t you have the X3?
I’ve literally got it only configuring the X1 G4 instead of doing inverter discovery… Not got round to fully debugging the real issue yet. Will take a look
Ok I took a look at the lib and ran it locally to check for errors… its NOT erroring… it just takes forever… it runs through every inverter one at a time and uses aiohttp with no timeout set, which defaults to 5 mins. I’ve made it 5 seconds and allowed all the inverters back. So theoretically should work for any supported inverter again now…
So, i tried your custom_component on the weekend but it didn’t work with my X3. I noticed a different error message, though:
Using the original HA-Component, I get a “Unexpected Error” but with your custom component it also takes a while and tries to connect but then throws a “Connection Failed” in the HA-Frontend. I am certain the IP and Password were correct since I double checked it and also tried via command line. Maybe the X3 is indeed differnt.
I’m no sure where I found the code below online, but it has been working fine for me for the last few weeks to get the data from my Solax Pocket WiFi, without having to setup any reverse proxy or another intermediate device. It goes in my sensors.yaml file.
- platform: rest
name: solaxx1data
resource: http://192.168.1.77/?optType=ReadRealTimeData # Local IP of Solax Pocket Wifi
method: POST
headers:
X-Forwarded-For: 5.8.8.8
scan_interval: 5
timeout: 4
value_template: 'OK'
json_attributes:
- type
- SN
- ver
- Data
- Information
and then you can use something similar to the below to get the data.
Does a 2nd Raspberry PI need to be setup?
Why can not the HA PI be connected to its Ethernet and have a WIFI connection to the Pocket Wifi on the Solax.
Then just put the IP address of 11.11.11.1 to connect to Pocket Wifi on the solax and get the data.
Try to parse the password (which is the serial number of your inverter) within the curl command: curl -d “optType=ReadRealTimeData&pwd=S*********” -X POST http://192.168...
This works on my inverter, also with firmware 3.001.02.
What changes for Pocket Wlan with Firmware 3.001.02
My Pocket Wlan Stick I bought in 2023 has Firmware 3.001.02 and that means a few configuration changes:
Instead of IP 5.8.8.8 the AP will be accessible via http://192.168.10.10 (at least in my case). This need to be adopted for file /etc/nginx/sites-available/solax.conf
When reaching the sticks landing page, login credentials are admin for username and S********* for Password (actually the Serial number you find on the stick and which is represented in the AP-ESSID, too.
With these little changes the access works as outlined in this superior tutorial above by @Doublet . Thanks @Doublet for writing this up.