Jump to content
C4 Forums | Control4

Release Custom Buttons


Recommended Posts

Excuse me if this is very obvious, but it isn't for me.

 

In composer it allows for a command to be issued form both the press and release of a custom button. When you press, don't you always eventually release the button as well?. what does release mean?

Link to comment
Share on other sites


I’m not convinced that it is very useful for custom buttons (never tested to see how reliable pressing and holding is on a touchscreen) but I use this quite a bit on physical buttons (and one could theoretically do the same on custom buttons).  My use case is to start a 3 second timer on press, stop it on hold and only activate the code when the timer expires.  

This can be used to give the button extra functionality or to stop inadvertent presses doing something you don’t want (e.g, setting off a panic signal).

Link to comment
Share on other sites

Press and release can be useful for doing things such as ramping volume. You can program it to start ramping up the volume when button pressed and then stop ramping up when button released. This gives you press and hold functionality rather than having to repeatedly hit the same button to raise the volume by several increments.

Link to comment
Share on other sites

The other thing it could be used for other than stopping loops or executing is for UI reasons like changing the color of a button back to what it was or to the target color etc. Single tap executes on the release since it's defined as a press followed by a release. If you want something to be processed as fast as possible for example you would use on press so that it doesn't have to wait for the subsequent release to execute.

Link to comment
Share on other sites

I have actually used this in a private cinema to control adjustable (motorized) seats easily from their iPad.

Two custom buttons - Up/Down.

Up pressed → close Up relay → start moving; Up released → open Up relay → stop moving and so on.

In their second cinema years later I used the 2 Relay Blind (OS2.9+) driver with Use Levels enabled so they can now set the seat position with 0-100% sliders without having to press & hold buttons. (The downside is that the controls are hidden under Shades.)

Link to comment
Share on other sites

On 6/8/2019 at 12:04 AM, South Africa C4 user said:

never tested to see how reliable pressing and holding is on a touchscreen

Works quite well actually, though it'll be device dependent as well of course.

 

In basic terms, Lukas' example is probably the best.

In general terms, prees and release are used to START something on press, then STOP that same thing upon release. Basic examples are aplenty above.

Another options it to indeed make something require a 'press and hold for x seconds' setup.

Example:

Timer is 2 seconds not repeating

WHEN button is pressed
START timer

WHEN button is released
IF timer IS NOT running
	Execute scene ALL LIGHTS OFF

This would be used to ensure you have to press and hold a button for 2 seconds to shut off all the lights (preventing accidental shut-offs)

Link to comment
Share on other sites

Thank you everybody

I have found all the examples very useful.

As a further query, as I don’t have physical buttons (ie Control 4 over CBus) and hence all my switching control has to be performed by the dealer, are there any ideas or examples on how I could replicate  the press and release capability on my current switches. Ie using Light State or other variable. Trust I’ve explained that clearly enough.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.