Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SOLVED -- Button States
#1
Hi,

I'm having an issue with custom image button states.

I've created a "down" button and an "up" button and correctly assigned them both.  Unfortunately when I look at them in the CQC client on the iPad I don't see a down or up state.  The buttons do function (meaning they fire off their commands) but there doesn't appear to be a visual toggle when they're pressed.

Second Q... I'd like to be able to conditionally set the state of a button (on or off) based on a system variable.  I know how to read them on the page load but I'm not sure how to explicitly set the state of a button.  

Thanks in advance!


.a
Reply
#2
It may be fast enough that it never redraws or something. There isn't really a press/release, not since we went to gestures. we don't know until after the fact that a click occurred, so it just sets itself to press state, redraws, does a short pause, and then sets itself back to unpressed state, and redraws.

I'm not sure how the iOS client decides when to redraw, but it may set some minimum time in order to avoid undue overhead or something. And it may be happening within that time.

On the second thing, do you mean a check box? You can't control the pressed/released state of a regular button. But you can control the true/false state of a check box. I actually just put up a video on check boxes if you haven't watched it yet.

https://www.youtube.com/watch?v=kUyAXSIFl5M

If that's not the info you are looking for, let me know.
Dean Roddey
Explorans limites defectum
Reply
#3
Hi Dean,

I'm attaching a screenshot of part of my Audio control page:

Where it says, "Office" for example... that is a button that toggles the "Office" zone of my Nuvo system on or off.  At the moment, "Off" or "Ready" (above the button) denote the status of that zone.

What I'd like to do is to have the "Office" button in a dark blue state (what you see here) if it's off and "lit up" if it's on.  Basically, the button acts like a stateful check box.  

Is there any way to do that?

Warmly,

.a


Attached Files
.png   Capture.PNG (Size: 77.57 KB / Downloads: 6)
Reply
#4
The check box should handle that as is. It both shows you the state of the thing and allows you to toggle it. You can have two different images, so you'd have to use an image to show the state, not a background color fill, but you could make it look exactly the same really. So just create two images that are just basic color fills of the correct color. Set one for the true state and one for the false state and that should do it.
Dean Roddey
Explorans limites defectum
Reply
#5
SOLVED -- <sigh>

You have to set the Expressions for True and False... In the case of the NUVO system, "On" is reported by the string, "Ready" (vs. '1') and "Off" is reported by the string "Off" (vs. 0).

-------------------------------------------------------

Hi Dean,

That is a great solution.  Thanks!

Now I have to ask the embarrassing question of the century... 

What the heck am I doing wrong?  I have the check box configured exactly the same way as my field text and buttons (which are working correctly) but the check box neither updates as the field changes nor does it act as a toggle when I press it.  I have confirmed it's monitoring the correct field and the true and false clicks are set to the appropriate (negated) actions....

I know this is going to be a stupid mistake... what am I missing?

Thanks,

.a
Reply
#6
For the most part you only need to set one of the expressions, usually the true one, but whichever is the simplest logic. If it's not that, and the other one isn't set, then the other state is assumed. The only reason you'd generally do two is if there are states that you don't expect to see and want to treat them as error states, which is assumed if both of the expressions are set but neither comes out true.
Dean Roddey
Explorans limites defectum
Reply
#7
Hi Dean,

Understood.  Many thanks!


.a
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Button Click changes button image? gReatAutomation 6 464 08-05-2019, 03:53 PM
Last Post: Dean Roddey
  SOLVED: VLC dll Issues with CQC Interface Template Viewer gReatAutomation 3 625 06-17-2019, 06:17 AM
Last Post: gReatAutomation
  Missing how to tell CQC to read a Lutron keypad button pressed ghurty 7 1,020 01-08-2019, 09:55 PM
Last Post: Dean Roddey
  Russound V2 Driver - no install button bpaetzold 1 1,108 12-24-2017, 07:13 PM
Last Post: Dean Roddey
  LoadOverlay helper button error dlmorgan999 9 3,444 09-10-2017, 01:22 PM
Last Post: dlmorgan999
  SOLVED -- Save / Reload timing agarden 2 1,570 05-30-2017, 09:31 PM
Last Post: agarden
  SOLVED -- RTSP --> HTTP (NVR on iOS Devices) agarden 5 3,562 05-30-2017, 08:32 PM
Last Post: agarden
  SOLVED -- Web widget / Spotify agarden 4 3,029 05-27-2017, 05:38 PM
Last Post: agarden
  SOLVED: Constantly spinning wheel on top left of iOS clients? agarden 4 2,215 05-03-2017, 08:16 PM
Last Post: agarden
  SOLVED: Media System Config Issue agarden 3 2,645 04-29-2017, 07:25 AM
Last Post: agarden

Forum Jump:


Users browsing this thread: 1 Guest(s)