Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suddenly not able to connect #86

Open
Puntoboy opened this issue Sep 5, 2022 · 14 comments
Open

Suddenly not able to connect #86

Puntoboy opened this issue Sep 5, 2022 · 14 comments

Comments

@Puntoboy
Copy link

Puntoboy commented Sep 5, 2022

I noticed this morning that all of a sudden HA can't communicate with my Solax Inverter (X1-Boost-3.6). It's been working find for the last week without a problem.

Today it suddenly stopped and all identities are unavailable. I tried rebooting everything, reloading the integration and deleting/reinstalling it. No change. I've not even upgraded HA to the latest version.

This is the error in the logs.

`Logger: homeassistant.components.solax.config_flow
Source: components/solax/config_flow.py:36
Integration: SolaX Power (documentation, issues)
First occurred: 11:05:01 (1 occurrences)
Last logged: 11:05:01

Unexpected exception
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/solax/inverter.py", line 37, in get_data
data = await self.make_request(
File "/usr/local/lib/python3.10/site-packages/solax/inverter.py", line 183, in make_request
response = cls.schema()(json_response)
File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 272, in call
return self._compiled([], data)
File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 595, in validate_dict
return base_validate(path, iteritems(data), out)
File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 433, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: required key not provided @ data['SN']

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/solax/config_flow.py", line 52, in async_step_user
serial_number = await validate_api(user_input)
File "/usr/src/homeassistant/homeassistant/components/solax/config_flow.py", line 36, in validate_api
response = await api.get_data()
File "/usr/local/lib/python3.10/site-packages/solax/init.py", line 51, in get_data
return await rt_request(self.inverter,
File "/usr/local/lib/python3.10/site-packages/solax/init.py", line 26, in rt_request
return await inv.get_data()
File "/usr/local/lib/python3.10/site-packages/solax/inverter.py", line 48, in get_data
raise InverterError(msg, str(self.class.name)) from ex
solax.inverter.InverterError: ('Received malformed JSON from inverter', 'XHybrid')`

@squishykid
Copy link
Owner

Can you please follow these instructions: https://github.com/squishykid/solax/wiki/DiscoveryError

If this still doesn't work, please follow these and share the response payload in this issue: https://github.com/squishykid/solax/wiki/Adding-Support-for-Your-Inverter

I wonder if your inverter is replying with a different payload, perhaps as a result of a firmware update?

@Puntoboy
Copy link
Author

Thanks. No firmware updates I'm aware of.

I've tried the curl commands but not luck.

image

I can get to the webpage for the inverter though, and login.

image

@squishykid
Copy link
Owner

squishykid commented Sep 12, 2022

#32 This might have some answers for you, but unfortunately I don’t know what password to try. But if it’s admin, the equivalent curl command would be:

curl -X POST http://$hostname/?optType=ReadRealTimeData&pwd=admin&

Note: The ampersand (&) at the end is important.

@Puntoboy
Copy link
Author

Unfortunately, that doesn't work. To login to the webpage, I have to use a username as well.

image

@squishykid
Copy link
Owner

Could you please try it with quotes:
curl -X POST 'http://$hostname/?optType=ReadRealTimeData&pwd=admin&'

@Puntoboy
Copy link
Author

image

@squishykid
Copy link
Owner

That’s annoying. I guess you might have to do some digging to find the right URL. When you find it I can make sure it’s programmed into the library.

@Puntoboy
Copy link
Author

I'm just not sure what's changed. It was working perfectly, then it stopped.

@squishykid
Copy link
Owner

Perhaps the firmware has been updated remotely? But I think you have tried all the requests the library makes, via curl. You could try reading though some of the other issues?

Ill come back here if I can think of anything, please reply if you solve it too

@Puntoboy
Copy link
Author

It's the way it replies unauthorised, rather than an invalid URL or something similar.

I'm not aware of Solax applying remote firmware updates, especially without an owner knowing.

@Puntoboy
Copy link
Author

The firmware version for the dongle is Solax_SI_CH_2nd_20160912_DE02

@Puntoboy
Copy link
Author

So not sure what's changed, but I managed to get a response using this command.

image

However, Home Assistant still doesn't connect.

@Puntoboy
Copy link
Author

If it makes any difference, I'm using the original Pocket Wifi dongle 1.0 which allowed you to access the API directly when it connects to your network, I don't need to use a reverse proxy to connect.

@andmagri
Copy link

andmagri commented Nov 22, 2023

Hi, if anyone needs this I managed to curl directly to the wifi dongle after a forced firmware upgrade using the following:

realtime=curl -s -X POST --header 'X-Forwarded-For:5.8.8.8' 'http://192.168.0.57/?optType=ReadRealTimeData&pwd=admin&' && echo $realtime

Adding the single quotes to the whole url is what fixed it apart from the pwd argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants