|
|
|
Page 1 of 1
|
[ 8 posts ] |
|
| Author |
Message |
|
alistair
Joined: Jul 14, 2006 Posts: 88
|
 IWS Plugin API?
Hi
I'm looking to add some extensions to IWS that interact with Indigo (listing devices and actions) and a local SQLITE database. I can't find the IWS API docs anywhere, just the ones for plugins.... can you point me in the right direction?
I can implement my own webserver as a plugin with Twistd, but then I don't get to use the cool Prism stuff outside my network....
Thanks! -Alistair
|
| Mon Jun 18, 2012 4:51 pm |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6667 Location: Austin, Texas
|
 Re: IWS Plugin API?
This guide is all we have. We haven't spent a lot of time on docs since we're planning on replacing the current mechanism with IOM-compatible version at some point. That's not happening anytime soon though.
_________________ Jay (Indigo Support)
|
| Mon Jun 18, 2012 6:11 pm |
|
 |
|
alistair
Joined: Jul 14, 2006 Posts: 88
|
 Re: IWS Plugin API?
Thanks  Is there any way to enable (or view) debug data for IWS? If I've got a compile or other startup exception in my code, it's just buried and the plugin doesn't load (into IWS). Does IWS output exceptions anywhere I can see them?.... -A
|
| Mon Jun 18, 2012 6:31 pm |
|
 |
|
alistair
Joined: Jul 14, 2006 Posts: 88
|
 Re: IWS Plugin API?
Ahah - a little reverse engineering revealed the "-d" option if I start from the command line. Indigo is so awesome! 
|
| Mon Jun 18, 2012 6:36 pm |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11698 Location: Texas
|
 Re: IWS Plugin API?
Yep, also take a look at the indigowebstart script inside the IndigoWebServer/devhelpers/ folder. I use those scripts to start/stop it from the Terminal when debugging.
_________________
|
| Mon Jun 18, 2012 6:49 pm |
|
 |
|
alistair
Joined: Jul 14, 2006 Posts: 88
|
 Re: IWS Plugin API?
Thanks.
It looks like you've been a little creative with overriding the REST support within Cherrypy. What suggestions do you have for me implementing a REST handler that's done "the Indigo way"?
Simply implementing the GET methods doesn't seem to work...
-a
|
| Mon Jun 18, 2012 7:19 pm |
|
 |
|
bschollnick2
Joined: Oct 17, 2004 Posts: 1116 Location: Rochester, Ny
|
 Re: IWS Plugin API?
alistair wrote:Thanks.
It looks like you've been a little creative with overriding the REST support within Cherrypy. What suggestions do you have for me implementing a REST handler that's done "the Indigo way"?
Simply implementing the GET methods doesn't seem to work...
If you want to control Indigo via the web server, with Python.... I already have a Python wrapper for the Indigo restful interface. It certainly can be improved on, and/or enhanced... Please feel free to send feedback, and/or suggestions... - Benjamin http://code.google.com/p/schollnick-pro ... tful%20APIhttp://www.schollnick.net/wordpress/hom ... n-wrapper/
_________________ ------ My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG
Security Script for v4 - http://bit.ly/QTgclf for v5 - http://bit.ly/T6WBKu
Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33
|
| Mon Jun 18, 2012 9:37 pm |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11698 Location: Texas
|
 Re: IWS Plugin API?
I think he wants to extend the Indigo Web Server RESTful API to handle his extensions, not call the RESTful API from a different host.
Did you look at the variablesreqhandler.py file? That might serve as a good template example of how Indigo implements the RESTful commands for variables. I would think you could do something similar.
Note that as Jay mentioned we will be rewriting the IndigoWebServer to use the new Indigo plugin architecture and object model. That will include some pretty large changes, and I'm not positive that the old style IWS Plugins will be compatible with the newer version... we'll have to see.
_________________
|
| Tue Jun 19, 2012 8:50 am |
|
|
|
Page 1 of 1
|
[ 8 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 3 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|