Laundry Monitor

I think how the laundry monitor works is that the sensor is used to detect vibration or whatever which is used to determine when the washer or even the dryer has stopped moving. The quirky trippers from what I’ve read only appear to function as an open/close sensor and can not detect vibration but I do hope I’m wrong and they can hehe!

Well the wife shot me down with this idea. Guess I will have to talk her into something else…

:smiley::neutral_face::worried:

Only open/close no vibration i have two of these on my fish tank cabinet for extra lighting.

Sorry to hear. It was my gateway into my wife’s approval with automating things. No more wash forgotten in the washer. It’s one of her favorite automations I’ve done.

2 Likes

So which device again do you guys use for sensing vibration of your washer and/or dryer?

I’m hoping not everyone is using the $40 ST multisensor linked below…

There must be a cheaper alternative for sensing vibration has stopped on a washer/dryer to then signal clothes are done as that’s, ouch, $80 if not haha.

Next closest alternative I could find (but still slightly pricey) with a tiny bit of extra configuration is this…

So, when your washer/dryer is done, how many notifications do yall get? I spoke with the wife and she is not wanting multiple notifications that it’s done.

Forgot to ask, where do yall have the ST Multi sensor attached to the dryer?

It usually takes some fine tuning, but it also depends on what equipment you’re using.

I have the Aeon energy meter on my washer and set up the laundry monitor app that measures wattage, and after a few tries I have it where if only notifies once when the wash is done, because I figured out the draw from the different cycles.

I think that’s the #1 complaint that people had when using vibration sensors, where there’s a chance that the vibrations will stop in between cycles and trigger a false alarm. With the energy meter that generally doesn’t happen.

1 Like

Agreed.

I use the same approach on my washer (and set up a virtual switch to make sure it doesn’t happen when it shouldn’t).

When my wattage goes at or above 4, it turns on the virtual switch. It then turns it off and sends a notification when it drops below 4. I use Rule Machine and have the virtual switch being on as a condition so it won’t do it any time it polls and sees that meter below 4 W.

1 Like

Thanks guys! @viguera @diehllane

I have been working on a new launy monitor app… I should be releasing it soon. I wanted to see how many people are interested it in.

I use 2 movement sensors and a door sensor. I also create a virtual device that is a washer/dryer combo.

I am leaning towards monitoring the energy consumption of each instead of motion. Seems more reliable?

1 Like

Correct. Monitoring energy is significantly more reliable. You should really only monitor motion if that is your only option for some reason.

1 Like

@bmmiller, do you have a favorite app that you are using with energy monitors or some code you can share?

For hardware, I am leaning towards aeon labs sensors…one heavy duty for the dryer and one older smart switch (the one on the cord) for the washer.

1 Like

Yes, I think it is linked 2 or 3 times in this very thread. Here’s one of them:

Apologies. I should have scrolled up further…thanks for the patience!

Thanks for this work. Really helpful as I’m just getting started. I want to kind of do the inverse of the Laundry Monitor and send a message whenever the power usage goes up over the threshold amount. My son has a video game console in his room and I want to monitor his usage. :smile:

I have some ideas on how I would modify this code, and tried a little. What I produced will give me a one time notice when it goes over the wattage, but I have to turn off the monitor and turn it back on before it works again.

/**
 *  Video Game Monitor
 *
 *  Copyright 2014 Brandon Miller
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 */
 
import groovy.time.* 
 
definition(
    name: "Video Game Monitor",
    namespace: "kcbonsaimatt",
    author: "Matt Haun",
    description: "This application is a modification of the Laundry Monitor by Brandon Miller.  Instead of looking for the Power (Wattage to decrease and tell you the laundry is done, it tells you when the Power (Wattage) draw from an Aeon Smart Energy Meter increases, thus the gaming system has been turned on.",
    category: "Convenience",
    iconUrl: "http://www.vivevita.com/wp-content/uploads/2009/10/recreation_sign_laundry.png",
    iconX2Url: "http://www.vivevita.com/wp-content/uploads/2009/10/recreation_sign_laundry.png")


preferences {
    section("Tell me when this washer/dryer has stopped..."){
        input "sensor1", "capability.powerMeter"
    }
    
    section("Notifications") {
        input "sendPushMessage", "bool", title: "Push Notifications?"
        input "phone", "phone", title: "Send a text message?", required: false      
    }

    section("System Variables"){
        input "minimumWattage", "decimal", title: "Minimum running wattage", required: false, defaultValue: 50
        input "minimumOffTime", "decimal", title: "Minimum amount of below wattage time to trigger off (secs)", required: false, defaultValue: 60
        input "message", "text", title: "Notification message", description: "Game system is on", required: true
    }
    
    section ("Additionally", hidden: hideOptionsSection(), hideable: true) {
        input "switches", "capability.switch", title: "Turn on these switches?", required:false, multiple:true
        input "speech", "capability.speechSynthesis", title:"Speak message via: ", multiple: true, required: false
    }
}

def installed() {
    log.debug "Installed with settings: ${settings}"

    initialize()
}

def updated() {
    log.debug "Updated with settings: ${settings}"

    unsubscribe()
    initialize()
}

def initialize() {
    subscribe(sensor1, "power", powerInputHandler)
}

def powerInputHandler(evt) {
    def latestPower = sensor1.currentValue("power")
    log.trace "Power: ${latestPower}W"
    
    if (!atomicState.isRunning && latestPower > minimumWattage) {
        atomicState.isRunning = true
        atomicState.startedAt = now()
        atomicState.stoppedAt = null
        atomicState.midCycleCheck = null
        log.trace "Game system started."
  //         {
                atomicState.isRunning = true
                atomicState.startedAt = now()  
                log.debug "startedAt: ${atomicState.startedAt}, stoppedAt: ${atomicState.stoppedAt}"                    
                log.info message

                if (phone) {
                    sendSms phone, message
                } else {
                    sendPush message
                }
                
                if (switches) {
                      switches*.on()
                  }               
                if (speech) { 
                    speech.speak(message) 
                }          
  //          }

    } else if (atomicState.isRunning && latestPower < minimumWattage) {
        if (atomicState.midCycleCheck == null)
        {
            atomicState.midCycleCheck = true
            atomicState.midCycleTime = now()
        }
 //       else if (atomicState.midCycleCheck == true)
 //       {
            // Time between first check and now  
 //           if ((now() - atomicState.midCycleTime)/1000 > minimumOffTime)
            
 //       }                 
    }
}

private hideOptionsSection() {
  (phone || switches) ? false : true
}

I appreciate the mention but my name is Brandon, not Brian :wink:

Anyway, can you surround your code in [code][/code] so it is more easily readable? It should be trivial to do what you are asking and I am sure I can provide some guideance.

2 Likes

Oops. Sorry about that Brandon. :smile:

So, what are you looking for it to do? Just notify you on start, or notify you on start AND stop?

I already can tell you that you need to set isRunning back to false at some point to indicate it is off. Otherwise, it thinks it’s running forever which is why you only get one notification. Since it’s a game console, and probably has pretty repeatable minimum wattage, you can eliminate the mid-cycle check since that was more suited for laundry where wattage varies more widely. Inside of that else if code block though, you can do something like this:

} else if (atomicState.isRunning && latestPower < minimumWattage) {
   atomicState.isRunning = false
   atomicState.stoppedAt = now()

   log.trace "Game system stopped."
   log.debug "startedAt: ${atomicState.startedAt}, stoppedAt: ${atomicState.stoppedAt}"

   if (phone) {
      sendSms phone, "Game system is off"
   } else {
      sendPush "Game system is off"
   }
}

If you want to have the message configurable like the first message is from within the app, just add another input after line 36 and call it message2, and then refer to message2 on the push section. A cleaner way to do this would probably be to call a sms/push method instead of doing the same thing twice, so you could clean it up that way if it bothers you.

If you don’t want notifications when it gets turned off, then just use this:

} else if (atomicState.isRunning && latestPower < minimumWattage) {
   atomicState.isRunning = false
}

If you want to keep banging on it yourself with that little hint, obviously, go for it. If you’re stumped, I can whip something up that is a little more complete as well.