Well you could use hold in a rule to do the Inc/Dec or you could set the button as a switch and use switchmode0 to change its function to a button.
Regards
Phil K
Sent from Mail for Windows 10
From: Angus Parkinson
Sent: 26 May 2021 08:15
To: TasmotaUsers
Subject: Re: Dimmer control using button not switch
Yeah, I understand that but swicthmode 11 add's some extra states that buttons just don't have and these states are important when controlling dimmers. Ie When pressing the switch (closing the circuit) for a long time (set in SetOption32), Tasmota will send repeated INC_DEC (increment or decrement the dimmer) commands for as long as the button is pressed (use Switch<x>#state=4 in rules).
If I could get the long press of a button to send repeated INC_DEC I would be in business however only generates a hold.
Thanks, Angus
On Wednesday, May 26, 2021 at 4:57:21 PM UTC+10 knowles..@gmail.com wrote:
You don't need switchmode for buttons because they already do that
Button state 12 for 2 presses etc. Look at the Buttons section of the Buttons and Switches page
Regards
Phil K
From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Angus Parkinson <ang...@gmail.com>
Sent: Wednesday, May 26, 2021 7:38:08 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Dimmer control using button not switch
I have a few shelly dimmer 2 's .
I have implemented a couple using the stock firmware using a single momentary switch and that works great. However
The dimmer replaced a sonoff mini that was running tasmota and I was making use of the single, double, triple, and quad press to trigger other actions.
So I thought easy I will flash the dimmer with Tasmota and I get these button actions back again.
The problem is there's no Switchmode 11 for buttons in tasmota. Is that something that could be implemented?
Thanks
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/8f589a1b-283d-4471-83f9-3f4cc775cdc7n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/8ea03893-bf82-4af0-871b-5432479fbf26n%40googlegroups.com.
I'll have a think later (but you shouldn't use mem) but first thoughts if you set var1 to 5 then, if it's just a normal button you'll get on and off with a short press and hold (or 3) with a long press. You can use that to add var1 to the current brightness until it hits 100. You can then use that to set var1 to -5 until it hits the minimum brightness when you change it back to 5 again.
Need to get it to keep cycling maybe a 1 second RuleTimer could do that?