I think this might do it
rule1 on power1#state=1 do backlog var1 1; delay 100; var1 0 endon on rules#timer1=1 do power1 0 endon
rule2 on energy#power>10 do add1 1 endon
rule3 on var1#state=1 do ruletimer1 2100 endon
rule1 1
rule2 1
rule3 1
The first part of the first rule sets var1 to 1 when the relay turns on at 2200 which starts a 35 minute timer in rule3. Var1 is then reset to 0 to allow a reset of the timer if the washer is used. The second part turns the relay off after the timer expires.
The second rule restarts the timer if the washer is used (current goes over 10W) as var1 goes to 1. As it adds 1 to var1 each time the power goes over 10W it only triggers the first time it goes over 10W.
The theory is that the relay comes on at 2200 and, if no one uses the washer, the relay will then switch off at 2235. If someone uses the washer at any point up to 2235 the relay will remain on for 35 minutes then switch off. There are simpler ways of doing it but you’ll need to know the cycle times quite well.
Sent from Mail for Windows
--
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/4fd5d2a8-a5f5-4ac2-a52b-43999edc47bdn%40googlegroups.com.
On 28 Oct 2022, at 14:05, Philip Knowles <knowles...@gmail.com> wrote:
Sorry typo and vagaries of the way Tasmota does arithmetic but this will definitely work
rule1 on power1#state=1 do backlog var1 1.000; delay 100; var1 0 endon on rules#timer=1 do power1 0 endon
rule2 on energy#power>10 do add1 1 endon
rule3 on var1#state=1.000 do ruletimer1 2100 endon
Sent from Mail for Windows
From: Dao Xiang
Sent: 28 October 2022 09:55
To: Philip Knowles
Cc: TasmotaUsers
Subject: Re: Timers to start based on voltage/current/active power
Yes it was used the first night and 2nd night onwards not used. I check the values and revert to you
With best regards,
On 28 Oct 2022, at 14:05, Philip Knowles <knowles...@gmail.com> wrote:
It may be that the issue is the standby Wattage of the machine. I tried to pick a value that the machine would frequently fall below during the cycle - mine goes down to 4W. If it doesn't fall below 10W it won't work properly. Was it used the first night and not the second?
Rule1 "" will clear the rule