ISY Developers:API:REST Interface: Difference between revisions
No edit summary
No edit summary
|Line 7:||Line 7:|
An optional Web Server module is
An optional Web Server module is for the ISY-99 series of controllers. This module allows you to host your own web site directly on the ISY, making it accessible from any internet-capable device (PC, Mac, cell phone, PDA, etc.) The Web Server module also contains a REST interface which allows easy control of your devices simply by accessing a URL.
Revision as of 13:05, 9 February 2009
The WebModule available for the ISY-99i will allow you to save web pages to the internal memory of the ISY. This allows you to design your own interface for the ISY.
Included with the WebModule is a REST interface.
Web Server Module
An optional Web Server module is available for the ISY-99 series of controllers. This module allows you to host your own web site directly on the ISY, making it accessible from any internet-capable device (PC, Mac, cell phone, PDA, etc.) The Web Server module also contains a REST interface which allows easy control of your devices simply by accessing a URL.
You will find access to purchase and install the module in the Help menu on the ISY Administrative Console.
Once installed, you can access the Web Server module by clicking the Configuration tab in the ISY's Administrative Console, then clicking the Web Server tab.
Browse through files and folders on your PC using the left-hand portion of the screen, while the right-hand portion allows you to browse through the ISY's folders.
Drag and drop files from the left hand side of the screen to the right side's \USER\WEB folder to load files onto your ISY. Once copied to the ISY, files can be viewed using a web browser. For example, load a photo called "family.jpg" onto your ISY and you can view the photo in Internet Explorer using the following URL:
http://ipaddress/USER/WEB/family.jpg (where "ipaddress" is your ISY's internal or external IP address)
To set a loaded file as your ISY's home page, simply right-click the file and choose "Set as Homepage". This page will come up automatically when visiting your ISY's main page (http://ipaddress). You can also right-click a file to Rename or Remove it from the ISY. Finally, right-click a file and click Open to preview it within your default web browser. To revert to the default ISY home page, simply click the "Use Default" button on the left-hand side of the screen.
Feel free to create and load your own custom HTML files to personalize your ISY's main page. You may want to add links to other web-based devices in your home, such as webcams. You can also customize the look of the home page with personalized colors, fonts and graphics. Or, load up your business, personal or family web site onto the ISY - the possibilities are endless.
Here's the syntax for the ISY's REST interface:
METHOD = GET --- Configuration --- /rest/config -- returns the configuration of the system with permissible commands
--- Nodes --- /rest/nodes -- returns nodes, scenes, types, and their status /rest/nodes/<node> -- returns all the attributes & property values for a specific node /rest/nodes/<node>?members=true|false -- this only works on a scene. using members=true includes all the scene members in the result
--- Properties --- /rest/nodes/<node>/<property> -- returns the specific property value for a given node id /rest/nodes/<node>/set/<property>/<value> -- set a value such as OL/250 /rest/nodes/<node>/cmd/<command_name>/<param1>/<param2>/.../<param5> eg: /rest/nodes/<node>/cmd/DOF - turn off a device or a scene /rest/nodes/<node>/cmd/DON/128 - turn on a scene to 50%
--- Status --- /rest/status -- returns the status for all the nodes /rest/status/<node> -- returns the status for the given node
--- Query --- /rest/query -- queries all the nodes /rest/query/<node> -- queries the given node
--- Programs --- /rest/programs/<pgm>/<pgm> e.g. /rest/program/0032/runThen -- Runs a command for a single program rest/programs/<pgm> -- returns single program, or folder with folders/programs within it rest/programs/<pgm>?folderContents=false -- returns single program or folder /rest/programs/<pgm>?subfolders=true -- returns single program, or folder with folders/programs within it recursively /rest/programs -- returns all the programs in the root folder e.g. same as /rest/programs/<root> /rest/programs?folderContents=false -- returns root folder only (same as /rest/programs/<root>?folderContents=false) /rest/programs?subfolders=true -- returns all programs & folders (same as /rest/programs/<root>?subfolders=true)
Defaults: folderContents=true, subfolders=false
pgm-cmd - run|runThen|runElse|stop|enable|disable|enableRunAtStartup|disableRunAtStartup 'runIf' is supported as well, but 'run' should be used instead
-- Modules -- /rest/electricity -- returns electricity module info /rest/climate -- returns climate module info /rest/security -- returns security module info
The following have been disabled for security reasons
-- Misc --
/rest/locations -- returns the floorplan