Washer and Dryer is done - Need help defining a new condition where washer is done and is waiting for dryer to finish


#1

1) Give a description of the problem
I have a great Piston that was developed with the help of others before me that lets me know when a. the washer is done OR b. the dryer is done, but I want to take it a step further and have a third condition where the washer is done but is waiting for the dryer to finish and vice-versa because you can only change the laundry when both are done.

2) What is the expected behavior?
Add two more conditions where an SMS will be sent when the washer is complete but not the dryer stating such and vice-versa. Such as “the washer is done but you need to wait until the dryer is done to change the laundry”

3) What is happening/not happening?
N/A

**4) Post a Green Snapshot of the piston!


#2

Well, first question is, would you still want to receive the texts you already have set up? Because you would have to remove the architecture for the independent SMS messages before implementing anything else, otherwise you are going to get two.
Second, what are you actually looking for here? What is the total list of situations you want to check for and the action you want to take for each? How many scenarios are we talking about? Because if the dryer finishes second and the washer was already finished, you would have to dictate how long ago the washer had to be active. I would start out by listing, on paper, all of your conditions and responses you want because it’s not clear to me how many scenarios you’re really dealing with.

IMHO…what you have is fine. Do you really need ST to tell you the washer is still running? You started it…ST hasn’t told you it’s done…so it must be running. Right?


#3

Yeah, you’ve already got everything you need in the piston information wise.

So in the THEN part which sends your SMS message (line 33), just add an IF block in there which looks like this for the Washer.

IF DryerIsRunning is true
then
Send the message which says the washer is done but the dryer is still running.
else
Send the message which says that both of them are done.

Then just duplicate and modify what you’ve got there and move it to the Dryer section where you’ll check for the WasherIsRunning variable.


#4

Basically what I dont want is the scenario where the washer is done first but the dryer is not, and get the ‘washer is done’ text. Wife hates this smart stuff to begin with LOL, let alone when it is telling us stuff that we don’t need.

The scenarios I want are -

  1. Send a text ‘washer is done’ if nothing is going in the dryer
  2. Send text ‘dryer is done’ if nothing is going in the washer
  3. Do not send a text ‘washer is done’ if something is going in the dryer
  4. Send a text ‘washer and dryer are both done’ after the last one finishes if both are going at the same time.

Thanks @Mike1616. I think you have me going in the right direction. Will advise once I have time to modify and play with it.

@Ryan780 if you have any additional thoughts after seeing the scenarios I have above let me know. Especially the time issue you show above when the dryer finishes second


#5

This is what I was afraid of… You actually have 3 scenarios using 2 conditions. You currently don’t have any of that. Both are treated individually. This example is going to take me longer and not be fun to input on my phone. So, you’ll have to wait till I’m back in front of my PC.
The trouble is going to be distinguishing between the washer being done vs. never started. Do you see what I mean? The variable is false in both cases. I think you need another set of variables, washer done and dryer done.


#6

How do you know know if the washer is done or was never running in the first place? Both would be negative.


#7

@Ryan780 @Mike1616

I think I figured it out. Actually found time to brainstorm this afternoon . Not sure it will work until the scenario actually plays itself out in the laundry room but if you guys see any possible problems, let me know. Thanks for the help!


#8

I don’t know… It seems like there’s some potential there to miss something if the dryer is still running when the washing machine stops.

This is what I was advising…

If you want, you can delete the Messages for only one device being done. That way which ever one finishes last will send the message that both are done.

If you only run the dryer (for example) then the WasherIsRunning will have already been false and will stay false, so at the end it will send you the message that both are done.

So this should work for even that use case.


#9

What difference does that make? All he cares about is is one of them is still going. So if the Washer was running and the washer is now done AND the dryer is not running…that’s all you need to know.


#10

Hey Mike. Thanks for getting back. Not sure in your example it works either .


With your changes when the dryerIsRunning is true it sends a ‘washer is done’ message which I would not want if the dryer is still running. and if the dryer is not running it will send a 'Washer & Dryer are both done. But what if the dryer was never turned on to begin with?

I’m thinking my below logic circled takes care of the issue of not missing something if the dryer is still running when the washing machine stops. Im gonna try it and respond at a later time if it works. Going on a two week business trip so the family using the washer/dryer will be a good test :slight_smile:


#11

Yeah, I said you could delete that if you didn’t want to get those messages when only one was done.

Then change the message. “Washer and Dryer are both idle.” :slight_smile:

That’s not a Trigger…well it’s not being used as a trigger. The piston does not look like it’s subscribed to that event. So you may want to ensure it’s going to fire if that variable does indeed change, as right now it does not look like it will.


#12

Use the upper if/then/else’s to manage the WasherIsRunning and DryerIsRunning variables.

At the bottom of your piston, take the SMS message and move it to it’s own case statement with the 3 conditions you mentioned (washer done/no dryer, dryer done/no washer, washer and dryer done).

That should solve your issue and clean up the code. There’s no need to manage SMS part in the upper if/then/else’s it just adds more code that’s unnecessary.

The only potential issue I see with this is the 1 minute grace period in all your upper if/then/else’s. You could potentially have the dryer finish within a minute of you starting the washer. If that happens you’d see a false positive. One way to counter act this would be to add a wait statement (say 2 minutes) that would be before case statement that evaluates the SMS to send.


#13

Recommendations on outlet monitors for this piston? I was thinking about getting the Sense system to stop buying all these outlets for monitoring purposes (https://sense.com/). Thoughts?


#14

Not sure about that device. They work by educated guessing I believe. Now obviously the company will tell you that they make good educated guesses.

I use these, they are clearly the most “set it and forget it” devices that I have connected to ST. I have 3 of them (one on the sump pump) and they work wonderfully.


#15

Sense uses machine learning to “learn” a devices power signature. So it is still “educated guessing”. The company who makes Sense is also capturing stats from all their users to try to enhance the experience for all. But if you read forum posts about it there’s still a lot to be desired when it comes to the device being able to “sense” all devices drawing power. You’ll probably find that large appliances are “discovered”, but it’s not a guarantee. In some cases it’s discovered someones fridge light.

Given it’s cost, I’d expect more from the platform. So I’ll hold out until a new type of Sense is available with higher accuracy. Or the Sense services gets better with machine learning.


#16

Hey @shadowjig Thanks for the tips. Is this what you were trying to tell me to do?


#17

Yes, that’s what I was trying to convey.


#18

How is this part supposed to work exactly?

I don’t see how the piston ever sends this message in here.


#19

Originally I had this as ‘changes to’ instead of ‘is’ but I dont think that would work either?

Honestly I am Sales guy posing as a wanna be programmer so if anyone wants to jump in and help me it would be appreciated. Basically this part needs to handle the message ‘Washer and Dryer are done’ only if they are both on at the same time and when they end up both turning off.


#20

My head hurts a little now…but try this one. I think it covers all the bases.

The Variable “BothWereRunning” gets set to True if one of the devices starts up while the other one is already going. Then at the end, if Both is True, and the opposite one is false then you know that the one that just finished is the last one to finish So you can send the message that Both are done.

If Both was never set to true, then you can send the message that the only one that was running is now done.

Not shown, because you don’t want to see it…is the condition when Both is True but the opposite one is still True. This means that the opposite one is still running, so no message is sent (and no code is even needed to test for this condition as it’s already been accounted for with the other logic).

Again, it’s 3 minutes to midnight…but I think this does it… If not I’ll take fresh crack at it in the morning.