how to create a static control page with <a> links and

Posted on
Sun Oct 12, 2008 2:56 pm
seaofclouds offline
Posts: 32
Joined: Dec 11, 2007

how to create a static control page with <a> links and

does indigo have params support, so i can simply do something like:

<a href="http://indigoserver:port/&living_room_lights=off">

i use an iphone for indigo control. although i like the control page editor, and the inbuilt support for iphone, the load time is just too slow - on wifi, edge, and even from a desktop. as i see it, there's no need to load all the javascript, and so i'm looking for a way to create simpler control page.

i'm good with html, and can set up a local web server to serve static html pages. the ability to link to a param as described above would essentially allow me to create a control page for the iphone that weighs in at about 1k - perfect for mobile load times.

Posted on
Mon Oct 13, 2008 12:24 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: how to create a static control page with <a> links

i use an iphone for indigo control. although i like the control page editor, and the inbuilt support for iphone, the load time is just too slow - on wifi, edge, and even from a desktop.

Note there are 2 Indigo Web pages that don't use any Javascript: the Basic Page and Mini Page. You can access those pages via the Go menu in the Indigo client.

Those pages also will show you example URLs for controlling devices from your own pages if you want. For example, if I control-click on the ON button for my garage fan device, and choose to Copy Link, I get this URL:
Code: Select all
http://127.0.0.1:8176/turnon?device=garage%20fan&reloadPage=1&miniUI=1&width=

You can remove the reloadPage and miniUI to have the device turn on without a page redirect:
Code: Select all
http://127.0.0.1:8176/turnon?device=garage%20fan

Regards,
Matt

Posted on
Fri Oct 17, 2008 2:15 pm
seaofclouds offline
Posts: 32
Joined: Dec 11, 2007

iphone friendly basic_mini views

thanks for the help. i was able to quickly create a simple html page, based on the basic_mini views. in doing so, i figured i may as well tweak the basic_mini templates so i can take advantage of the dynamic aspects of the system.

my changes are hosted at:
http://github.com/seaofclouds/indigo-web/

Posted on
Fri Oct 17, 2008 2:38 pm
seaofclouds offline
Posts: 32
Joined: Dec 11, 2007

revised basic page views

thanks for the tips. i'm sharing my revisions to the basic_mini views at:
http://github.com/seaofclouds/indigo-web/

please feel free to contribute. i'll post more questions in these boards as i make additional progess.

Posted on
Mon Mar 30, 2009 6:11 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: revised basic page views

It is possible this plugin might need some tweaks to work with Indigo 4.0 beta 6. Specifically, the URLs to change the on/off/brightness of Devices have changed to a RESTful format. However, I glanced at the source code and it looks like the plugin make work unmodified, as it defines its own turnon/turnoff/etc. handler functions inside its reqhandler.py file.

If it does break (sorry!), then here are some examples of the new URL format to command devices:
Code: Select all
http://127.0.0.1:8176/devices/office-lamp?isOn=0&_method=put
http://127.0.0.1:8176/devices/office-lamp?isOn=1&_method=put
http://127.0.0.1:8176/devices/office-lamp?brightness=27&_method=put

The above will turn the Device "office-lamp" off, on, then set its brightness to 27%. I put together a Wiki page with several more Indigo RESTful examples.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests