marq24/ha-waterkotte-the-fork

Error: Installing Integration: "Username/password is wrong."

Closed this issue · 16 comments

xwox commented

I just tried to install the integration.
I get the Error message: "Username/password is wrong."
I tried it multiple times als with longer waiting periods in between.
My home assistant installation is on the latest version.

marq24 commented

Do you have a "custom" login/credentials configured in your Waterkotte?! -> if yes then there might be the chance that I have messed up the credential configuration... But what could be also the case, that the installation have issues with previous installed versions (e.g. the source of this fork)...

To be sure you might like to try to:

  1. remove any existing waterkotte integrations
  2. remove the repo(s) from HACS
  3. restart HA
  4. re-add this repo
  5. re-install this addon
  6. restart HA
  7. configure the integration (specify user & pwd)
xwox commented

Hello Matthias,
thx for the hint but it does not work. Still the same error message.

  1. Host or IP has to be entered with "http://". Correct?
  2. Could it be an issue with browser coockies?
marq24 commented
  1. without http:// - it's the host or IP - not the URL ... in the code the "http://" will be added -> https://github.com/marq24/ha-waterkotte/blob/120e30a9ef5ed3ec675f8ebb86ff69569da04354/custom_components/waterkotte_heatpump/pywaterkotte_ha/ecotouch.py#L1256

  2. let's see, when you use the just the IP of your waterkotte

xwox commented

I already tried it earlier because it clearly said "IP". So still it does not work.

Do you support my heatpump:
pCOWeb Firmware: A1.4.9 - B1.2.4; Firmware Version: 1.07.95 - 410; BIOS: 6.42
Wärmepumpen-Baureihe: DS 502xAi; Wärmepumpen-Typ: DS 5009.5AI; Wärmepumpen-Seriennummer: 00373804

How can I get any logs?

xwox commented

I guess I found the problem.
"/cgi/login" results in "404". I guess my system is too old. Is it?

marq24 commented

what you can do is the following -> you can open Chrome/Chromium the developer Tools (via F12) and open the network tab - and then open your waterkotte default Webfrontent...

You can then check, what URL's the webbrowers is requesting when login & display the inital data...

marq24 commented

...I guess my system is too old. Is it?
actually I can't tell you, if it's too old - the best way to check that (as described) is to monitor the network traffic between the browser and the "host" -> and based on that it would be possible to support your system (or not) - but in general I have to admit, local testing is more or less mandatory...

xwox commented

Hello,
it seems I do not need a username and password.
The following request:
curl -vv "http://10.0.1.15/config/xml.cgi?N|A|1|10"

delivers the result:
image

Is this the same way how your integration gets the results?

marq24 commented

the integration makes use of the readTags to actually read the data from the heatpump...

https://github.com/marq24/ha-waterkotte/blob/120e30a9ef5ed3ec675f8ebb86ff69569da04354/custom_components/waterkotte_heatpump/pywaterkotte_ha/ecotouch.py#L1407

the 'readTags' will get a list of TAG's to request and then the response contains all values (if available) for these requested TAGs... What tag to request depends a bit from the features of your heatpump - I simply reveres engineered the original served web frontent in order to make my personal adjustments to this fork of the origin waterkotte addon...

xwox commented

I guess I need easyCon instead of ecoTouch.
The correct connection for me should be:
f"http://{self.hostname}/config/xml.cgi?{query[1:]}"

from line 80 in pywaterkotte_ha/easycon.py

How can I enable easyCon mode?
With the integration it seems that this is not working?

marq24 commented

well - in the setup sequence you should be able to select a system type...

image

xwox commented

yes, I use this option.
But according to my understanding of the code it should not use any password and user name in this case.
Why is it giving the error message "Username/password is wrong."? (The login function in easycon.py line 21 is empty!)

marq24 commented

looks like, that "no matter" of your input (in the select) the default value (ECOTOUCH) is used?! What happens, if you modify the default to EASYCON in the source code locally (after the extension has been DL obviously)... and then restart with adding the extension again

https://github.com/marq24/ha-waterkotte/blob/120e30a9ef5ed3ec675f8ebb86ff69569da04354/custom_components/waterkotte_heatpump/config_flow.py#L102

xwox commented

Sorry, I was busy but I might have some time now to investigate the problem further.
Can you give me a hint how to debug your code?

marq24 commented

... well - first of all update to the latest Version of the integration via HACS and then restart your HA installation (and make sure, that you did not have other Waterkotte integrations installed...

then let's see, if the problem still exists

xwox commented

Thank you so much. I removed everything related to waterkotte (including my own integration). After reinstalling everything it worked! Once again thank you for the integration and the quick responses here.

IMHO: This topic can be closed.