Button widget as push/release button

Button widget now works as a switch. Can it be there possibility to have just push/release function? Like when I hold button on dashboard - it send gpis to high, when I release it - goes low…

Thank you in advance for taking the time to let us know about your Ideas. We truly value your input and discuss each Suggestion as a team. It would be most helpful if you could include a use case for your Idea (how it will solve a problem, or add to the usefulness of Cayenne as a proto-typing solution). Thanks!

I think it might be challenging to do with Cayenne, at least with the web dashboard, but I can see it as being useful.

I’m in real need of a momentary contact widget. Real need-

Garage door OPEN- about 100mS
Garage door CLOSED- about 100mS

Yup, the garage door controller needs momentary contacts, but more important to me-
Generator START- about 800mS
Generator STOP- about 3 seconds

I gotta have widget momentary pushbuttons, or at least a remote fired 1-shot. It’s critical.

hi, one solution I found:

  • create switch
  • activate trigger: when “switch” os ON, then switch OFF
    trigger/system need some time to perform so for me it works fine: click on switch icon is like push button

Glad you found a solution!

We are coming out with a timer function that would allow you to set the amount of time that an actuator stays on, and then when to turn off. This is coming soon too!

-B

Hi!!

Any idea on the timeline for this pushbutton function?

You can code in the button to turn off after a certain amount of time w/out having to hold it down. I had this setup for a while until a few weeks ago the switch started staying on. Not sure why. I’m using virtual pins, so I guess something on cayenne’s side changed.

1 Like

Hi, If the trigger that turn Off the button is done before you release the button it means the button don’t receive the turn off order.

I realy need a push button that turn Off it self when we release the button on the dashboard. because the output must stay as long as I push, it’s not always the same elapse time.

I don’t understand why the technician of cayenne didn’t create this push release button… I found 50 topic on this in the cayenne community.

it’s a general need for lot of people.

It doesn’t look very hard to create in HTML or PHP. But it looks very hard for must of us to get enjoy without it little button…

I wich you will do your best for us as always. :wink:

best regards.

Hey, I too would like this feature.
Maybe its something to do with the MQTT protocol?
Anyway, Im not waiting , im going to just code a timed toggle-back on my pin in my sketch::
IF buttonstate changes, wait for n millis to pass and change the buttonstate back right?
so your relay or whatever you are controlling will be flipped back off by your sketch.

p

you will also need to send the button state back to cayenne dashboard after n millis.

How do you send the state back after a function call?
Is it like this example:
CAYENNE_IN(1){
doMyFunction();
Cayenne.virtualWrite(1,0); //SET THE STATE BACK TO 0 from 1
}

you cannot update the button state from the device.

I have tried to do this with the trigger function but it doesn’t.
Each time I push the virtual button it toggles. I also receiver 8 actions each time.

that is because you are sending trigger data again and again. have a look at this post and see how to send data only once. Sending MQTT messages within notification limit