Custom device UI

Posted on
Mon Jul 19, 2021 10:16 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Custom device UI

Been a while... finally getting an old project off the shelf.

I am looking to support a digital output device that comes in two flavors:
  1. 0 or 5v, 100% duty cycle (old version)
  2. 0 or 5v, variable duty cycle (new version)
Implementing the device as a dimmer would provide a device UI slider control that can be used to control the duty cycle. This functionality would be meaningless on the device with no duty cycle control - though it wouldn't hurt anything. I would rather not have to create a separate device for each version. So, is there any way to hide the dimmer slider, or otherwise build a custom device UI?

Thanks

Posted on
Mon Jul 19, 2021 12:38 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Custom device UI

Nope, no custom device UI available. So if you don't want to show the dimmer control for both versions, you'll need two device types.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jul 19, 2021 2:47 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Custom device UI

Figured. Thanks for the response.

Posted on
Mon Jul 19, 2021 5:52 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Custom device UI

Just throwing this out there in case it's an option for your project. With Indigo 2021.1, it's possible to build controls into web content using the Web Server API and pass the controls' value back to Indigo. Then you could use something like:

Code: Select all
<div class="slidecontainer">
  <input type="range" min="1" max="100" value="50" class="slider" id="myRange">
</div>
You could load the custom controls from a device UI.

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

[My Plugins] - [My Forums]

Posted on
Tue Jul 20, 2021 3:19 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Custom device UI

html is interesting. But, in this case, I'd prefer to keep all the controls in the same interface.

However, a different, but related question. In the case of the physical device, the most common use will be as a binary on/off output controlling some external device. Even though duty-cycle control is available, it will only be rarely used, at least for now.

However, for a dimmer device the default displayStateId is brightnessLevel. So, I started to look at forcing that to something else, like onOffState, or just on or off. I can set uiValue to on or off and get the display state I want. But, then the min/max controls on the dimmer slider also display on and off instead of o and 100.

Is there a way to use an on/off value as the display state, and still keep the default slider display?

Posted on
Wed Jul 21, 2021 9:21 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Custom device UI

uiValue.ui ?

(Like if you’re storing temperature as integer but want it to display as °c?


Sent from my iPhone using Tapatalk Pro

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests