Tasmota: Switchmode that always switches on

Created on 3 Nov 2018  路  11Comments  路  Source: arendst/Tasmota

Have you look for this feature in other issues and in the wiki?

Yes.

Describe the solution you'd like

A pushbutton-switchmode that turns the relay ON every time a button/sensor is pressed. Together with pulsetime, its very useful for movement-sensors like PIR or radar.

Describe alternatives you've considered

Maybe can be emulated with a complicated and long rule.

question

All 11 comments

maybe that here:
https://github.com/arendst/Sonoff-Tasmota/wiki/Rules#10-simple-staircase-timer

rule1 on switch1#state=1 do backlog power1 on; ruletimer1 600 endon on rules#timer=1 do power1 off endon

This could be a solution, but it seems that the PIR when it switches off (by the internal set time on the screw), then it overrides the state that was set by the rule. How can I supress that?

Look for Switchmode in wiki and state=2 ( toggle)

Are you sure? If I remember right the rule will override any switchmode so it shoudn't switch off.
If not you could try "SwitchMode1 1" in addition to the rule

Hmm, totally confused now :-)
Does this _ruletimer1 600_ mean 600 seconds or only 600 milliseconds or even something else?

RuleTimer1..8 | | Set countdown RuleTimer in seconds (max. 32766 seconds)
-- | -- | --

https://github.com/arendst/Sonoff-Tasmota/wiki/Commands#management

Cool! Seems a right track and you have solved it already.
How have you connected your PIR and set up tasmota rules? Can you share it with us here?
Many thanks!

I have a little different setup. I use a rule to send the PIR state to mqtt. The rest is done by fhem. I was trying to point you in the hopefully right direction. The rule that i posted was from the example and didn't test it by myself.

here is my setup for example: The output from PIR (make sure is 3,3V) is connected directly to a GPIO (eg. GPIO14) and configured as Switch4.
Then:
SwitchMode4 1
rule1 on Switch4#State do publish cmnd/Sonoff_Schlafzimmer/POWER4 %value% endon
rule1 1 (if rule is off)
rule1 6 (if once is on)

I hope you understand that I don't want to run a whole server just for one light outside.

Yes sure. But what about just set the time on the PIR? You was talking about a screw inside the PIR

one more example:
https://groups.google.com/forum/#!topic/sonoffusers/Qjr3k2aukMg

Closing this issue as it has been answered.

Support Information

See Wiki for more information.
See Chat for more user experience.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Vujagig picture Vujagig  路  3Comments

j4k3 picture j4k3  路  3Comments

wirelesssolution picture wirelesssolution  路  3Comments

renne picture renne  路  3Comments

ximonline picture ximonline  路  3Comments