Tasmota & momentary switch, I'm looking for the right switch mode that allows me to recognise SINGLE press, DOUBLE press and HOLD

34 views
Skip to first unread message

Adex1

unread,
Apr 17, 2023, 12:38:56 PM4/17/23
to TasmotaUsers

Hi everyone,

I'm new to TASMOTA and its console but I am looking to use the momentary switch I've connected to my SONOFF MINIR2 to recognise the single press, double press and HOLD so that I can add a rule that perform something once these are recognised. With switchmode set to 5 and SetOption32 to 4s I am able to recognise a TOGGLE and a HOLD, however I'd like to use my switch like if it was a button.

Any help would be really appreciated!

Regards

Philip Knowles

unread,
Apr 17, 2023, 2:49:13 PM4/17/23
to Adex1, TasmotaUsers
A momentary switch is a button not a switch


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Adex1 <porca...@gmail.com>
Sent: Monday, April 17, 2023 5:38:56 PM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Tasmota & momentary switch, I'm looking for the right switch mode that allows me to recognise SINGLE press, DOUBLE press and HOLD
 
--
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/e7642e96-730c-4d0a-86c7-3a517ba03aa8n%40googlegroups.com.

Philip Knowles

unread,
Apr 17, 2023, 2:49:34 PM4/17/23
to Adex1, TasmotaUsers
A momentary switch is a button not a switch


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Adex1 <porca...@gmail.com>
Sent: Monday, April 17, 2023 5:38:56 PM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Tasmota & momentary switch, I'm looking for the right switch mode that allows me to recognise SINGLE press, DOUBLE press and HOLD
 

Hi everyone,

--
Message has been deleted

Adex1

unread,
Apr 17, 2023, 3:26:57 PM4/17/23
to TasmotaUsers
In my template is showing as switch, but if I change it to button_in I don't see any action being logged when press while so73 is on

Philip Knowles

unread,
Apr 17, 2023, 3:37:20 PM4/17/23
to Adex1, TasmotaUsers

Please read this page

Buttons and Switches - Tasmota

 

Unless you say precisely what you want to achieve there are way too many options to guess what you want to do.

 

Sent from Mail for Windows

 

From: Adex1
Sent: 17 April 2023 20:27
To: TasmotaUsers
Subject: Re: Tasmota & momentary switch, I'm looking for the right switch mode that allows me to recognise SINGLE press, DOUBLE press and HOLD

 

In my template is showing as switch, but if I change it to button_in I don't see any action being logged when press while so73 is on

Il giorno lunedì 17 aprile 2023 alle 19:49:34 UTC+1 knowles...@gmail.com ha scritto:

A momentary switch is a button not a switch

 

From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Adex1 <porca...@gmail.com>
Sent: Monday, April 17, 2023 5:38:56 PM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Tasmota & momentary switch, I'm looking for the right switch mode that allows me to recognise SINGLE press, DOUBLE press and HOLD

 

Hi everyone,

I'm new to TASMOTA and its console but I am looking to use the momentary switch I've connected to my SONOFF MINIR2 to recognise the single press, double press and HOLD so that I can add a rule that perform something once these are recognised. With switchmode set to 5 and SetOption32 to 4s I am able to recognise a TOGGLE and a HOLD, however I'd like to use my switch like if it was a button.

Any help would be really appreciated!

Regards

--

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/e7642e96-730c-4d0a-86c7-3a517ba03aa8n%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.

Adex1

unread,
Apr 17, 2023, 4:03:45 PM4/17/23
to TasmotaUsers
Hi,
I've read all of that, this is why I am looking for help here. 
What I'd like to accomplish as explained in my first thread is to be able to have Tasmota recognise a single press, double press and the HOLD for the external switch I've connected to it.
If in my template I keep the switch as switch, when using SetOption114 I am able to see the log showing the TOGGLE, but when I set the switch as button_in in my template and then press it, no action is shown when SetOption73 is on. 
Once I will be able to see what state is returned for single, press and hold I will then create one rule for each state

Regards

Philip Knowles

unread,
Apr 18, 2023, 12:51:26 AM4/18/23
to Adex1, TasmotaUsers
The problem is that you have set so many things that it's impossible for us to know what you've done.
Get the device to do the basic thing that you want to do first - switch on and off.
Reset the device and set the relay as Relay 1 and your button as Button1. That will now switch the Relay on when you press the button and switch it off when you press it again.
Then look in console to see what happens when you double press and hold.
Sent: Monday, April 17, 2023 9:03:45 PM
To: TasmotaUsers <sonof...@googlegroups.com>

Philip Knowles

unread,
Apr 19, 2023, 1:32:34 AM4/19/23
to Adex1, TasmotaUsers
What have you got physically connected to the device? You have a Switch1 and a Relay1 both trying to control the Relay.
Sent: Monday, April 17, 2023 7:55:59 PM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Tasmota & momentary switch, I'm looking for the right switch mode that allows me to recognise SINGLE press, DOUBLE press and HOLD
 
This is how my template looks like right now

Il giorno lunedì 17 aprile 2023 alle 19:49:34 UTC+1 knowles...@gmail.com ha scritto:
Reply all
Reply to author
Forward
0 new messages