Author Topic: API documentation  (Read 6265 times)

Offline rustyk

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
API documentation
« on: March 19, 2013, 01:56:48 pm »
Forgive the noob questions, but I'm interesting in getting the Vera3 controller and some z-wave devices, and writing a custom mobile app to communicate with the controller via the API.  Is there any API documentation that shows things like a list of the function calls in the API, the format of the API (xml, json, etc?) , some example code, and so on?

Also, if I added a device such as a z-wave capable 3-way lightswitch, what sort of management is available through the API to control that device. For example, can I query the API on whether the light on the circuit is on or off?  Can I turn the light on via the API? And is there documentation on what such API calls would look like for these add-on devices?

Thanks in advance!
Rusty

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3258
  • Karma: +191/-9

Offline rustyk

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: API documentation
« Reply #2 on: March 19, 2013, 05:48:07 pm »
Should l take that to mean that there is no formal documentation for the VERA controller's API, and that I should use Google to look for tidbits and examples of what other people have done?

(Not meaning to be overly literal, but I'm a big believer in leaving a clear answer to my question in the forum for future folks who have the same question.)

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3258
  • Karma: +191/-9
Re: API documentation
« Reply #3 on: March 19, 2013, 06:00:44 pm »
rustyk, I recommend Google search over the forum search because it produces better results and can guess at synonyms. "HTTP control" is the magic phrase.

MCV has no "formal" documentation for anything, certainly not for any "API". You glean what you can from the wiki, discount the stuff that's really old as probably superseded, then hit the forums to see what others are doing.

Offline rustyk

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: API documentation
« Reply #4 on: March 19, 2013, 08:30:02 pm »
Ok that's good to know about the forum.  I originally searched for "API Documentation" in the forum and nothing came up, which is why I made this post.

So in the product description for the Vera3, it says: "Open APIs - Vera's home control engine, created by MiOS, has open architecture allowing you or your developers to create new Apps to offer to all Vera users."

I originally came here looking for more details on that. When you say that there's no formal documentation at all, you're referring to that feature, correct?


Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3258
  • Karma: +191/-9
Re: API documentation
« Reply #5 on: March 19, 2013, 09:06:26 pm »
The MCV site is full of questionable marketspeak. A couple of links in the first page of search results with the above query are on the MCV wiki. Those detail the ways that you can communicate with Vera over HTTP, effectively creating your own custom control point. Pretty much everything you can do to control Vera is over HTTP GET. It ain't RESTful at all.

Offline rustyk

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: API documentation
« Reply #6 on: March 19, 2013, 09:13:46 pm »
Ok that's perfect - thanks for all the info!

Offline urfalo

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: API documentation
« Reply #7 on: May 03, 2013, 05:10:05 pm »
Hello. I have made some modules for controlling Vera from Crestron.
When I send a command to Vera, i get a reply thath the command is ok.
But is there a way to receive all the changes thats happening in vera with out asking for all settings?
Etc. I press the on button on a remote control in zwave or 433mhz I want vera to tell Crestron thath the lamp has changed status with out asking for it. Polling makes a lot of unnecessary traffic in the nettwork.

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3258
  • Karma: +191/-9
Re: API documentation
« Reply #8 on: May 03, 2013, 08:11:07 pm »
You do have to poll, but you can be clever about polling. Have a read of http://wiki.micasaverde.com/index.php/UI_Simple#lu_sdata:_The_polling_loop and pay particular attention to the dataversion and loadtime parameters.

Offline Lpadilla

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: API documentation
« Reply #9 on: November 04, 2013, 12:26:06 pm »
I'm interested in any crestron modules to control vera.
Have a client that has over 100 dimmers and don't want to change them.

Offline deardsy

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: API documentation
« Reply #10 on: January 06, 2016, 05:48:01 pm »
Hello. I have made some modules for controlling Vera from Crestron.
When I send a command to Vera, i get a reply thath the command is ok.
But is there a way to receive all the changes thats happening in vera with out asking for all settings?
Etc. I press the on button on a remote control in zwave or 433mhz I want vera to tell Crestron thath the lamp has changed status with out asking for it. Polling makes a lot of unnecessary traffic in the nettwork.

Hey urfalo,

Would you consider sharing your modules, or at least aid in developing some or giving some info of where to start?

I have some Crestron items i have just got to control my AV devices and would like to be able to control my lighting etc which is currently all zwave with a Vera3.

This would be for my own personal use and hobbying, not shared commercially or anything.

Offline urfalo

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: API documentation
« Reply #11 on: January 07, 2016, 04:39:42 am »
Hi. Attached is a demo with my modules. I use one module for Polling to reduce the use of prosessor power on a 2 series.  Whats important is that you use Binary switch for ON/OFF modules, and multilevel switch when you use dimmer modules. You nedd to have a static IP adress on your Micasa or reserve the IP at your DHCP. You find the module ID in the webinterface for MicasaVerde when you open advanced under one of your dimmers/switches. The same goes for the Scene ID.
This modules is for the 2series made whith simpl+. Working on making C# modules for the 3 series thath will be much faster.
Pleace let me know how it goes :)

Offline deardsy

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: API documentation
« Reply #12 on: January 09, 2016, 03:49:12 pm »
Thanks Urfalo!

Im new to the Crestron environment so i'm learning as i go, but your demo was very helpful!

I have a multilevel switch module and scene controller working on my iPad touch panel! I haven't gotten the feedback "Light_level_fb" working though or being able to send a value to the dimmer module. Would the analog join input "Light_preset" be where i do this?

Do you have any documentation on each module as to what all the I/O is?

Greatly appreciate the help!! Im going to try and get some door sensors working and my thermostat as well and report back :D

Offline urfalo

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: API documentation
« Reply #13 on: January 11, 2016, 03:25:02 am »
Hi. Are you shure you use the correct  device id in the crestron Module (See attached image)? Does your dimmer have 0-100% in the web interface for Micasa Verde? The Dim_dn and Dim_up are ment for dimming. The preset is ment if you want to make some preset buttons . 0%, 50% 70% etc.
Do you hav any responce form Micasa in Test manager? Are yo able to see if the TCP/IP module is connected to your micasa at the right IP?

I'm afraid I havent made any documentation for the modules, since they're ment for my personal use only :(

Offline deardsy

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: API documentation
« Reply #14 on: July 18, 2016, 07:50:18 pm »
Hey urfalo,

So i put this project on the back burner for a bit but have picked it back up again.

I have multiple Vera dimmers and switches being controlled by Crestron fine, but still cannot get the feedback from when i change the physical zwave device reported back to Crestron.

I've just now been sifting through the Simple+ Polling module and i think it has to do with the format of the XML file my Vera is outputting and the parsing in the poll module. Is there a certain UI version the poll module works with? Im currently on UI5.

Have you had any luck with this?

I have a Vera 3, on UI5 and a Crestron MC3 processor.

Any luck with your C# modules you were working on?