sh00t2kill / dolphin-robot

A custom Home Assistant Component for WiFI enabled Maytronics Dolphin pool cleaner robots
43 stars 9 forks source link

Robot not related to user #91

Closed gkyprios closed 1 year ago

gkyprios commented 1 year ago

Hi guys,

Firstly thanks for the custom integration. I was using my M600 in Home Automation mode and controlling power to it from the wall socket, but your integration is much, much better!

I seem to be having an issue with the initial setup though. I am running HA 2022.11.5 and HACS 1.28.4. Everything seems to install fine and the intergration is happy with my creds. But after taking my creds no entities are setup. According to the log I have this issue:

Logger: custom_components.mydolphin_plus.component.api.mydolphin_plus_api Source: custom_components/mydolphin_plus/component/api/mydolphin_plus_api.py:151 Integration: MyDolphin Plus (documentation, issues) First occurred: 11:02:09 (8 occurrences) Last logged: 11:10:13

Failed to retrieve AWS token after 4 attempts, Error: Invalid length for a Base-64 char array or string. Failed to retrieve AWS token after 4 attempts, Error: Robot not related to user

I have tried deleting the robot from the app and renaming it. I tried resetting my password just in case it was old and didnt comply with any new requirements, although it was authenticating correctly in the app and when I setup the Integration.

Let me know what else you might need to assist me please?

Thanks guys.

sh00t2kill commented 1 year ago

Can you please enable debugging and provide the logs?

The error suggests the serial number of the robot isn't being correctly determined.

gkyprios commented 1 year ago

Thanks for your response. No worries, see below. I think I removed all sensitive info but let me know if I missed anything?

The unit has gone back several times under warranty. I'm not sure if its the same one every time. Should I try to register the serial with them again?

mydolphin.txt

Thanks again.

sh00t2kill commented 1 year ago

Is B3391DQM6K the correct serial for your current robot? You can check under settings, robot details in the my dolphin app.

Also check the motor serial number, which should be the same minus the last 2 characters.

I wonder if it's changed due to your warranty issues it's somehow pulling the wrong one.

It's definitely not credential related as it's logging in correctly

gkyprios commented 1 year ago

The serial numbers in the app appear to match the physical devices. But the serial for the robot is different to the serial for the motor: Screenshot_20221210_155952_MyDolphin Plus 20221210_155532

20221210_155344

sh00t2kill commented 1 year ago

That explains it. The integration assumes they match.

Will have a look at it.

elad-bar commented 1 year ago

adding more details to the login request / response, might find the reason over there

elad-bar commented 1 year ago

there are 2 options:

  1. wait for v0.3.3 to get released
  2. add the following line to custom_components/mydolphin_plus/component/api/mydolphin_plus_api.py (below line 179):
                _LOGGER.debug(f"Logged in to user {username}, Data: {data}")

    so it will look like (exactly) as in the image below

image

elad-bar commented 1 year ago

most likely found the issue and fixed it for v0.3.3 (pending review by @sh00t2kill ), the assumption was that the motor unit serial number is the same as the serial number without the last 2 characters, instead of making that assumption, added new call to get it from Maytronics API.

gkyprios commented 1 year ago

Hey guys, I've added the extra line below 179 as above and restarted HA. Attached are the new logs.

logs2.txt

Let me know what you need next?

elad-bar commented 1 year ago

As wrote in my last comment, solution is available but requires review before releasing it

elad-bar commented 1 year ago

Up until that version to be released you can take the dev branch and copy it to HA manually

sh00t2kill commented 1 year ago

v0.3.3 has been released.

gkyprios commented 1 year ago

Thanks very much guys. I'll let you know how I get on.

gkyprios commented 1 year ago

Thats working! Thanks guys!

elad-bar commented 1 year ago

Amazing, thanks for raising this issue and providing the logs to make it easier for us 😀