Feature request: Remember push button state (toggle mode) #72

Closed
opened 2017-10-28 14:27:08 +01:00 by kelexel · 1 comment
kelexel commented 2017-10-28 14:27:08 +01:00 (Migrated from github.com)

Hello
I am very pleased with the OctoPrint-Enclosure plugin, it's perfect for my humble needs !!

Except, I have this fancy little button, that I want to trigger LEDs on/off via a relay...
The relay and button are setup properly: right now, if I push the button, the LEDs turn on.
But I would also like it to be able to turn LEDs relay OFF when re-pushed...

This means, the ability to add a "mode" to the button, where, current behaviour could be named "one-shot", and the one I am looking for "toggle".

In "toggle" mode, the button would store it's current state somewhere (db ? file ?) so that once re-pressed, the plugin would know to revert to the previous state for the affected output (in my case, if LEDS where ON, turn them OFF).

I don't think this feature exists -yet-?
If not, how doable would that be?

Many thanks for the great work!!

Cheers.

Hello I am very pleased with the OctoPrint-Enclosure plugin, it's perfect for my humble needs !! Except, I have this fancy little button, that I want to trigger LEDs on/off via a relay... The relay and button are setup properly: right now, if I push the button, the LEDs turn on. But I would also like it to be able to turn LEDs relay OFF when re-pushed... This means, the ability to add a "mode" to the button, where, current behaviour could be named "one-shot", and the one I am looking for "toggle". In "toggle" mode, the button would store it's current state *somewhere* (db ? file ?) so that once re-pressed, the plugin would know to revert to the previous state for the affected output (in my case, if LEDS where ON, turn them OFF). I don't think this feature exists -yet-? If not, how doable would that be? Many thanks for the great work!! Cheers.
vitormhenrique commented 2017-12-18 22:53:42 +00:00 (Migrated from github.com)

Hello,

I'm sorry for the delay on the response. This month was really busy.

There is a toggle mode for GPIO. Did you try to use that? it should do exactly what you want.

Hello, I'm sorry for the delay on the response. This month was really busy. There is a toggle mode for GPIO. Did you try to use that? it should do exactly what you want.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/OctoPrint-Enclosure#72