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

HuaWei Q2S Mesh Router Issue #34

Open
songjave opened this issue Jan 16, 2023 · 23 comments
Open

HuaWei Q2S Mesh Router Issue #34

songjave opened this issue Jan 16, 2023 · 23 comments
Assignees
Labels
not supported yet Some action or device is not yet supported by integration

Comments

@songjave
Copy link

I have Q2S Router,I can access primary router and sub router, But ha log have some error

  • Can not update router info: Api call error, status:200; code: -2, category: unauthorized
  • Can not update router info: Failed to get index; reason: auth_general
  • Can not update NFC switch state: Failed to get index; reason: auth_general
@vmakeev vmakeev self-assigned this Jan 16, 2023
@vmakeev vmakeev added the problem Unconfirmed bug, or other problems label Jan 16, 2023
@vmakeev
Copy link
Owner

vmakeev commented Jan 17, 2023

Hi!
Unfortunately, there is not much information on your router model on the Internet.
If I understand correctly, then your system has one primary router, and additional, moreover, additional routers differ in functionality from the primary one (unlike Huawei Mesh 3).

The integration itself has been installed, configured, works, but a lot of errors appear in the logs, right?

Have the primary and additional routers been defined as separate devices in the integration? Can I ask to send you a screenshot?

Example:
image

Regarding logs, can I ask you to send debug logs of integration? To enable them, you will need to make changes to configuration.yaml and restart HA.

Changes in configuration.yaml:

logger:
  .....
  logs:
    custom_components.huawei_mesh_router: debug

You may need to click the "load full logs" button to see the debug messages

I would also ask you to send the exact model of your router (for example, for my Huawei Mesh 3, this is WS8100-23), or a screenshot of information about the device of the primary router in the integration.

Example:
image

And another question: the authorization page on your primary router should be available at http://<Router IP>/html/index.html#/login. And can you go to the same authorization pages of your additional routers?

@Rumlik
Copy link

Rumlik commented Jan 31, 2023

Hi.
I have Q2 Pro model. It's similar router right?
Model WS5280-21

@vmakeev
Copy link
Owner

vmakeev commented Feb 1, 2023

As far as I understand, Q2S is WS5281 (main router) and PT8021 (satellites).

However, the Q2 Pro is quite similar to it. Please tell me, have you had any problems using my integration?

@Rumlik
Copy link

Rumlik commented Feb 1, 2023

As far as I understand, Q2S is WS5281 (main router) and PT8021 (satellites).

However, the Q2 Pro is quite similar to it. Please tell me, have you had any problems using my integration?

On Q2Pro your integration not working.

I dont have login name in login into router. Only pass.
If I use your integration, I cant access to router anymore because multiple login issue

@vmakeev
Copy link
Owner

vmakeev commented Feb 2, 2023

It's sad. I will try to look for the owners of Q2S/Q2 Pro among my friends in order to get to know the authentication algorithm on this line of routers better.

Anyway, thanks for the feedback, I'll let you know in this issue if anything changes.

@vmakeev vmakeev added not supported yet Some action or device is not yet supported by integration and removed problem Unconfirmed bug, or other problems labels Feb 2, 2023
@vmakeev
Copy link
Owner

vmakeev commented Feb 2, 2023

P.S. by default, Huawei mesh routers use the username admin, although it is not displayed in the web interface and mobile applications.

@Rumlik
Copy link

Rumlik commented Feb 2, 2023

I will be happy to provide any assistance if anything is needed.

@vmakeev
Copy link
Owner

vmakeev commented Feb 2, 2023

@Rumlik thank you for your willingness to help, I appreciate it :)

Could you please first send me a screenshot of the authentication screen and the main page of the web interface of the primary router? (exactly the web interface, not the mobile application)

@Rumlik
Copy link

Rumlik commented Feb 2, 2023

@Rumlik thank you for your willingness to help, I appreciate it :)

Could you please first send me a screenshot of the authentication screen and the main page of the web interface of the primary router? (exactly the web interface, not the mobile application)

URL: http://ip-adress-router/html/index.html
obrazek

@Rumlik
Copy link

Rumlik commented Feb 2, 2023

all routers are the same. They have the same designation and it doesn't matter which one I set as primary.
All router is model WS5280 v2

@vmakeev
Copy link
Owner

vmakeev commented Feb 2, 2023

The interface is generally similar to the one my router uses.

However, here it is offered to use the Huawei SmartHome application for management, whereas I have AI Life.

To try to understand the authorization mechanism and the API structure of your model, I will need some JavaScript files from the router.

The easiest way is to save the authorization screen page somewhere (ctrl+s in the browser, save the web page completely).
At the moment of saving the file, you do not have to be logged in to the system and do not have to enter any password.

Next to the html file itself, there will be a folder in which all the resources used by the page are saved, including .js files.

If it doesn't bother you, pack all these files (.html and the whole folder) into an archive and give me a link to it

@Rumlik
Copy link

Rumlik commented Feb 2, 2023

The interface is generally similar to the one my router uses.

However, here it is offered to use the Huawei SmartHome application for management, whereas I have AI Life.

To try to understand the authorization mechanism and the API structure of your model, I will need some JavaScript files from the router.

The easiest way is to save the authorization screen page somewhere (ctrl+s in the browser, save the web page completely). At the moment of saving the file, you do not have to be logged in to the system and do not have to enter any password.

Next to the html file itself, there will be a folder in which all the resources used by the page are saved, including .js files.

If it doesn't bother you, pack all these files (.html and the whole folder) into an archive and give me a link to it

I have AI Life too. I think, first was only SmartHome app. I've never used any other app either. It's possible that at first it was and then they combined it into one. But I'm not sure.

@Rumlik
Copy link

Rumlik commented Feb 2, 2023

Huawei Q2Pro.zip

@Rumlik
Copy link

Rumlik commented Feb 2, 2023

Huawei Q2Pro.zip

It's what you need? :)

@Rumlik
Copy link

Rumlik commented Feb 2, 2023

Proof that I have an AI life app :)
Screenshot_20230202-202731
Screenshot_20230202-202710

@vmakeev
Copy link
Owner

vmakeev commented Feb 2, 2023

It's what you need? :)

Yes, exactly.

http://<router-ip-address>/api/system/useraccount

If you follow this link, the Json will load something like the following:

[
  {
    "DBpromptinfo": "",
    "username": "admin",
    "userlevel": 2,
    "LoginWifiSsidSame": false,
    "enableprompt": false,
    "promptinfo": "",
    "DBenableprompt": false,
    "FirstLogin": 1,
    "IsWifiOpen": false,
    "SyncWifiPwd": 0,
    "ID": "InternetGatewayDevice.UserInterface.X_Web.UserInfo.1."
  }
]

Tell me, do you also have the value "admin" in the "username" field?

@Rumlik
Copy link

Rumlik commented Feb 2, 2023

It's what you need? :)

Yes, exactly.

http://<router-ip-address>/api/system/useraccount

If you follow this link, the Json will load something like the following:

[
  {
    "DBpromptinfo": "",
    "username": "admin",
    "userlevel": 2,
    "LoginWifiSsidSame": false,
    "enableprompt": false,
    "promptinfo": "",
    "DBenableprompt": false,
    "FirstLogin": 1,
    "IsWifiOpen": false,
    "SyncWifiPwd": 0,
    "ID": "InternetGatewayDevice.UserInterface.X_Web.UserInfo.1."
  }
]

Tell me, do you also have the value "admin" in the "username" field?

yes

@vmakeev
Copy link
Owner

vmakeev commented Feb 2, 2023

Сan I ask you to send debug logs of integration? To enable them, you will need to make changes to configuration.yaml and restart HA.

Changes in configuration.yaml:

logger:
  .....
  logs:
    custom_components.huawei_mesh_router: debug

You may need to click the "load full logs" button to see the debug messages

@Rumlik
Copy link

Rumlik commented Feb 2, 2023

I have your integration turned off or excacly not set. Because if I set it, it will block access to the router administration. So I have to set it back up, I suppose? :)

@vmakeev
Copy link
Owner

vmakeev commented Feb 2, 2023

If it doesn't bother you :)

Just please enable debugging logs BEFORE starting the setup

@Rumlik
Copy link

Rumlik commented Feb 2, 2023

Sorry, this is fully log for your integration. I hope :D
huawei log.txt

@vmakeev
Copy link
Owner

vmakeev commented Feb 2, 2023

Authentication success
Session cookies stored

Yeah, so the login is still performed correctly, that's good

Error during logout: Cannot perform POST request at ..... cause of Client OS Error(None, 'Can not write request body for .....); code: -3, category: request_error
Cannot perform GET request at .... cause of Server Disconnected Error('Server disconnected'); code: -3, category: request_error
Cannot perform GET request at .... cause of Client OS Error(32, 'Broken pipe'); code: -3, category: request_error

And it looks like a ban from the router, but it's not accurate. I will search and read the documentation, thank you for your help!

Repository owner deleted a comment from Rumlik Feb 3, 2023
Repository owner deleted a comment from Rumlik Feb 3, 2023
@Rumlik
Copy link

Rumlik commented Mar 3, 2023

Authentication success
Session cookies stored

Yeah, so the login is still performed correctly, that's good

Error during logout: Cannot perform POST request at ..... cause of Client OS Error(None, 'Can not write request body for .....); code: -3, category: request_error
Cannot perform GET request at .... cause of Server Disconnected Error('Server disconnected'); code: -3, category: request_error
Cannot perform GET request at .... cause of Client OS Error(32, 'Broken pipe'); code: -3, category: request_error

And it looks like a ban from the router, but it's not accurate. I will search and read the documentation, thank you for your help!

Hi there,
have you any new news about this? Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not supported yet Some action or device is not yet supported by integration
Projects
None yet
Development

No branches or pull requests

3 participants