Need Simple Script-30 min from use?

Posted on
Wed Dec 31, 2014 2:23 pm
thomasw offline
Posts: 129
Joined: Feb 13, 2011

Need Simple Script-30 min from use?

Hi All,
Following a legacy post on here about sensing when a washer was done, I bought an Solo iMeter and plugged my washing machine into it. I then set up the trigger for current draw when it goes below 000.050, to activate an X-10 plug in chime in another part of the house, so I know when the washer is done. This works, but the problem is that this trigger goes off about every 3 hours or so, even though the washer hasn't been on? This makes no sense, because the washer current draw is 000.000 when it is off? I tried putting an addition condition in the trigger itself, to be only within 30 min of when the current draw was over 000.500, but there isn't a way to add that condition. So, I was wondering if I could put in the condition that a script would have to return that within the last 30 min the current has been over 000.500? There is a space at the bottom of the condition section for a script to return "true". But I don't know how to write a script to do that. Can anybody help me write this simple script?
Attachments
Picture 69.png
Picture 69.png (52.24 KiB) Viewed 2289 times
Picture 70.png
Picture 70.png (53.32 KiB) Viewed 2289 times
Picture 71.png
Picture 71.png (40.58 KiB) Viewed 2289 times

Posted on
Wed Dec 31, 2014 2:54 pm
autolog offline
Posts: 3008
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT+1]

Re: Need Simple Script-30 min from use?

I think you can do what you want with two triggers and a variable. :)

Setup a variable named "within30minutes" (or whatever you want to call it) and set it to a value of 'false' (no quotes).

Then, setup a new trigger that fires when the load goes over 000.500 that has two actions: the first will set the variable to 'true' and the second will set it to 'false'. The second one should have a delay of 30 minutes and the 'override previous delay' box should be ticked.

Now in your existing trigger, you add in additional check for the variable being 'true' (i.e. within 30 minutes). If it is 'false' then you know it was longer than 30 minutes ago.

I am not sure why your meter is showing a load when nothing is plugged in unless it is something to do with the meter itself - I won't try to address that issue :wink:

Hope this helps :)

Posted on
Wed Dec 31, 2014 3:00 pm
kw123 offline
User avatar
Posts: 6650
Joined: May 12, 2013
Location: Dallas, TX

Re: Need Simple Script-30 min from use?

I would do the following:
1. Trigger A ; triggers "if watts > 500 (washing machine on)" ; action 1: " enable Trigger B"
2. Trigger B : triggers " if watts < 1 (washing machine off)" ; action 1 : "whatever you like to do"; action :" disable trigger B" ### will fire only once, will be only reenabled if washing machine starts again.

no scripting

Karl

Posted on
Wed Dec 31, 2014 3:09 pm
autolog offline
Posts: 3008
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT+1]

Re: Need Simple Script-30 min from use?

Hi Karl,
An elegant solution :D

Posted on
Wed Dec 31, 2014 4:55 pm
kw123 offline
User avatar
Posts: 6650
Joined: May 12, 2013
Location: Dallas, TX

Re: Need Simple Script-30 min from use?

I guess we typed the solutions at the same time.. there are always 20 ways to skin the cat.. ;-)

Posted on
Thu Jan 01, 2015 4:13 am
thomasw offline
Posts: 129
Joined: Feb 13, 2011

Re: Need Simple Script-30 min from use?

Thanks for the replies guys.
karl, how do you do this?
..........action :" disable trigger B" ### will fire only once, will be only reenabled if washing machine starts again..........
I couldn't find any way to tell the trigger to disable anything?
I'm going to try what Autolog suggested to see if that will work. I'll post back when I have tried that.

Posted on
Thu Jan 01, 2015 5:14 am
autolog offline
Posts: 3008
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT+1]

Re: Need Simple Script-30 min from use?

Answering for Karl,
In the Trigger Actions tab, select Server Actions > Enable/Disable Actions > Enable Trigger or Disable Trigger :)

Posted on
Thu Jan 01, 2015 2:10 pm
kw123 offline
User avatar
Posts: 6650
Joined: May 12, 2013
Location: Dallas, TX

Re: Need Simple Script-30 min from use?

Autolog, thanks for the quick reply.. here the whole sequence in screenshots:

Here the screenshot to enable/disable a trigger:
Screen Shot 2015-01-01 at 1.35.11 PM.png
Screen Shot 2015-01-01 at 1.35.11 PM.png (104.1 KiB) Viewed 2177 times



specifically for your scenario:
first you need to setup trigger B (as B is referenced in A it has to exist before you can reference it)
trigger B setup:
Screen Shot 2015-01-01 at 1.40.42 PM.png
Screen Shot 2015-01-01 at 1.40.42 PM.png (28.61 KiB) Viewed 2177 times

trigger B actions:
Screen Shot 2015-01-01 at 1.40.34 PM.png
Screen Shot 2015-01-01 at 1.40.34 PM.png (17.38 KiB) Viewed 2177 times



Then set up trigger A:
trigger A setup:
Screen Shot 2015-01-01 at 2.05.09 PM.png
Screen Shot 2015-01-01 at 2.05.09 PM.png (28.89 KiB) Viewed 2177 times

trigger A action:
Screen Shot 2015-01-01 at 1.41.28 PM.png
Screen Shot 2015-01-01 at 1.41.28 PM.png (26.26 KiB) Viewed 2177 times



Karl

Posted on
Sun Jan 04, 2015 11:22 pm
thomasw offline
Posts: 129
Joined: Feb 13, 2011

Re: Need Simple Script-30 min from use?

Thanks Karl,
That did it perfectly. Now it works great. When the imeter solo detects current use above 12.000 watts, the Trigger A enables Trigger B. Then, when the washer is done the imeter solo detects equal to 0.000 and Trigger B sends the Indigo command to sound the X-10 chime in the other part of the house. Then Trigger B is disabled.
This solution works great. Thanks again to Karl and Jon for the replies and help! - Solved
-Tom

Posted on
Sun Nov 20, 2016 7:10 am
immergruen offline
Posts: 17
Joined: Jan 31, 2016

Re: Need Simple Script-30 min from use?

Hi,

thank you for the nice howto but cannot make it work.
I´ve done everything but I receive a huge amount of mails, that the washing machine is ready.
It looks like the timer starts different times an does not reset.

I hope someone can give me some tipps to make it work.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest