Timers to start based on voltage/current/active power

31 views
Skip to first unread message

Dao Xiang

unread,
Oct 16, 2022, 1:33:51 PM10/16/22
to TasmotaUsers
Hi all, my first post. I'm a noob however I managed to setup my home with home bridge. (after lots of hair pulling and struggling) now I have a problem. I have about 8-9 people using the washing machine everyday. So in order to restrict the use, I set the washing machine to turn on everyday at 2200hrs using a sonoff POW R2. and turn off at 2230hrs. (basis using the quick setting) However, some of them may be coming back at 2215hrs and therefore at 2230hrs they washed their clothes and 2230hrs the clothes are half washed. I read about the tasmota rules. Is it possible to add a rule such that when the washing machine powers up at idle, Voltage at 240v, current at 0.092A and active power 4W and when the was cycle starts (I have yet to see what is the values) the timer will kick in and automatically stops after 32 mins and powers off? My first post so its kinda nagging.

Philip Knowles

unread,
Oct 16, 2022, 2:50:31 PM10/16/22
to Dao Xiang, TasmotaUsers

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.

 

Dao Xiang

unread,
Oct 21, 2022, 12:30:12 AM10/21/22
to TasmotaUsers
thanks for the reply. I will be testing it these two days
just managed to put into the console.

Dao Xiang

unread,
Oct 28, 2022, 1:12:56 AM10/28/22
to TasmotaUsers
Hi I tested it. it works but only for once.the following day, the washing machine was powered on whole night. 
I have set the option to switch the washing machine on in HomeKit when the user openes the door between 2200hrs to 2359hrs. 
So between these times, they will use the machine for once. 
I hope to amend the rules such that during 2200hrs and 2359hrs, if the washing machine is switched on, there after they operate the washing machine. and after 35mins it shuts down. (the washing cycle is 30 mins.) give and take 35 to 40 mins max to shut down. and to be repeated everyday. 
How do I clear the current rules?

Philip Knowles

unread,
Oct 28, 2022, 2:05:12 AM10/28/22
to Dao Xiang, TasmotaUsers
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


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Dao Xiang <1haoy...@gmail.com>
Sent: Friday, October 28, 2022 6:12:56 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Timers to start based on voltage/current/active power
 

Dao Xiang

unread,
Oct 28, 2022, 4:56:02 AM10/28/22
to Philip Knowles, TasmotaUsers
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:



Philip Knowles

unread,
Oct 28, 2022, 6:47:52 AM10/28/22
to Dao Xiang, TasmotaUsers

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

 

Reply all
Reply to author
Forward
0 new messages