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

Error requesting miele data: Cannot connect to host api.mcs3.miele.com:443 ssl:default [Name has no usable address] #471

Open
djwafelap opened this issue Apr 28, 2024 · 17 comments
Labels
bug Something isn't working

Comments

@djwafelap
Copy link

The problem

The log reports the following error while the Miele integration is "not available":

Error requesting miele data: Cannot connect to host api.mcs3.miele.com:443 ssl:default [Name has no usable address]

It happens so often that the integration is not really reliable and it is hardly possible to record the work of the dishwasher.

The error looks to me like this is a server problem at Miele or some kind of limitation for third party customers.

Do you have this so often and for so long?

Cheers
Rado

Version of miele integration having the issue?

miele-08.23

Version of Home Assistant Core having the issue?

core-2024.4.4

Anything in the logs that might be useful for us?

No response

Additional information

No response

@djwafelap djwafelap added the bug Something isn't working label Apr 28, 2024
@astrandb
Copy link
Owner

Please make sure that you are using this integration. The version miele-08.23 is not from this integration.

@djwafelap
Copy link
Author

sorry, this was a wrong version number. Is v2024.3.0 more realistic?

Please make sure that you are using this integration. The version miele-08.23 is not from this integration.

@astrandb
Copy link
Owner

Thanks, then I know that you are on the right field...
This is not a normal behaviour of the integration. Please attach relevant lines from the full HA log.
BTW Are you using the AdGuard add-on. I have got a few reports in another context that it causes this type of interference.

@djwafelap
Copy link
Author

Hi,
I don't use AdGuard.
Here are all entries regarding miele in the full HA log:

"2024-04-28 18:42:43.896 ERROR (MainThread) [custom_components.miele] Error requesting miele data: Cannot connect to host api.mcs3.miele.com:443 ssl:default [Name has no usable address]
2024-04-28 18:42:43.896 DEBUG (MainThread) [custom_components.miele] Finished fetching miele data in 0.079 seconds (success: False)
2024-04-28 18:42:43.900 DEBUG (MainThread) [custom_components.miele] Finished fetching miele data in 0.004 seconds (success: False)
"

And here is the full entry of the error in the system log:
"Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.miele
Quelle: helpers/update_coordinator.py:328
Integration: Miele (Dokumentation, Probleme)
Erstmals aufgetreten: 27. April 2024 um 02:24:45 (123 Vorkommnisse)
Zuletzt protokolliert: 18:46:40

Error requesting miele data: Cannot connect to host api.mcs3.miele.com:443 ssl:default [Name has no usable address]
Error requesting miele data: Cannot connect to host api.mcs3.miele.com:443 ssl:default [Try again]"

I also had this error before the integration happened to be running again:
"General error while obtaining the access token."
image

Could it perhaps have something to do with that?

Thanks, then I know that you are on the right field... This is not a normal behaviour of the integration. Please attach relevant lines from the full HA log. BTW Are you using the AdGuard add-on. I have got a few reports in another context that it causes this type of interference.

@astrandb
Copy link
Owner

Allgemeiner Fehler während der Einholung des Zugriffstokens. appear if there is an authentication error when setting up the integration the first time. The result is unpredictable if you manage to pass this error message.
I suggest that you uninstall the integration while making sure that the oauth credentials are removed also. Then install the integration again.

@djwafelap
Copy link
Author

hm, after complete remove and reinstalling, the problem is still the same :(
is it possible that miele somehow blocked me or put me on a kind of black list due to too many requests???

@astrandb
Copy link
Owner

I don't think that Miele is blocking you, There should be "429"-errors in the log then. It must something in your setup, The integration works for more than 6600 users.

You can verify that your app credentials work on https://www.miele.com/developer/swagger-ui/index.html - Click Authorize

@djwafelap
Copy link
Author

Is there any setup I can do???

I don't think that Miele is blocking you, There should be "429"-errors in the log then. It must something in your setup, The integration works for more than 6600 users.

You can verify that your app credentials work on https://www.miele.com/developer/swagger-ui/index.html - Click Authorize

@astrandb
Copy link
Owner

Check that you can authorize on Miele developer site, link above. Other users have noted problems if their password includes any special characters.

@djwafelap
Copy link
Author

looks like i am logged in (???)
image

Check that you can authorize on Miele developer site, link above. Other users have noted problems if their password includes any special characters.

@djwafelap
Copy link
Author

Does the "Application Name" have a special purpose?

I have also noticed that the integration hangs on the first attempt at a new installation until I cancel it. No files have been copied to the /config/custom_components/miele directory. The integration is only installed on the second attempt.

Could this have something to do with it?

@astrandb
Copy link
Owner

astrandb commented May 3, 2024

Does the "Application Name" have a special purpose?

In what context? If when entering application credentials it is just a descriptive name. In HA you can store multiple sets for an integration. You will then be prompted for which credentials set you want to use. Mainly usful for developers that want to swap between different Miele accounts.

I think we need to be very specific on the details here:

  1. You typically use HACS or a manual copy to DOWNLOAD the integration to /config/custom_components/
  2. Restart HA to let it learn about the downloaded integration.
  3. INSTALL the integration from Settings->Integrations by selecting Miele integration. Many times the Miele integration will autodiscover any Miele appliances present on your LAN and prompt you to install the integration
  4. If it is a first time install you will be prompted to enter application credentials.
  5. You will be redirected to the Miele site to verify your account.
  6. You should the be directed back to your HA and the setup will complete.

At what point are you getting errors?

No files have been copied to the /config/custom_components/miele directory.

Sounds very odd.

Can you please tell about your installation:
Environment: HassOS, VM, docker...
HA core version:
HACS version - if any:

@djwafelap
Copy link
Author

ok, just thought the application name could have a special meaning. if it's only a description, it should not make problems.

  1. yes, i use hacs for downloading the integrations
    image

here is what happens next: it looks like miele is beeing installed, but nothing happens except of the rotating circle.
image
i have to cancel this process and start downloading once again, then it works

  1. after downloading, i restart HA

  2. then i install the integration
    image

i don't know why at this point it knows the model of my dishwasher...
image

  1. entering the credentials
    image

  2. verifying my account
    image

image

image

  1. back on the integrations screen, i get the mentioned error

image


my installation:
Environment: HassOS 12.2, installed on an intel NUC
HA core version: 2024.5.0
HACS version: 1.34.0

@astrandb
Copy link
Owner

astrandb commented May 3, 2024

It is the redirect back to HA that fails. Please make sure that you can access your HA instance with the marked url. Otherwise you should edit the url by clicking the pencil and change it to the url you are currently using.
image

@djwafelap
Copy link
Author

Thanks for the hint! It certainly makes sense to place the HA server here and i will try out. But are you sure that this is the only reason? I find it strange that the integration occasionally works after a few dozen attempts and only has frequent dropouts and after a while comes back. Wouldn't it fail permanently if it is the redirect?

image

@djwafelap
Copy link
Author

I just tried it and I get the same error, both with the local IP address of HA and with the external domain... :(

@djwafelap
Copy link
Author

no more idea what it could be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants