fsaris / home-assistant-awox

AwoX mesh light integration for Home Assistant
MIT License
83 stars 23 forks source link

known mesh credentials are not excepted by the device #75

Closed opTi4H2F closed 1 year ago

opTi4H2F commented 1 year ago

Hello fsaris,

Today I added 2 new lamps in the Awox app (E27 - A60 and E27 - G95) and wanted to synchronize with Homeassitant. After reconnecting to Awox Connect, the lamps show up but unfortunately the integration no longer works since the second connect.

in the logs this error shows up: Device authentication error: known mesh credentials are not excepted by the device. Did you re-pair them to your Awox app with a different account?

logs.txt

fsaris commented 1 year ago

Looks like adding a new device to the mesh changed the credentials.

What you could try do to fix this is removing the integration from HA and adding it again. It will then fetch the current mesh credentials again during the setup.

opTi4H2F commented 1 year ago

thank you for the quick reply.

Reinstalling the integration was my first attempt to fix the problem. Unfortunately without success.

Adding the two lamps should not have been the problem. It worked fine after adding the two lamps. The two new devices were displayed in the Awox app but not in HA. Since stupid me wanted to try to control them via HA I added the integration again, so that the new devices are loaded.

I had forgotten the old password so I changed it before re-adding the integration.

After adding the integration (with the new password) all devices show up but unfortunately it no longer works :D

Are the "mesh credentials" the same as my login credentials or does the network use its own key for communication between the devices?

I will try to reset all devices and connect them with a new account, hopefully this will solve the problem.

fsaris commented 1 year ago

Are the "mesh credentials" the same as my login credentials or does the network use its own key for communication between the devices?

It's indeed a own set; Mesh name (same as the name each light exposes when you use a Bluetooth scanner) and a password.

kkoenen commented 1 year ago

Trying to get Home Assistant working with Awox today. Unfortunately, it reports:

Logger: custom_components.awox.config_flow
Source: custom_components/awox/config_flow.py:138
Integration: AwoX Mesh lights ([documentation](https://github.com/fsaris/home-assistant-awox), [issues](https://github.com/fsaris/home-assistant-awox/issues))
First occurred: 8:35:40 PM (15 occurrences)
Last logged: 9:30:04 PM
Can not login to AwoX Smart Connect [Login failed - Invalid username/password.]

I grabbed your source code and tried to login using a POST method (postman) to https://l4hparse-prod.awox.cloud/parse/login, with the right headers & payload. That also responds:

{
    "code": 101,
    "error": "Invalid username/password."
}

I triple, quadruple checked my credentials, they work fine for logging in the Awox android app. :shrug:

This might be related to this issue. If not, please tell me, I can open a seperate issue for this.

opTi4H2F commented 1 year ago

Hi kkoenen,

I tried the same with my credentials and got back a "200 OK" session token and the installation Id from the Awox Api.

There seems to be another problem here.

I was able to get the integration working again with a LED stripe by creating a new Awox account. I removed one LED stripe from the old account and added it to the new account.

I thought I had solved the problem and moved all other devices to the new account as well. But unfortunately after reinstalling the error occurred again.

I am not sure if it is because of the reinstallation of the integration or because of the two new bulbs that are not supported.

fsaris commented 1 year ago

Just tried again to setup from scratch and no issues here 😕

opTi4H2F commented 1 year ago

There must be a problem with the other account. I created a fresh Awox account, reset my devices and added them to the new account. Now everything works again without problems.

I leave the light bulbs paired with the old account though, as the problems only started after adding them :D