Interface graphic symbols (Dead horse beating)

Posted on
Fri Nov 08, 2013 1:00 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Interface graphic symbols (Dead horse beating)

Sorry to re-visit this topic, but after spending some frustrating time trying to implement a graphic signal (state column icon) for an alarm zone, I have run into the following problem.

Using the status icon status state scheme released in API v1.11, I cannot display text and a graphic. This, as Jay pints out, is contrary to GUI usability guidelines. If Indigo sees one of the keywords or values as the state value (lookup table defined in the API release notes) it replaces the keyword with the icon. I tried using uiValue in updateStateOnServer to add the text, but that value also overrides the state value used to determine which, if any icon to display.
For example: If I set state to 'faulted' I get only a red dot displayed. If I then add uiValue=u'Fault' I get 'Fault' displayed as the state, and no red dot - I would like both: Fault.

And, there is still the issue of how to graphically (color) identify alarm zone states. I would like to have a faulted zone show a red dot (red = something not Ok - I.e. the alarm cannot be set because this zone is faulted. Or, the alarm went off because this zone was faulted). Conversely, I would like to use green to indicate a zone that is clear, or ready to arm (green = go). But, the only values I can use to display a green dot are "active", "enabled", "open", "connected" and "available." None of which convey the semantic I want. (Open is the closest, but, in fact, from a electric sense, the circuit is actually closed.)

Ok, so why bring this up again… I know you want to re-work/expand this whole area and was hoping, just maybe, the priority might get bumped up if enough wheels squeaked.

Thanks.

Posted on
Fri Nov 08, 2013 4:40 pm
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Interface graphic symbols (Dead horse beating)

It should be showing both - I just checked and it's showing both for iTunes devices, timers, and Vera Bridge devices. Are you setting uiValue to "" rather than None (or just leaving it out)? That would cause the problem.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Nov 08, 2013 5:02 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Interface graphic symbols (Dead horse beating)

I was using…
    indigoDevice.updateStateOnServer(key='zoneState', value='faulted', uiValue=u'Fault')
which I would expect to show |Fault |
But, it just displayed 'Fault'.

I'll try again.

I also had a very odd problem. The ui-state display became frozen on the device I was testing with. That is, it got stuck on 'Fault.' I made sure the code wasn't erring, thus missing the clear, but it executed lines before and after the update. I finally deleted the device and created it again and all was well. If it happens again I'll copy the device from the db for you.

Posted on
Fri Nov 08, 2013 5:25 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Interface graphic symbols (Dead horse beating)

Ok. Definitely something odd happening here. Here is the code to 'fault' the device
    indigoDevice.updateStateOnServer(key='zoneState', value='Fault', uiValue=u'faulted')
And, here is the Indigo display
ss.png
ss.png (36.84 KiB) Viewed 7589 times


Now, if I change the code to:
    indigoDevice.updateStateOnServer(key='zoneState', value='faulted', uiValue=u'Fault')
I see this
ss2.png
ss2.png (31.24 KiB) Viewed 7589 times


In summary, in both cases, the uiValue was used to select the icon and as the displayed value.
In the first case, I get the icon, because faulted is a valid value in the icon lookup table. In the second case, I do not get the icon because Fault is not a valid icon lookup value.

BTW. I resolved the 'stuck' state display issue. Seems if you use uiValue to set a state, you also have to use it to unset/change that state. Seems like a bug to me?

Posted on
Mon Nov 11, 2013 12:46 pm
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Interface graphic symbols (Dead horse beating)

"fault" != "faulted" - as specified in the release notes it's looking for "faulted", not "fault".

And, yes, the stuck state display issue is a bug that Matt had already fixed which will be in 6.0.5.

We've also agreed to change the heuristics to look at the raw state value, not the UI value passed in. This change will also be in 6.0.5.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Nov 11, 2013 12:58 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Interface graphic symbols (Dead horse beating)

jay (support) wrote:
"fault" != "faulted" - as specified in the release notes it's looking for "faulted", not "fault".

That was clear. The question is: which value is being used for the icon lookup? value or uiValue? It appears uiValue is being used. If that is the case, then I am back to the original question… How to I add text to the icon?

Posted on
Mon Nov 11, 2013 1:11 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Interface graphic symbols (Dead horse beating)

berkinet wrote:
jay (support) wrote:
"fault" != "faulted" - as specified in the release notes it's looking for "faulted", not "fault".

That was clear. The question is: which value is being used for the icon lookup? value or uiValue? It appears uiValue is being used. If that is the case, then I am back to the original question… How to I add text to the icon?

As Jay said above, in 6.0.4 (current release) it performs the heuristic on the UI value, but in 6.0.5 it will perform it on the raw value instead. So you'll be able to use the raw value to select the icon you want, then use the UI value to show whatever state text you want.

Image

Posted on
Mon Nov 11, 2013 1:24 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Interface graphic symbols (Dead horse beating)

matt (support) wrote:
...As Jay said above, in 6.0.4 (current release) it performs the heuristic on the UI value, but in 6.0.5 it will perform it on the raw value instead. So you'll be able to use the raw value to select the icon you want, then use the UI value to show whatever state text you want.

Thanks for making that clear. The actual impact was not clear to me after reading Jay's post.

Posted on
Wed Nov 13, 2013 7:10 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Interface graphic symbols (Dead horse beating)

after a lot of hard work, Support wrote:
6.0.5 is now available for download.


Developer API Changes:
Status column image is now selected based on the raw state value, not any passed in UI value.

Thank you, thank you. Works as expected…

Now, after 10 minutes of elation, can I get back to the old horse I've been beating.

For an alarm zone or panel, I am now using the state name faulted and the uiValue Fault and am getting just what I wanted: Fault

But, I have no good option for the Clear state. I would prefer a green dot, but gray would be Ok. However, to use either of those colors I must choose between a limited list of state, none of which, IMO, are appropriate:
    ["inactive", "disabled", "closed", "disconnected", "unavailable"] or if the state value is a boolean and false show a gray dot
    ["active", "enabled", "open", "connected", "available"] or if the state value is a boolean and true show a green dot
I know I can hide the value in the state column with uiValue. However, the canonical value remains one of the ones noted above and that is still displayed in the states window and is used for triggers, and control pages.

I know there are different opinions as to what alarm device states mean, but please, can we come up with some term to allow a device to show a meaningful icon in, what I call, the clear (I.e. not: faulted, alarmed or trouble) state.

Posted on
Thu Nov 14, 2013 7:07 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Interface graphic symbols (Dead horse beating)

At this time we do not want to extend the terms used in the icon choice heuristics. We do plan on providing a more flexible mechanism in the future.

Image

Posted on
Thu Nov 14, 2013 3:40 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Interface graphic symbols (Dead horse beating)

So, until a more flexible mechanism is available, I have come up with a work-around that gives me what I was looking for.

I created a new custom state, displayState for my device. I then set displayState as the UiDisplayStateId. Now, all I have to do is updateStateOnServer for displayState with a value* needed to select the appropriate icon as the value and the label I wish displayed along with the icon as the uiValue.

The only, minor, issue is that the new state shows in the Custom States table. Here is what the DEVICES table looks like…
ss.png
ss.png (38.62 KiB) Viewed 7370 times

Thanks Matt and Jay for your help, and patience, while I worked through this issue.

One caveat to anyone else trying this approach, you need Indigo 6.0.5. Previous versions of I6 used the uiValue rather than the value for selecting the state column icon.

* as defined in the icon heuristic table

Posted on
Sun Nov 19, 2017 1:59 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Interface graphic symbols (Dead horse beating)

matt (support) wrote:
... We do plan on providing a more flexible mechanism in the future.

I was just wondering if this ever happened. I have searched the Indigodomo web site and all I can find is the discussion on status icons in the API v1.1.1 release notes..

What I am trying to do is support a graphic notation of Bypassed zones in the device list for alarm zones.
I currently have the UI displayState set to Clear/Fault with a corresponding green or red dot displayed.
Ideally, I would like to have 4 states per zone:
    Clear:not_bypassed
    Clear:bypassed
    Fault:not bypassed
    Fault:bypassed
However, I could get by with three states: Clear (green), Fault (red), Bypassed (yellow). For the time being, I am working with "bypass" as text since it is not recognized b y the icon heuristic.

In any case, this falls under the "nice to have" heading and is by no means critical. But, since it's been 4 years since I last checked on this, I though I'd check to see if there have been any changes..

Posted on
Sun Nov 19, 2017 5:08 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Interface graphic symbols (Dead horse beating)


Image

Posted on
Sun Nov 19, 2017 5:51 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Interface graphic symbols (Dead horse beating)

matt (support) wrote:

Thanks Matt. I had missed that change. Do you plan to also maintain support for the v1.1.1 heuristic and uiValue attribute, or, will they be blended into updateStateImageOnServer() at some point ?

Also, is the custom image icon still on the list for future development? That is what I would really ,like to see.

Posted on
Sun Nov 19, 2017 5:52 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Interface graphic symbols (Dead horse beating)

uiValue and the heuristic will be maintained and separate from the updateStateImageOnServer() API.

Custom state images are definitely still on the list, but you know us – no ETA. ;-)

Image

Who is online

Users browsing this forum: No registered users and 5 guests