Washing Machine State Machine

Also just an idea for making sure, the washing machine gets depleted: just attaching a button at the washing machine, which is pressed, if you take out the clothes. I’m thinking of Amazon Dash Button:

In that case, adding a item “Washingmachine_full” would be ON the same time, Washingmachine_OpState goes over to “MODE_FINISHED”. So you can add a rule, if the state of Washingmachine_full is ON since 30mins or so, you get some more decisive action like some creepy sound playing in the house, or whatever you like. That’s our pain even getting some pushovers to your mobile when the machine is ready: you press OK and it’s easily forgotten.

1 Like

Hey Thomas, averageSince is a nice idea! I had my personal reasons to not relying on persistence here but I can totally see the benefit, even for my system now. I’ll add the solution to the first post.
I’ll add the button idea as well. I myself just use the machine for it by only turning it off after I’ve removed everything. You know how it is, “Tausend Wege führen nach Rom” :slight_smile:

I’ve no time right now, please remind me if I forget :wink: Thanks!

I hope to try some of this this weekend. But curious how effective identifying your power consumption state on smaller appliances like toasters is. Or if there are multiple appliances going at the same time, if OH2 is getting confused on reporting the correct state of each.

I’m also considering getting an Aeotec HEM. Would monitoring the power consumption there give a better measurement?

Basically, I’m pretty sure, you’re not getting a clear picture, if there’s are more than one device on one measurment device. There’s too much noise to be considered and the logic would be a total mess. I didn’t expect much from my 10€ China-device, but it seems pretty stable. If you have a dedicated measuring device of any kind, you have to find out two things:

  1. how is the power consumption regarding to what you would like to achieve
  2. how short your intervals schould be. I can imagine a toaster requires a much shorter interval than a washing machine.

If you have done this (like @ThomDietrich explained in the first post of this thread), you can then adjust your rule to that.
Long Story short: I don’t think there’s a device small enough to be monitored and it is nearly impossible to filter a specific device, if you connect more than one to your power measurement device.

as explained above, the 10€ China-device delivers enough output for a clear rule. I don’t know the Aeotec HEM, but it should do the job. All you need is a reading of the wattage over time and then compare it to your thresholds - that’s it.

I do have some headaches also regarding the amount of data, which goes into the MySQL Server at this point. But I’m thinking of a garbage collection within MySQL or in a monthly/weekly rule within OH2 to get the old data out of the persistance. There are some values, which I want to persist over years (e.g. some variables regarding heating, weather and so on), to have a base for future rules or comparisons - but I don’t think the persisted Washing Machine states will needed for this! :wink:

@ptmuldoon I agree, it would be a fun experiment to break down overall consumption of multiple devices but from a practical standpoint, just get two modules and be done with it :wink:

Regarding the toaster: First it’s not a problem to detect states as long as they are characterized by a certain wattage (and/or duration). @binderth is right that it could be problematic to observe the toaster, as he will be active only for a short time. However you (@binderth) forgot, that most modules have a threshold option :wink: They will send acyclic extra measurements if a certain value is passed.
Both the mentioned Homematic and Sonoff Pow module provide this functionality.

I’d also recommend the Sonoff Pow as a cheap good module:

1 Like

Ok, but I’m really not sure how I connect those cheap modules to a washing machine or other without needing splice the power plug to the device, etc. Unless I am misreading the instructions to use them.

Aeotec offers the more expensive zwave home energy meter. And I was thinking perhaps monitoring the usage there of each device and you could do the same thing?

1 Like

I have one of those hooked up to the main feed circuit in the fuse box, so basically monitoring the total energy consumption of my house. It is working very well, and seems to give fairly precise measurement reports.

For monitoring of individual appliances, however, I am using Fibaro Wall Plugs (FGWPF-101). These devices are very well suited for the purpose. I am currently using these on my washing machine, drying machine, dishwasher, freezer and water heater.

Apart from being very nice devices, that are rock solid in operation, I can see the following two benefits:

  • Ease of use - simply plug it into the socket, and then plug your appliance into the device.
  • Master switch - If you happen to leave for an extended vacation, and forgot to turn off your washing machine, you can simply cut all power to the unit, :slight_smile:

oh. I didn’t understand this on my first readovers, but now I’m getting a bit more context. So this means basically, that the Sonoff sends (regardless of the intervall set in TelePeriod) a MQTT message, if I set a low and high wattage threshold and this threshold is met?

PowerHigh       | <watt>  | Set power high threshold value
PowerLow        | <watt>  | Set power low threshold value

I’m getting some more ideas! :wink:

That’s correct. The Sonoff Pow doesn’t have a outlet, you have to connect blank wires on them, see on the picutre on the bottom from left to right: L(OUT) - E/E - N/N - L(IN).

As my Installation in the cellar is surface-mounted, I just placed them in between the wiring. But you could also splice an extension cable and put it in the middle.

My issue is being the USA and I do not believe I can use the Fibaro’s here with different current/outlet system. But I do have unused a Leviton Zwave outlet not being used at the moment. I could potentially give that a try. I do believe those outlets track the usage/wattage of the outlet.

I may start with the Aeotec HEM first though. I do want some whole home energy monitoring.

And splicing an extension cord is a very good idea to use the cheap $10 ones.

In the end I think either solution has it’s benefits. The Sonoff module needs soldering/flashing/splicing, other modules are more expensive, others might have other interesting characteristics. The Z-Wave module might be nice if you are already using Z-Wave, Sonoff communicates over Wifi+MQTT, that might be another pro OR con to pay attention to. I think you get the idea :wink:

Yes that’s correct. That’s probably the only downside to Sonoff-Tasmota, the author is not the biggest fan of documentation :smiley: The threshold function is actually only know to me because I were the one to request it :smile: https://github.com/arendst/Sonoff-MQTT-OTA-Arduino/issues/38

1 Like

Did anyone have a look at Smappee for energy monitoring? It does promise to detect a large number of the appliances and measure energy usage in a home network only by monitoring just behind the meter. If it works well, it could give the inputs for a whole series of washing machine state machines. I don’t have one, but am intrigued by the simplicity this could provide for energy monitoring.

Interesting device. I see it connects to your home wifi and then uses the App to to check the usage. Unsure how it would monitor all appliances except for similar methods mentioned above in learning its energy usage.

And I do like the optional separte Water and Gas monitoring. But its more then double the cost of the Aeotec HEM.

I don’t know Smappee, but judging from the website it’s cloud-powered. So your local Installation sends the data to the Cloud and the Apps use this data.
I also found, Smappe provides an API: https://smappee.atlassian.net/wiki/display/DEVAPI/SmappeeDevAPI+Home
As it appears, this API provides the overall power consumption with Get Comsumption (https://smappee.atlassian.net/wiki/display/DEVAPI/Get+Consumption). I’m not into the Smappee terms, but it could be, that a “sensor” equals a identified appliance? In that case, the Get Sensor Consumption method brings up the sensor data (https://smappee.atlassian.net/wiki/display/DEVAPI/Get+Sensor+Consumption).

1 Like

Hi, i’m new here. I saw that it is referenced to e.g. Homematic HM-ES-PMSw1-Pl. But how do I connect this device to openHAB? If it’s using WifI, what protocol is it using? Or is it as easy as it seams to just connect a WiFi device? I cannot imagine. Regards.

Hey Moritz,
welcome to the openHAB community!! For such an off-topic question you might find a better answer by opening a new thread.

You want to integrate a Homematic device into your openHAB setup. Please read up on homematic. It doesn’t work with Wifi. You will need a special tranceiver for that. You can either use your existing CCU2 or (my preferred recommendation) a Raspberry Pi with a busware SCC tranceiver stacked on top of it and running the homegear software. Our openHAB Raspberry Pi image openHABian includes all setup steps needed to get this combination working for you. Have a look:

For any further question I would kindly ask you to open a new thread. Good luck!

1 Like

Hi, here grahps of my washig machine and Sonoff POW and Sonoff-Tasmota firmware :slight_smile:

Sonoff POW not very sensitive to low power load, but increasing Period to 1 minute or 2 should look better.


I also experience some peaks in power usage, if the washing machine is ready - or sometimes if it’s not fully turned off.
These peaks are high enough to be trigger the threshold:

If you take a close look, the machine is ready at about 9:20 (after all those peaks) and it’s showing the “ready”-LED in front, but still, there are some POW-peaks over 10Watts (here at 09:26) occurring, which makes my logic a bit complicated…

Looks like your problem, too? Some more with this behaviour?

Typically at the end many machines have something called “Knitterschutz” in Germany. his means that the machine tumbles every seconds or minutes the clothes again, and so your have some spikes in Power consuption. This is one of the states that should be used with a timer.


1 Like