Washing Machine State Machine

My 10 seconds do not create that kind of problem but I can see how 10 minutes could spoil the fun. Are you sure that you chose the right thresholds? I found that my washing machine uses slightly more power in the idle-active phases than in the real idle phase.

Sounds like you should invest in a second measurement module :wink:

I´m on openhab 1.8.3. With the adding of “Number” now it works.

I will make another test when my wife is using the washing machine next time.

Little bit offtopic:
I saw the sonoff pow. How accurate is the power measurement? And how can i flash it? Do i have to use some extra equipment or is it done with mini usb cable?

Is there a sonoff for measuring 3 phases too? So i could see the power consumption of my whole house?

Great. I’ll update the first post. @alex_alexandroff22 now you know :wink:

Regarding Sonoff: It was just released and everyone involved is still waiting for the shipment from china to arrive, probably in around one week on my side. I’m actually more interested in the relative change in consumption more than in the accuracy of the reading… For all other details, please see the link posted by @sihui

Sonoff pow would be great. My knx actor only can measure ampere. No voltage, no power factor - so no watt too.

And sonoff is way more cheaper then a channel of my knx actor.

So i´m waiting for your reply on this if your sonoff arrived the next weeks.

Please post the link to a new post for sonoff here in this thread too, so i can find it easily.

Yes, this would have been easier. But sometimes “the path is the goal and not the end”:-).

1 Like

Any recommendations for power monitoring modules for the US that don’t require rewiring (like the Sonoff appears to). I could wire something up using the Sonoff Pow, but would prefer not to.

There are quite a few out there. I’d recommend to look out for a technology you already own. Homematic, Zwave,… there are some options

I use three 32 channel GEM units and a perl scrip that pushes the data via MQTT.

Very interesting and useful ideas! Thank you @ThomDietrich for sharing your idea and efforts :slight_smile:

Actually I’m realising a few different ideas with ESP8266 by my own, to have it a bit smaller and more flexible for my needs into coffee machines, irons etc, behind the wall plugs in the wall etc pp. At all cool stuff from ITEAD :+1:

But one question in the round. What the hell does GEM unit means?
Geriatric Evaluation and Management
Global Electric Measurement
German Execution Method… :rolling_eyes:

sipvoip should have mentioned the full name. I believe it’s less a scientific unit than a commercial product unit :slight_smile: http://www.brultech.com/greeneye

Ah, ok, I think that’s the GreenEye Monitor is mentioned by GEM, thanks again Thom!
I googled a few minutes too, but without useful results…

Sorry guys!

I went with the Aeotec Smart Switch 6. It took a little bit of work to get it to report values, but that may mainly have been user error. Has anyone tried Aeotec’s heavy duty smart switch? I’d like to use that to monitor my dryer (which needs 220V). Monitoring the dryer is a little more important because it’s cycle generally takes longer than the washer.

I’ve had good luck with my NodeMCU based vibration sensor for dryer detection.
You’re welcome to check it out and use it if you would like https://github.com/cbfief/laundrySensor.

It includes code for a photoresistor based washer sensor also (not working so well), but you should be able to strip that out fairly easily despite the current lack of documentation.

I used a SW-420 vibration sensor, but any similar sensor should work just fine with some tuning.

An alternative that I use to find out when my washer has started and ended is an old mobile phone charger powered from the door lock contacts. The charger then operates the coil of a relay which is a GPIO contact item on my Pi.
Mine is an older machine and as I use it on the same cycle it always takes around the same time so I can also predict when it will end.
Rather obviously don’t go in there without turning the power off first and don’t do this if you don’t know how to keep things safe in a high vibration, environment

I’m having a problem myself, if others can confirm this I’ll need to file an issue. Especially hoping for feedback by @rlkoshak :wink:

Check out the example in the first posting. At the end, you will find this rule as an example for further actions:

rule "Washingmachine Notifications"
when
    Item Washingmachine_OpState changed
then
    if (Washingmachine_OpState.state == MODE_FINISHED) {
        pushover("Washingmachine finished!")
    }
end

I wanted to straighten the logic. This does not work (no error or exception):

rule "Washingmachine Notifications"
when
    Item Washingmachine_OpState changed to MODE_FINISHED
then
    pushover("Washingmachine finished!")
end

This is working as expected:

rule "Washingmachine Notifications"
when
    Item Washingmachine_OpState changed to 3
then
    pushover("Washingmachine finished!")
end

Can anyone confirm that 1. using variables in the event definition is not working and 2. it should?

I’ve never actually seen an example of using a variable in the trigger like that. I’ve only ever seen or used hard coded constants (i.e. your 2nd example).

Do we know if using vals in triggers has ever been supported?

I know for sure Numbers like in your second example work, as do ON/OFF, OPEN/CLOSED, etc. states. There are other threads where people notice that Strings do not work (again, I’m not sure if that was ever supported, though if Numbers are supported is seems Strings should be).

I think it is absolutely worth filing an issue for it (ESH is probably the right place). I just don’t know if that issue would be an enhancement or a regression.

I think it’s important to mention, that I’m working with a constant (val) here. This would be a completely different question, if I was trying to compare to a variable that could change over time.

How do you build your state machines then?

Thought so too, just wanted to clarify that I’m not missing a detail or an error in my logic.