sHedC / python-masterthermconnect

MasterTherm HeatPump API
MIT License
3 stars 2 forks source link

Connect error #41

Closed valentapat closed 1 year ago

valentapat commented 1 year ago
masterthermconnect --api-ver v2, result = Connection Failed {"error":"invalid_grant","error_description":"Invalid user credentials"} ## Version of the custom_component tryed all versions ## Describe the bug A clear and concise description of what the bug is. Can not connect into server , username and password is correct ## Debug log do not know were is debug masterthermconnect --api-ver v2 Connection Failed {"error":"invalid_grant","error_description":"Invalid user credentials"} ```text Add your logs here. none ```
SeBsZ commented 1 year ago

Are you sure you need api version 2? Also try:

masterthermconnect --api-ver=v2

valentapat commented 1 year ago

its the same Im try masterthermconnect --user val* --password ****
Connection Failed Invalid user name or password

sHedC commented 1 year ago

If you login using https://mastertherm.vip-it.cz/webui.php same credentials however if you are using the parameters for the user and password and have a space in the username please replace the space with a + and retry.

Old interface some usernames have spaces but those get converted to + but seems to fail if doing from the parameters.

sHedC commented 1 year ago

v1 - mastertherm.vip-it.cz is pre 2021 installs.

valentapat commented 1 year ago

I have new version, mastertherm.online, username conntains "_" (underline), Is this problem ?

sHedC commented 1 year ago

No idea would have to debug to see what it sends, we will check it out, it is possible though.

SeBsZ commented 1 year ago

I just tried running

masterthermconnect --api-ver v2 --list-device-data --user myemail@gmail.com --password mypassword

and this works perfectly. But, my email and password doesn't contain any underline

valentapat commented 1 year ago

username I cannot change, password contains %

for more info: homeassistant on synology in docker, HASS also cannot connect, all I try . in docker terminal

sHedC commented 1 year ago

Its the %, it has to be encoded for URL,s I will do that please don't change it :)

valentapat commented 1 year ago

bash-5.1# masterthermconnect --api-ver v2 --list-device-data --user my_username --password mypass%x
Connection Failed {"error":"invalid_grant","error_description":"Invalid user credentials"}
Traceback (most recent call last):
File "/usr/local/bin/masterthermconnect", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/masterthermconnect/main.py", line 128, in main
devices = controller.get_devices()
AttributeError: 'NoneType' object has no attribute 'get_devices'

valentapat commented 1 year ago

sorry - how correctly replace all files ?

pip install masterthermconnect==1.1.0rc2 ?? rc8 ???

or any command for update?

sHedC commented 1 year ago

Sorry not yet deployed just doing some other updates then will implement an rc9 so install would be pip install masterthermconnect==1.1.0rc9

sHedC commented 1 year ago

Just published rc9, fingers crossed, the user and password transfer correctly so hopfully works.

valentapat commented 1 year ago

super, runing. This is python version, can you still fix version for homeassistant ? there is [0.1.0-b0], the same problem, or instruction, how it implement into HASS

sHedC commented 1 year ago

Its next on the list if I get a chance tonight I will, ignore the version on HASS until I do an official release all pre-releases are ignored.

HACS should just take the latest commit. If I can do it before christmas I will do it tonight.

valentapat commented 1 year ago

I have not HACS, need only folder /custom_components/mastertherm/

valentapat commented 1 year ago

OT:

sHedC commented 1 year ago

Not yet that going to start looking at once I have a stable read. Then was going to only allow changes that we can fully confirm :)

Build it up as its all guess work