How to create a simple Control Page with an on/off button??

Posted on
Tue Nov 21, 2023 1:01 pm
kyphos offline
Posts: 54
Joined: Dec 17, 2014

How to create a simple Control Page with an on/off button??

This is such a basic question, I'm embarrassed to post about it.
I have a couple of dozen devices, mostly Insteon,, and use the Indigo Touch app on my iPhone to control them.
I want to simplify the UI for a couple of frequently used devices, so I can turn them on or off with a single touch or two. Using the Indigo Touch app requires that I open the app, scroll down the long list until the desired device appears, then tap to turn it on or off. There must be a simpler way.

I've read various articles here about Control Pages,. Perhaps that's the way to do it? Can I create a page that would be displayed on the Pages page in Indigo Touch with a button that maps to a desired device? Tap the button, and flip the state of the device?
Ideally, I'd like a page with a few buttons, mapped to the few devices that I frequently want to turn on or off.

Thanks for any advice or pointers on how to create something like this.

:arrow: Indigo 2023.1.1, macOS 10.13.6 (High Sierra), Mac mini5,1 (Intel Core i5), PowerLinc 2413U

Posted on
Tue Nov 21, 2023 2:26 pm
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: How to create a simple Control Page with an on/off butto

You sure can. Set up your buttons on the page and link each button to an action -- like a device action or server action. Here's one I use for Z-Wave inclusion (it's not very pretty).

IMG_65E51C547D26-1.jpeg
IMG_65E51C547D26-1.jpeg (31.42 KiB) Viewed 9728 times

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Dec 02, 2023 11:03 am
rehafer offline
Posts: 279
Joined: Feb 08, 2013

Re: How to create a simple Control Page with an on/off butto

And, because it’s got a url; you can use the “Add to Home Screen” from the share sheet in Safari to link to it.


Sent from my iPhone using Tapatalk

Posted on
Sat Dec 02, 2023 12:33 pm
kyphos offline
Posts: 54
Joined: Dec 17, 2014

Re: How to create a simple Control Page with an on/off butto

Thanks to @DaveL17 and @rehafer for the hints/tips.
I did figure out how to add my rudimentary Control Page to my iPhone's home page (using its URL). But it took me ages to deduce that control pages even had URLs, much less what the format would be. That detail isn't mentioned in the documentation about Control Pages:
https://wiki.indigodomo.com/doku.php?id ... trol_pages

However, I've run into a roadblock trying to get a simple control for my Insteon I/O-Linc on the Control Page. The I/O-Link has a single digital output which I use to drive a relay that powers a duct fan. When I view my many devices using the Indigo Touch app on iOS, the I/O-Linc device is tappable, just like various lights, dimmers, and appliance modules. Tap the on/off icon, and the digital output turns on. Tap it again and it turns off. And the icon changes state to indicate the status of the digital output, just like a lamp module.

But when I add the I/O-Link to a control page, the device element that appears doesn't toggle the digital output. The server actions available for that class of device are:
- Turn off all outputs.
- Turn off output.
- Turn on output.
There is no "toggle" action available as there is for other Insteon (and X-10) devices.

My workaround has been to add two instances of the I/O-Link to the control page. One is assigned the server action turn on output 1. The other has turn off output 1. The pair of them work in tandem, but it's not very elegant.

I fiddled around with Virtual On/Off Devices (which required required creation of Action Groups), but was unable to devise a way to have a single toggle element for the I/O-Linc on a control page.

Is there some way to replicate the same type of tappable toggle-style control for an I/O-Linc like the one that's rendered on the Indigo Touch UI?

Thanks!

:arrow: Indigo 2023.1.1, macOS 10.13.6 (High Sierra), Mac mini5,1 (Intel Core i5), PowerLinc 2413U

Posted on
Sat Dec 02, 2023 12:50 pm
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: How to create a simple Control Page with an on/off butto

Glad you found something that will work for you. Thanks for the heads up about the wiki -- I've added a couple sentences on how to discover the unique URL for any control page.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Dec 02, 2023 4:05 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: How to create a simple Control Page with an on/off butto

If you are familiar with Python at all you can create an action that runs a very short script. Your script can get the status of the output and decide how to toggle it

Here's an example, although it's not for an I/O Link:

Code: Select all
if indigo.devices[575567701].states["door_lock_state"] == 'UNLOCKED':
   indigo.actionGroup.execute(485819022)
elif indigo.devices[575567701].states["door_lock_state"] in ['LOCKED','SELECTIVE_LOCKED','SECURED']:
   indigo.actionGroup.execute(1804331331)
else:
   indigo.server.log("BMW is not locked or unlocked")

Posted on
Sat Dec 02, 2023 5:06 pm
kyphos offline
Posts: 54
Joined: Dec 17, 2014

Re: How to create a simple Control Page with an on/off butto

DaveL17 wrote:
Glad you found something that will work for you. Thanks for the heads up about the wiki -- I've added a couple sentences on how to discover the unique URL for any control page.


Dave,
That's good of you to update the Wiki.

FWIW, I stumbled on the URL format to use for a control page (indeed, the fact there was such a thing at all) when I clicked the Browser Preview button at the bottom of the control page I was creating. That launched a Safari session with this URL:
http://127.0.0.1:8176/web/controlpage.html?id=342076956

From that, I deduced that the Indigo web server is listening on port 8176 for browser connections wanting to access a control page,
and that the construct "?id=nnnnn" is how one specifies which control page to access.

The nnnnnn seen in the above URL (342076956) seems to be a temporary id, created on the fly for the preview. To actually access the 'live' control page, one needs to obtain its actual id, which is found in the main Indigo UI for CONTROL PAGES (in the column titled Control Page ID).

And of course instead of putting local host (127.0.0.1) in the URL, you substitute the LAN IP of the server on which Indigo is running.

No doubt this is all well-known to Indigo users who have been using control pages for a long time, it's incredibly obscure for newcomers.

:arrow: Indigo 2023.1.1, macOS 10.13.6 (High Sierra), Mac mini5,1 (Intel Core i5), PowerLinc 2413U

Posted on
Sat Dec 02, 2023 5:13 pm
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: How to create a simple Control Page with an on/off butto

Yes, the Show in Browser button uses the actual ID.

With the preview ID, when you close the control page editor with the page still displayed in Safari, you'll start to get a sea of red in the Event Log.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 9 guests