Yale Smartphone Alarm System integration

my intergration went down today, dose any one have this still running?
groovyx.net.http.HttpResponseException: Not Found @line 57 (login)
the log in must have changed

Yale have done a systems upgrade, my integration has stopped working also. I suspect the server or the FQDN we used has been retired.

what paramaters did you and another user use to get the authentication working.
mine has gon down so looking to update the DH

Hi Mark,

The new URL is ‘https://mob.yalehomesystem.co.uk/yapi/services/’ however they change the way the authentication works, so I was able to get this working in POST but never finished writing it all into the DH, as the way it authenticates in the DH needs changing too, as just replacing the URL doesn’t work. Be interested if you get this working, I’ve never really be proficient with Grovvy, just bits and bobs so hit a bit of a wall and stopped!

Cheers,

so what params are you passing in POST, ie headers, body etc

also the path /services/ what is that for is it to request a token or do something?

i have it kinda working i can refresh the pannel and get user info

it only works using get and authorisation : Bearer ‘unique code snooped from the yale app on phone’
need to use an app called netcapture on android, start it running log into the yale app, then whitch back, it will show you all network events, find the yale ones and the should be somthing like this
image

1 Like

Just tryna re-produce the POST method from my previous comments… It’s been a while since I managed to get it responding, I’ll post an update once I’ve figured it out, unless you do before of course.

I can authenticate with the token and ‘bearer’ param, just figuring out what method I used to POST a disarm command.

1 Like

Ok, sorted it. So you get the token using /o/token/ as you mentioned above using the GET.

Once you’ve got your bearer use a POST to the URL in my below screenshot, with JUST those two variables in the form data:

Make sure you put the bearer token in the auth tab and select ‘Bearer’ as I think mine were failing because I didn’t have a capital ‘B’. Also click preview so it saves the authenication.

So all in all, after you’ve got your bearer token, you don’t need the port from the /services/ path anymore, just use a POST to the address above, add the area/mode in ‘form body’ with area = 1, mode =arm or disarm and add ‘bearer’ in the authentication tab along with your token, this 100% works as just armed/disarmed mine a load of times… I stopped here as I was struggling with the groovy code, I had done a bit but never managed to get it fully functioning.

Let me know if you need anything else.

Hi,
thanks for your efforts so far, looks very promising.

I am trying to get this working and write the DH.

Going through your steps, I tried to GET the token from https://mob.yalehomesystem.co.uk/yapi/o/token/, using Basic auth (username and pass). All I get back is 405 method not allowed?
Is taking a network capture the only way to get the token, or i have got it completely wrong in getting the token from the url

Hi Silverman,

No problem, that’d be great if you could write the DH for it.

No you can purely use POST, you have to do it the URL as you mentioned with the grant type/user/pass in the body:

Then in the header you need to use basic auth as below:

The full string being -

‘Basic VnVWWDZYVjlXSUNzVHJhcUVpdVNCUHBwZ3ZPakxUeXNsRU1LUHBjdTpkd3RPbE15WEtENUJ5ZW1GWHV0am55eGhrc0U3V0ZFY2p0dFcyOXRaSWNuWHlSWHFsWVBEZ1BSZE1xczF4R3VwVTlxa1o4UE5ubGlQanY5Z2hBZFFtMHpsM0h4V3dlS0ZBcGZzakpMcW1GMm1HR1lXRlpad01MRkw3MGR0bmNndQ==’

Then POST to it, any problems let me know.

wonderful. that works. i’ll try to get a DH working and post an update here.

1 Like

Can you send me the parameters you used in post. Anything sensitive just put e.g. and make something up

hope this helps

What’s in the header?

Hey guys,

I’ve been looking into this too as I found out the hard way how much I took this integration for granted! :smiley:

@mark_cockcroft I’ve forked from your repo here with my changes:

I’m porting over the changes previously posted in

So far the login works and can do a status refresh (to get alarm state). The Authentication now uses OAuth 2.0, which is different from before. This code won’t be OAuth 2 compliant (as you shouldn’t need to store your username and password), but it’ll work and if I get chance later I’ll figure out how to integrate it with OAuth properly.

Shouldn’t be too long before I get arming working, might not get round to it tonight so feel free to add to my repo above. I’ll keep everyone posted here.

2 Likes

the complete text for Authorisation is ‘Basic VnVWWDZYVjlXSUNzVHJhcUVpdVNCUHBwZ3ZPakxUeXNsRU1LUHBjdTpkd3RPbE15WEtENUJ5ZW1GWHV0am55eGhrc0U3V0ZFY2p0dFcyOXRaSWNuWHlSWHFsWVBEZ1BSZE1xczF4R3VwVTlxa1o4UE5ubGlQanY5Z2hBZFFtMHpsM0h4V3dlS0ZBcGZzakpMcW1GMm1HR1lXRlpad01MRkw3MGR0bmNndQ==’

Right, my fork is now working, it can arm and disarm the alarm.

You should be able to swap the old code straight out with the new, without any other changes.

There’s still work to be done to make it authenticate in the “proper” way, however it’ll work in its current form.

Let me know how you get on with it :slight_smile:

2 Likes

Well done guys, I’m so glad this isn’t just dying the yale alarm is a good alarm, just needed this kind of integration

Absoloutely top job mate, working a treat for me! :slight_smile:

Thank you for sharing and all your work!

I wonder if with this we’re able to add the states back of the door sensors as we were previous? Not sure if it’ll be possible as with the old you got a web portal and devices listed, i’ll have a look see if i can pull it from a URI