Laundry Monitor for washer that does not drop to zero (most of the time)

I am not talking about the meter itself. I am talking about having an option to turn a light on when the cycle ends. I use a virtual switch to notify through Sonos when the laundry is done…

Ah, I see. Yeah, that can be done pretty easily, hold please.

1 Like

Will do, but can’t test until someone is home later today. We’re expecting house guests this weekend though, so there should be plenty of opportunity!

I see what you did with the code, and it looks promising. One thing though… your second phone number notification won’t work as-written because you are calling them both “phone” (i.e., the second # overwrites the first, resulting in two notifications to the second number). See what I did in my modified code.

That functionality is already in my modified code (see the first post).

I noticed that as well, heh, and removed it when adding the switch ability for @SBDOBRESCU

I actually don’t think there would have been multiple notifications, it would have just ignored the first number set, being confusing to users.

Check again now.

1 Like

And here goes my few hours I spent this morning for nothing :slight_smile: Thanks Brandon! And @Mr_Lucky, sorry I didn’t see your app, I wouldn’t have spent time this morning tinkering with Brandon’s app, if I did…oh well…That’s what I love about this community!

As I dug into it deeper, I saw that you are correct. But in your original code that I based mine on, it did result in duplicate notifications to the second number (much to the chagrin of my wife, whose # I had entered). Either that, or I introduced an error when blending the source code from various individuals here. :flushed:

@SBDOBRESCU, welcome to the club that no one want to be a member of - the SOciety of WAsted Time (SO WAT!), of which I am a charter member. And ditto on your comment about this community!

1 Like

Brandon, just wanted to circle back and say thanks. I incorporated your changes into my modified smartapp and it works perfectly with minimumWattage set to 1.5W and minimumOffTime set to 90 secs. I don’t think I would have ever gotten all those nested if/else statements correct on my own! :raised_hand:

1 Like

Glad it worked out for you. Just a small heads up though:

I didn’t have the /1000 in the code I first posted on and added it a few hours later. Which are you using? I ask this because I had assumed the now() subtraction resulted in an answer in seconds, and later read that it might provide a result in milliseconds, thus the /1000. If it’s working for you, which are you using? If you didn’t have the /1000 in there, and it works with milliseconds, the delay would be almost instant, and thus, not effective. If you didn’t have the /1000 in there, and it does work, then maybe my information is bad and is does result in seconds. Am I making sense?

Hmm… I guess I’m using the original:

if (now() - atomicState.midCycleTime > minimumOffTime)

I.e., no /1000, and it was definitely an improvement. :confused:

Finally got a chance to test this, works great! Now I can turn my notifications on for my wife, because she didn’t like the multiple notifications that we were getting…Thank you!

Hey @bmmiller thanks for the app! I needed to make a small modification to work with with our washer, otherwise it would have false notifications when it was first turned on. This adds hysteresis to the wattage threshold.

   section("System Variables") {
    	input "offWattage", "decimal", title: "Off wattage threshold", required: true, defaultValue: 15
    	input "onWattage", "decimal", title: "On wattage threshold", required: true, defaultValue: 75
        input "minimumOffTime", "decimal", title: "Minimum amount of below wattage time to trigger off (secs)", required: true, defaultValue: 60
        input "message", "text", title: "Notification message", description: "Laundry is done!", required: true


   if (!atomicState.isRunning && latestPower > onWattage) {
    	atomicState.isRunning = true
		atomicState.startedAt = now()
        atomicState.stoppedAt = null
        atomicState.midCycleCheck = null
        log.trace "Cycle started."
    } else if (atomicState.isRunning && latestPower < offWattage) {

Not really following why this is necessary but am still curious. Can you describe the situation your washer exhibits that makes this necessary and why manipulation of a single threshold and time don’t allow you to come up with a solution?

Hey @SBDOBRESCU, can you elaborate a bit on how you achieved that with your speakers?

I recently got some Sonos speakers and bought a ST multisensor attached to the washer and am using the Laundry Monitor app but a bit unsure how to use a virtual switch to hook all that up through the speakers so that, in addition to a notification, the speakers will state “Laundry is done” or etc.

I’m curious if that would even work with the speakers as isn’t the ST textToSpeech fn still broken so it would have to be a cached message from somewhere.


Well those are the good ol’ days. When TTS was working and the dogs were barking when the door was opening like in @alex video at CES 2015. Maybe one day soon, @slagle will have good news for us that ST provides that feature again. Until then, you can still accomplish that by other means, none of which I explored but there are a few threads if you search the forum. I know @ule did a lot of work around it. Maybe others can chime in. Sorry if this is not what you wanted to hear…

Update: just read @bravenel’s post. I didn’t check it out yet, but that might be something to look into…

Ahhh I gotcha so it’s not working at the moment with your Sonos because TTS isn’t working anymore (or to be more precise the ST textToSpeech fn is throwing an UndeclaredThrowableException). I think @slagle mentioned somewhere in a thread they now have a TTS engineer working on this so hopefully within a few months there will be some progress made.

I’ve been following a bunch of the threads related to alternatives but not great results from any of them because most if not all are still attempting to use that broken textToSpeech fn. I now @ule took the approach of using other sources for the conversion of text to mp3 file such as google but I haven’t taken that route yet. There is also Big Talker by @rayzurbock (which is the most sophisticated and flexible) and even several alterations to the original “Sonos Notify with Sound” app that I’m currently using because of there selection of already cached sound files such as lightsaber, dogs barking, etc, however those urls can be easily ported into any app I suppose to make it custom.

I have provided all the links below to the ones I’ve been following if it helps out!

Big Talker by @rayzurbock

Media Renderer by @ule

Sonos Notify with Sound Modification by @cuboy29

Sonos Miscellaneous

1 Like

So back to your original question, my set up was as follows:

When the washer cycle stopped, I would turn on a virtual switch, which was picked up by the ‘Notify with Sound’ app to play the message. Then, I had an app that would toggle that same switch everytime the kitchen pantry door was opened, which triggered the message as reminders that laundry is done. To cancel the reminders, I used the big switch to turn off the virtual switch when the laundry room switch was turned off. It was working very well for us with high WAF.

Hello everyone!

TTS is working again! In the laundry app, I don’t see any of my speech device. I guess I will have to go with the virtual switch route also!


Can I use a Aeon Labs DSC06106-ZWUS - Z-Wave Smart Energy Switch, set up with SmartRules to tell me when my washing machine is done? (blink some lights, maybe a message over my Sonos)

I have absolutely no coding knowledge, so that’s why I’m looking at the SmartRules option. I’ve got that spare Aeon energy switch so I would prefer to use that compared to the multi sensor vibration option that I see is available.

Thanks, Murray

Is there a latest version to this code?