jockesyk / homeassistant-yale-doorman-via-smarthub

A Home Assistant integration to control a Yale Doorman lock via the Yale Smart Hub.
GNU General Public License v3.0
14 stars 5 forks source link

Integration Does Not Login / Add #31

Open 503Dev opened 1 year ago

503Dev commented 1 year ago

Hello,

First and foremost, thank you for your work. I am using a Yale lock which I can usually control via the Yale Connect app via the Smart Hub. I verified the hub is visible on my network and functional.

I added this integration and it asks me for my username and password. The username is my email address and the password I have double checked. When I add nothing happens, I get a blank login again with no error.

In the HA logs the only output I see is this: 2022-09-17 16:50:07.586 INFO (MainThread) [custom_components.yale_doorman_via_smarthub] 'access_token'

Is there any additional way to debug or am I doing something wrong?

andersovreseth commented 1 year ago

Looks like this plugin is not being maintained anymore, and I also have problems with using it.

Olen commented 12 months ago

Getting the same error.

Trying to log in using curl gives the following error:

curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{"grant_type": "password", "username": "XXXXXX", "password": "YYYY"}' https://mob.yalehomesystem.co.uk/yapi/o/token/

{"error": "unsupported_grant_type"}
Olen commented 12 months ago

I found the basic auth the integration is using as well, but still the same error.

jockesyk commented 12 months ago

Your curl request should look something like this: hub_curl

You can find the hub_username and hub_password if you unpickle the file hub.login.

If the response is Invalid credentials given, then the hub login details are correct but you need to double check your own login details. It's usually an e-mail address and a password of your own choice.

curl -X POST https://mob.yalehomesystem.co.uk/yapi/o/token/
   -H 'Accept: application/json'
   -H 'Content-Type: application/x-www-form-urlencoded'
   -d 'grant_type=password&username=YOUR_EMAIL&password=YOUR_PASSWORD'
   -u 'HUB_USERNAME:HUB_PASSWORD'