Help build a Washing Machine monitoring SmartApp?


(James M) #1

Hello, I’ve just gotten started with my Smartthings adventure, but it is already a very addictive drug (I’ve already setup more than 30 things in the first week I’ve have the hub :).

On my washing machine, I’ve added a Zooz power monitor and a contact sensor on the lid, and I’m hoping to recreate the monitoring logic that Phil Hawthorne detailed on his blog, but as a smartthings SmartApp rather than in HomeAssistant as he described.

Having never created a SmartApp, I was hoping someone here in the community might be able to help out.

This is the general logic to implement:

Four basic machine states:
- Idle
- Running
- Finishing
- Clean

Set state to "Idle" at startup
If the state is not "Running" and the power monitor value is greater than 10 than set state to "Running"
If the state is "Running" and the power monitor value drops below 5 then set the state to "Finishing"
If the state becomes "Finishing" and the state doesnt change for 5 minutes, then set the state to "Clean"
If the state becomes "Clean" then send a Notification.
If the state is "Clean" and the door contact sensor changes to "Open" then set the state to "Idle"

Any assistance would be greatly appreciated. Thanks!


#2

You might want to look into using WebCore. It’s very popular and is essentially a scripting language for SmartThings. I think you’ll find you can do pretty much anything with it, there will be lots of people to help you if you get stuck on the logic, and the work will go much faster and smoother than if you just try to start from scratch. :sunglasses:


(James M) #3

Thanks very much for this advice. I dug into webCoRE and was able to build exactly what I wanted, and was even able to add a “Value Text” virtual device for the washer to show status, and keep track of how many wash loads per day/week. I was also able to eliminate the need for the “finishing” state because of WebCoRE’s amazing “value stays under for n minutes” conditional trigger statements.

WebCoRE is a truly amazing scripting engine - at once approachable and straightforward to use, but at the same time unbelievably powerful.


#4

Tagging @ady624


(Ron Talley) #5

Nuff said!