Author Topic: My Notes on remote access for UI6  (Read 20054 times)

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 10061
  • Karma: +759/-141
My Notes on remote access for UI6
« on: May 05, 2014, 11:15:02 am »
I spent a lot of time like other to figure out all of the details of connecting to the UI6+ MCV remote access servers.
Attached are my notes for finally succeeding. I hope you find them useful.

There is some assumption that you already know about UI5 access and are familiar with the MCV requests you can make of your Vera.




Offline Da_JoJo

  • Hero Member
  • *****
  • Posts: 1380
  • Karma: +16/-78
  • If something aint work, we can allways try n make
Re: My Notes on remote access for UI6
« Reply #1 on: May 05, 2014, 11:24:18 am »
thanks so much richard !
did i mention we all love u ? well we do :-D
Vera lite (1.5.622), 2x an-158/2, dead usb pl2302 rs-232, 2x greenwave 6 port, 4x Fibaro FGD211 v1.6, FGBS001, few FGS - 221, etc. AuthomationHD 3 for android :-)
Dutch & German translator http://wiki.micasaverde.com/index.php/Special:AllPages http://support.micasaverde.com http://domotica-shop.nl

Offline garrettwp

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: My Notes on remote access for UI6
« Reply #2 on: May 05, 2014, 11:27:13 am »
To add to Richard's notes. You can also ask me questions as well. I am more than willing to help others understand the MMS authentication.

- Garrett


Offline Da_JoJo

  • Hero Member
  • *****
  • Posts: 1380
  • Karma: +16/-78
  • If something aint work, we can allways try n make
Re: My Notes on remote access for UI6
« Reply #3 on: May 05, 2014, 11:29:40 am »
We love you too garrett :-D
im gonna give it a try to translate this into .NET so if anyone needs that just ask :-)
Vera lite (1.5.622), 2x an-158/2, dead usb pl2302 rs-232, 2x greenwave 6 port, 4x Fibaro FGD211 v1.6, FGBS001, few FGS - 221, etc. AuthomationHD 3 for android :-)
Dutch & German translator http://wiki.micasaverde.com/index.php/Special:AllPages http://support.micasaverde.com http://domotica-shop.nl

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 10061
  • Karma: +759/-141
Re: My Notes on remote access for UI6
« Reply #4 on: May 05, 2014, 12:37:39 pm »
Yep @Garrettwp helped me understand a few detail.

 

Offline geoffbon

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: My Notes on remote access for UI6
« Reply #5 on: May 30, 2014, 12:00:40 pm »
Great notes!  Very clear, and well explained.
I'm trying to hit the auth URL you give, from code, and I'm getting 404's.  Here's the URL:

Code: [Select]
https://us-autha11.mios.com/autha/auth/username/abc?SHA1Password=633914614370772e810c64da7f8814b3b0491e1b&PK_Oem=1
(obviously with the username / hash changed).

Is that server live at the moment?

Thanks,
Geoff

Offline garrettwp

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: My Notes on remote access for UI6
« Reply #6 on: May 30, 2014, 12:19:22 pm »
Use us-autha.mios.com.

- Garrett

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 10061
  • Karma: +759/-141
Re: My Notes on remote access for UI6
« Reply #7 on: May 30, 2014, 12:39:51 pm »
I just checked and autha11 works.

autha works now but does conform to the long term rollout strategy when they have to increase servers to handle demand as well as fault tolerance.

My notes are based on the most recent spec ... After @garrettwp fought his way through the process.
« Last Edit: May 30, 2014, 01:07:16 pm by RichardTSchaefer »

Offline geoffbon

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: My Notes on remote access for UI6
« Reply #8 on: May 30, 2014, 01:02:06 pm »
Thanks both - using us-autha.mios.com makes sense assuming they're going to loadbalance later. 
I'm still getting a 404 with that server though, so I must be doing something wrong; does my Vera have to be running UI6/7 before this will return a valid result?  I'm still on UI5 at this point, and was more wanting to get a head start on playing with the new authentication mode.
Thanks,
Geoff


Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 10061
  • Karma: +759/-141
Re: My Notes on remote access for UI6
« Reply #9 on: May 30, 2014, 01:09:32 pm »
UI6+ accounts are different then UI5 accounts.
You can create an account for UI6+ at home.getvera.com  ... but without a device on UI6 you will not be able to get very far ... you should be able to authenticate your account without a Vera.

Offline geoffbon

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: My Notes on remote access for UI6
« Reply #10 on: May 30, 2014, 01:38:15 pm »
Ok, that also makes sense.  I created an account, and unfortunately still get the same result. 

Possibly I'm doing something idiotic, so a couple of questions:
- Would you expect to see the JSON string if you tested the URL in a browser?  I've tried both code and browser, and get 404s.
- I'm assuming that there shouldn't be angle-brackets around the username / hash in the URL, right?
- I'm also assuming that the hash is the hex result from the hash, is that right? 
I.e. on this page:
http://www.fileformat.info/tool/hash.htm?text=Abc123
...my hash should be the same as the SHA-1 entry?

Otherwise, I'm assuming that possibly the account takes a while to roll through the system.


Offline geoffbon

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: My Notes on remote access for UI6
« Reply #11 on: May 30, 2014, 01:40:25 pm »
...and boom, I figured it out, I was in fact doing something idiotic (I'd missed the seed, which you clearly spelled out!).
Thanks for the help!

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 10061
  • Karma: +759/-141
Re: My Notes on remote access for UI6
« Reply #12 on: May 30, 2014, 03:35:55 pm »
There are a lot of steps and a lot of little details to get right ... that's why it took @garrettwp a while to get this working (he took the lead) .... even with the MCV documentation it took me a while and some help from @garrettwp ... that's why I wrote the notes. 
Let me know if you want to improve  upon them ... I can update a modified version.


Offline geoffbon

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
Re: My Notes on remote access for UI6
« Reply #13 on: May 30, 2014, 05:22:42 pm »
Well thanks to you both for putting it together.  It's people like you guys that make MCV's product usable for the rest of us!
Cheers,
Geoff

Offline leolobato

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: My Notes on remote access for UI6
« Reply #14 on: June 01, 2014, 10:40:07 pm »
That was really, really helpful and detailed.

I've added remote UI6 support to an existing iOS library using your instructions. Here is my fork on github:

https://github.com/leolobato/VeraControl

Once I get everything cleaned up and add support for local access, I'll request a merge to the main fork.