Grizzelbee / ioBroker.mielecloudservice

Integrates your MieleCloudService (aka Miele@Home) Devices to ioBroker
MIT License
19 stars 8 forks source link

Login not possible #397

Closed MartiMan79 closed 7 months ago

MartiMan79 commented 7 months ago

Ran the adapter successfully in the past but deleted the instance only (adapter still installed) as not needed. Now I want Siri to inform me regarding time left for several appliances. Reinstalled adapter, created new instances (*.1 in case of old config data not being overwritten), registered a new API token and even updated my app credentials but no success. Before you ask, I checked, double checked and triple checked my credentials even while copy pasting... Miele website login works and Miele iOS app as well.

Version 6.5.4

2023-12-26 11:41:32.152 - info: host.rpi4 instance system.adapter.mielecloudservice.1 started with pid 493619
--
2023-12-26 11:41:33.668 - debug: mielecloudservice.1 (493619) Redis Objects: Use Redis connection: 127.0.0.1:9001
2023-12-26 11:41:33.707 - debug: mielecloudservice.1 (493619) Objects client ready ... initialize now
2023-12-26 11:41:33.710 - debug: mielecloudservice.1 (493619) Objects create System PubSub Client
2023-12-26 11:41:33.711 - debug: mielecloudservice.1 (493619) Objects create User PubSub Client
2023-12-26 11:41:33.742 - debug: mielecloudservice.1 (493619) Objects client initialize lua scripts
2023-12-26 11:41:33.750 - debug: mielecloudservice.1 (493619) Objects connected to redis: 127.0.0.1:9001
2023-12-26 11:41:33.754 - silly: mielecloudservice.1 (493619) redis psubscribe cfg.o.system.user.*
2023-12-26 11:41:33.789 - silly: mielecloudservice.1 (493619) redis psubscribe cfg.o.enum.*
2023-12-26 11:41:33.792 - silly: mielecloudservice.1 (493619) objectDB connected
2023-12-26 11:41:33.795 - debug: mielecloudservice.1 (493619) Redis States: Use Redis connection: 127.0.0.1:9000
2023-12-26 11:41:33.806 - debug: mielecloudservice.1 (493619) States create System PubSub Client
2023-12-26 11:41:33.808 - debug: mielecloudservice.1 (493619) States create User PubSub Client
2023-12-26 11:41:33.868 - debug: mielecloudservice.1 (493619) States connected to redis: 127.0.0.1:9000
2023-12-26 11:41:33.869 - silly: mielecloudservice.1 (493619) statesDB connected
2023-12-26 11:41:33.912 - debug: mielecloudservice.1 (493619) Plugin sentry Do not initialize Plugin (enabled=false)
2023-12-26 11:41:33.921 - debug: mielecloudservice.1 (493619) Plugin sentry destroyed because not initialized correctly
2023-12-26 11:41:34.049 - info: mielecloudservice.1 (493619) starting. Version 6.5.4 in /opt/iobroker/node_modules/iobroker.mielecloudservice, node: v18.19.0, js-controller: 5.0.17
2023-12-26 11:41:34.074 - info: mielecloudservice.1 (493619) Login attempt #1 @Miele-API
2023-12-26 11:41:34.282 - silly: mielecloudservice.1 (493619) States system redis pmessage system.adapter.mielecloudservice.1.logLevel/system.adapter.mielecloudservice.1.logLevel:{"val":"silly","ack":true,"ts":1703587294248,"q":0,"from":"system.adapter.mielecloudservice.1","lc":1703586924845}
2023-12-26 11:41:34.357 - error: mielecloudservice.1 (493619) Error: Unable to authenticate user! Your credentials seem to be invalid. Please double check and fix them.
2023-12-26 11:41:34.359 - warn: mielecloudservice.1 (493619) Credentials used for login:
2023-12-26 11:41:34.359 - warn: mielecloudservice.1 (493619) options Miele_account: [xxx]
2023-12-26 11:41:34.359 - warn: mielecloudservice.1 (493619) options Miele_Password: [xxx]
2023-12-26 11:41:34.360 - warn: mielecloudservice.1 (493619) options Client_ID: [xxx]
2023-12-26 11:41:34.360 - warn: mielecloudservice.1 (493619) options Client_Secret: [xxx]
2023-12-26 11:41:34.360 - warn: mielecloudservice.1 (493619) options country: [nl-BE]
2023-12-26 11:41:34.361 - error: mielecloudservice.1 (493619) IMPORTANT!! Mask/Delete your credentials when posting your log online!
2023-12-26 11:41:34.361 - info: mielecloudservice.1 (493619) Login attempt wasn't successful. Connection retry in 31.134 Seconds.
2023-12-26 11:41:34.363 - info: mielecloudservice.1 (493619) Terminated (ADAPTER_REQUESTED_TERMINATION): Terminating adapter due to inability to authenticate.
2023-12-26 11:41:34.932 - info: host.rpi4 instance system.adapter.mielecloudservice.1 terminated by request of the instance itself and will not be restarted, before user restarts it.

CPU: 44,23 % RAM: 25 % Uptime: 0h Available: 5.0.17 Installed: 5.0.17 Events: ?15 / ?25 Platform: linux operating system: linux Architecture: arm64 CPUs: 4 Speed: 1800 MHz Model: Cortex-A72 RAM: 7.6 GB System uptime: 14 d. 21:12:21 Node.js: v18.19.0 time: 1703586333894 timeOffset: -60 NPM: 10.2.5 adapters count: 615 Disk size: 234.2 GB Disk free: 216.6 GB Active instances: 4 Path: /opt/iobroker/ Uptime: 00:00:48 alive: true _nodeCurrent: 18.19.0 _nodeNewest: 18.19.0 _nodeNewestNext: 18.19.0 _npmCurrent: 10.2.5 _npmNewest: 10.2.3 _npmNewestNext: 10.2.3

Thanks in advance and happy holidays!

Grizzelbee commented 7 months ago

Hmmm. Thats pretty difficult.

As you see here:

2023-12-26 11:41:34.357 - error: mielecloudservice.1 (493619) Error: Unable to authenticate user! Your credentials seem to be invalid. Please double check and fix them. 2023-12-26 11:41:34.359 - warn: mielecloudservice.1 (493619) Credentials used for login: 2023-12-26 11:41:34.359 - warn: mielecloudservice.1 (493619) options Miele_account: [xxx] 2023-12-26 11:41:34.359 - warn: mielecloudservice.1 (493619) options Miele_Password: [xxx] 2023-12-26 11:41:34.360 - warn: mielecloudservice.1 (493619) options Client_ID: [xxx] 2023-12-26 11:41:34.360 - warn: mielecloudservice.1 (493619) options Client_Secret: [xxx] 2023-12-26 11:41:34.360 - warn: mielecloudservice.1 (493619) options country: [nl-BE]

The Miele servers deny the login due to invalid credentials - thats the obvisious part. BUT ... on the other hand there are currently approx 2000 users running this adapter sucessfully. So the answer must be: It's an issue between your instance and Miele. The most common issue and the most possible I can currently think of (respecting what you wrote) might be that there could be a leading and/or trailing whitespace in one or more of your copy/pasted credentials - maybe you haven't checked for things like this. That's the reason why I log these data in brackets [] - to make whitespaces more visible. But there have been users in the past also facing issues like that - who solved it themself or in exchange with Miele. Currently there is no known issue with password encryption or the login procedure.

BTW: Do you use Server-Send-Events or simple polling?

Regarding your .1 instance: The config data gets overwritten every time you klick the save button - so it should be sufficient to fix the config of the .0 instance. This has been nessecary a few times in the past to solve changes within the password encryption.

MartiMan79 commented 7 months ago

So I requested new API credentials under the same application name and email address and I got exactly the same credentials as before. Also I uninstalled the adapter again and did a iob fix. Now it works, so I no idea what exactly fixed it but think the error was on Miele's server side...

Grizzelbee commented 7 months ago

Okay. I'm happy that it works for you now. But sad that we couldn't nail down the exact issue. I really don't know why issues like that happen every now and then.