SmartThings Community

[RELEASE] Garadget (Connect)

dth_garage
garadget

(Stuart Buchanan) #21

@Bisteclol same goes for you can you please PM me your log so i can troubleshoot as i don’t get the same issue here with my test Garadget device, as far as i can see this is working OK, but i really need some logs to troubleshoot further


(Kevin To) #22

The only error in the log is:

12:08:48 PM: error java.lang.RuntimeException: Unexpected status code 400 from global /clients/null with status text Bad Request @ line 73


(Stuart Buchanan) #23

@Bisteclol can i confirm that was the Garadget Connect Log? line 73 is the the section that deals with creating the access token. this does work for me.

can i ask a favour? would you be willing to set a temporary password on you garadget account and PM me the details so i can do some direct testing? obviously i wont open or close any door i will just check that the oauth can be negotiated.

Regards

Stuart Buchanan


(Kevin To) #24

Having trouble trying to find out how to PM you directly; sent you an email via your website


(Alaa Aboulhoda) #25

Thanks for your reply
I don’t know what exactly I did but it is working now perfectly. I was playing around in my account. I think I tried to function the device handler simulator and everything worked fine after that. I was able to authorize the app from the website and it worked on my phone :slight_smile:

Thanks again for your efforts and hard work


(Stuart Buchanan) #26

@drabulhoda i have just done some testing with @Bisteclol 's account, i suspect the issue was because OAuth is not enabled in the smartapp. i get the same error in the log

error java.lang.RuntimeException: Unexpected status code 400 from global /clients/null with status text Bad Request @ line 73

when OAuth is not enabled i get the same error as the token does not exist the URL to receive the token from garadgets servers contain a null value.


(Stuart Buchanan) #27

in case others are struggling i just realised that the main post does not contain a link to the root of the Garadget Repo which contains full install instructions when performing a manual install. click on the link below and read the readme file. i have also added a link in the first post. sorry for this ommision as it would have saved you some troubles.


(Kevin To) #28

Can confirm; I went to the webportal and went into my smartapp and enabled oauth and now it works perfectly. Thanks @Fuzzyligic for everything!


(Stuart Buchanan) #29

you are welcome


(Abhilash Oommen) #30

@Fuzzyligic - First off, thanks for this code and integration. I have done everything and can find Garadget (Connect) under My Apps but the credentials does not work - it does not let me connect my Garadget account to SmartThings. The login step asks me to check my Garadget login and password. I have verified multiple times on the Garadget app that the username (my email) and password is the same as I am entering in Garadget (Connect). any idea why this is happening?


(Stuart Buchanan) #31

@abhi.ko sorry its taken me so long to get back to you.

yes its a strange issue for sure. could you please PM me the logs from the Garadget (Connect) section of the live logging window when you are attempting to put in your username and password.

failing that if you would like me to correctly troubleshoot. if could set a temporary password on your account and provide me with the details. if you are worried about security you can disconnect your garadget from the opener and i can troubleshoot directly and hopefully replicate the issue to come up with a fix.just PM me either the log or your details.


(Abhilash Oommen) #32

Thank you. Sorry did not get notified of a reply here, so it took me a while to come back and check. Here are the logs with my password replaced with [mypassword] , tried logging in twice.
> 8d5ca813-4a0c-455d-88df-9c0dc22fd261 9:18:47 AM: error login result false

8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:47 AM: debug In badAuthPage
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:47 AM: debug ___exception: groovyx.net.http.HttpResponseException: Bad Request
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:47 AM: debug Executing createToken 'sendCommand'
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:47 AM: debug Http Params ([uri:https://api.particle.io/oauth/token, requestContentType:application/x-www-form-urlencoded, headers:[Authorization:Basic cGFydGljbGU6cGFydGljbGU=], body:grant_type=password&username=abhi.ko@gmail.com&password=[mypassword]&expires_in=0])
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:47 AM: debug Executing 'sendCommand.setState'
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:47 AM: debug About to create Smarthings Garadget access token.
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:43 AM: debug Prompting for Auth Details.
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:43 AM: debug In authPage
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:10 AM: error login result false
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:10 AM: debug In badAuthPage
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:10 AM: debug ___exception: groovyx.net.http.HttpResponseException: Bad Request
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:10 AM: debug Executing createToken 'sendCommand'
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:10 AM: debug Http Params ([uri:https://api.particle.io/oauth/token, requestContentType:application/x-www-form-urlencoded, headers:[Authorization:Basic cGFydGljbGU6cGFydGljbGU=], body:grant_type=password&username=abhi.ko@gmail.com&password=[mypassword]&expires_in=0])
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:10 AM: debug Executing 'sendCommand.setState'
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:18:10 AM: debug About to create Smarthings Garadget access token.
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:17:52 AM: debug Prompting for Auth Details.
8d5ca813-4a0c-455d-88df-9c0dc22fd261  9:17:52 AM: debug In authPage

(Stuart Buchanan) #33

does you password contain special characters? if so a new version is on github which fixes this issue. try with the latest code from github.


(Abhilash Oommen) #34

Ahhh…yes it does. okay I try to update from the ide and it does not find anything new. So how do i get the new version. Sorry I’m a newbie at this.


(Abhilash Oommen) #35

Nevermind. Got it. It is working now.

Appreciate your help. Thank you!


(DJAC) #36

Just has to say great job to you and Dennis for all your hard work. Loving your app


(Albertus de Wet) #37

HI. I need your help please.
I got as far as installing the SmartApp and the Handler in my smartthings account.
When I go to the ST app and select Garadget as a Smartapp, I manage to login with my Garadget account details, I get the Message “Credentials Accepted” Garadget is now connected to SmartThings, click Next to proceed.

When I click on Next, it ask me to choose a device, the Garadget does not show up. When I click on “Tap to set” it shows my other Photon devices I have on the account, but Garadget does not show up.
Do need to add Garadget with my other devices onto my Photon account also?


(Stuart Buchanan) #38

the problem is that you are using your credentials for your photon account, these should not be the same. i cant see how it would work correctly if you use your photon credentials.


(Yuriy Bakhmetyev) #39

I am trying to create an Open and Close routine, but no luck. I am able to operate my garage door only in manual mode.
Please suggest.


(Stuart Buchanan) #40

My suggestion is to Use CoRe to do your automations. However if out works manually it will work with routines also. The device handler works with the switch capability. So you can use on/off commands. Try that rather than using three garage door capability.