'Laundry is complete' notification

No, but one difference I can think of is that I made mine in Rule 4.0, whereas if you're making a new one today you'd be in Rule 4.1. There aren't supposed to be any changes besides "Wait for condition" being removed and replaced with "Wait for conditions," but we're not using either here, and I'm not aware of anything else... :thinking:

I could try re-creating mine in 4.1 to see if some behavior changed. I definitely can't think of any theoretical reason why the rule wouldn't work since it is written consistent with the (albeit poorly) documented behavior of "Wait...," but I suppose using a "Cancel Delayed Actions" plus a cancelable delay instead of the "Wait for event: elapsed time" would help if it's that particular part that's causing a problem here. But I can't really tell from the logs.

1 Like

ya just checked mine is in 4.1.. the fact that the wait code was touched at all may indicate something.

Hmm, so probably not a 4.0 vs. 4.1 difference, then (not too surprising, but it's all I could think of). I recall that we're both using a ZEN15 for this, so it's possible there's something about the way other drivers report these values (e.g., if they're not a numeric type on at least some occasions or may otherwise fail to match the trigger for some reason, even when they should?), but it looks like @ogiewon also tried something that would have addressed that, so I really don't know.

I suppose adding a "manual" log action to spit out the evaluation (true/false) of an evaluation, which you'd probably have to assign to a boolean variable to access in this way, like "plug power >= 4.0" or "plug power < 2.0," might at least provide some clues as to what may or may not be matching--not that it would illuminate much other than that.

Well, I recreated the rule, and it now works correctly. I am guessing that the rule was cloned and that process may have caused the strange behavior.

It has been running for 20 minutes with no false alarms.

and here successfully announced the cycle as being complete.

3 Likes

Hi guys, I thought I would further improve this notification by adding a contact sensor to the washer -- pester me until someone takes the laundry out and acknowledge when it's been taken out.

However, I am struggling to implement it -- almost certainly due to my poor rule-writing skills. I can get both rules to send me the reminders every 5 min, but I cannot get the 'Laundry was taken out' bit to work.

Could someone help pretty please..?

@bertabcd1234's rule:

@ogiewon's rule:

1 Like

Close! The biggest problem is that your actions will get stuck in that repeat with no way to get out. You need to have some way to stop the notification that is "accessible" from within your repeat. I often refer people to this post, which has several examples of how to do exactly this, for good information:

But none of those apply 100% to your situation since you're waiting for an event and not a condition. If you normally leave the door open when the machine isn't in use (or trust yourself to have it open for more than 5 minutes--in the example above, or whatever your repeat interval is in general), then one of those examples should work. However, if you truly want to just wait for the event, I'm thinking you'll have to try something like this instead, which would replace all of your actions starting with the "Repeat every..." line and continuing to the end of your rule in my example or almost the same in the other rule except you'd need to keep that END-IF. This assumes the existence of a local (or global) boolean variable called "doorOpen," which you'd also have to create. Also, set it to false at some point early in your rule actions, e.g., when the machine starts:

IF (NOT doorOpen is true) Repeat every 0:05:00 (stopable)
  Cancel Wait* (see note)
  Set doorOpen to false
  Notify: "Take the laundry out!"
  Wait for event: CS - Washer open
  Set doorOpen to true
END-REP
Notify: "Laundry was taken out."

However, I just checked and "Cancel Wait" seems to have been removed in Rule 4.1, or at least I can no longer find it (but can in 4.0). This is somewhat understandable, as the action was often overused in the past: any trigger event firing will cancel a wait. But we aren't triggering here, just repeating, which I don't believe will cancel this wait--but it should be of minimal importance anyway since it's just getting recreated shortly afterwards, anyway (I'm just not sure how it will handle the edge case of you opening the door right when the repeat starts over but before it really gets to this action--likely just a split second).

Or, if you don't really need the event, a condition (as in the examples) would work, too, with a bit less work. :slight_smile:

1 Like

Thanks so much @bertabcd1234! Brilliant stuff. The bit that I was missing is my (mis-)understanding about the sequence of how the rule is being 'loaded' / read. Basically it won't move on from the repeat loop until the loop itself provides a way of getting out of it.

I have now tweaked my rule as following, but will probably test it tomorrow (when there is more laundry to do...). Today with me trying to fix this rule, this was probably the first time that my wife thought this 'geeky pointless time-wasting smart-homing' was actually productive -- I cleared the laundry basket in no time! :slight_smile:

EDIT: I guess I don’t need that first ‘set to false’ line in the repeat loop as the Boolean is already false given it passed the if statement condition.

That looks good to me! (With the one change you could make being the one you just mentioned.) I should warn that it's completely un-tested by me, but I think it should work... :slight_smile:

2 Likes

So I've made a couple of further tweaks to the rule:

  1. Added a condition that skips the first repeat notification, inspired by the post that you linked @bertabcd1234. So now I have two different messages for when the laundry is done initially and then reminder 5min after (rather than 2x messages about laundry done + reminder to take out).

  2. Moved the final notification inside the repeat loop, at the end. When it was at the end but outside the loop, I would have to wait 5min for the new repetition to kick in, skip the loop due to the positive DoorOpen boolean, and only then get to the final message. Now, I think it should ping me a notification the moment I open the washer door without the 5min delay.

This rule writing is very addictive. :slight_smile:

Thanks again!

More than one notification on stuff like this has very low waf in our house.

Hi all, I haven't been on the forum for a while now -- after my initial Hubitat setup I just let it run without any issues -- what a joy!

However, recently my 'washer is done' rule broke -- I've tried tweaking different things, re-write the rule in the latest Rule Machine 5.1, etc. but nothing seems to be working. It breaks after I open the washer's door -- before you ask, the contact sensor works as expected correctly reporting open/closed door. Below is my rule and the log -- what am I missing?? What does this error mean?

Also note, that the trigger value has been lowered for testing purposes -- so that it's triggered only when the power is on. Normally, it is set at 30.

Any pointers would be much appreciated -- TIA!

I can't see anything that stands out as wrong there, though technically you don't need the "stoppable" flag set on that Repeat (it will stop whenever the simple condition you have attached to it is no longer true--and there's nowhere that you explicitly stop it, anyway). It looks like that's about where it's crashing, so it can't hurt to try, but I don't know why it would be the problem...

Thanks a lot! I will remove it and test it again, but as you say, I don't believe it should impact the rule... Looking at my log, do you know what that top error might mean? It feels like this is the cause for error...

That kind of error is hard for the community to troubleshoot--the "line 7542" thing refers to the Rule Machine code (which we can't see), not your Rule itself, and nothing in your Rule looks off to me (which might otherwise cause something like this--maybe a blank value where it's expecting a number?). The fact that you've re-created it means, at least, that it's unlikely to have been a fluke with your old Rule, but since everything looks OK in your actions, I'm not sure what else to suggest there...

1 Like

This works great, thank you. We put our wash in at night, before bed, to save on electricity costs. Is there a way to NOT notify me during say 9:30-7:00AM, but then after 7AM, it sends out notification, that the wash is done?

Add a "Wait for rule: time between 7:00 AM and 9:30 PM" before your notification action, maybe? This assumes you would still care to get notified if happened possibly a long time ago or have already addressed the laundry since then, but it would work for the specific question at hand. :slight_smile:

This is what I have so far, but don't know how or where to add your suggestion.

You do not need the IF THEN... as your first action--that will prevent anything at all from happening outside this timeframe. You still need it to "see" that the laundry was done. Just get rid of that, then move your "Wait for rule: time between..." action to be immediately before the "Speak..." action, and that should do it.

1 Like

Ok, this did not work.

It gave name this error

1 Like