Tumble Drier Integration

Hello

My tumble drier is in my garage - not connected to the house, and so knowing when it is running or has finished is a bit of a pain which could easily be solved using OpenHAB.

Having scoured the internet for ideas, I’ve seen others use several types of sensor to detect when the drier is running. My solution is to use a microphone/sound sensor and a small button with bi-colour LED next to it. It would work as follows:-

  • When I start the drier, I press a Drier_StartBtn button next to it which sets the state of Drier_State from “Idle” to “Running” and illuminates the Drier_Run_LED.

  • When Drier_State is “Running” and the sound sensor Drier_Run_Sensor is not active (ie machine pauses) then a 2 minute timer starts. When Drier_Run_Sensor is active again, the timer resets. Should the “driercompletetimer” timer expire, Drier_State changes to “Complete”.

  • When Drier_State is “Complete” the Drier_Fin_LED illuminates to locally show that OpenHAB thinks the drier has finished. I will add other alerts around the house later. The drieridletimer then starts for 5 minutes. If this expires, Drier_State returns to “Idle” and LEDs extinguish.

  • If when Drier_State is “Running”, and the Drier_StartBtn is pressed, Drier_State should change to “Stopped”. If it was “Stopped” it changes to “Idle”.

I’ve written the following rules in hope of being able to achieve the above. Could I please ask if someone could check it through? I’m also not so sure how I achieve one item with multiple text states? I set it up as a Number item but not sure this is right?

Many thanks in advance.


var org.openhab.model.script.actions.Timer drieridletimer
var org.openhab.model.script.actions.Timer driercompletetimer

/**
 * Tumble Drier
 * 0=Idle 1=Started 2=Stopped 3=Complete
 */
rule "Start Drier Button"
when
	Item Drier_StartBtn recieved command ON
then
	if(Drier_State=1) {
		postUpdate(Drier_State, 2)
		}
	if(Drier_State=2) {
		postUpdate(Drier_State, 1)
		}
	if(Drier_State=3) {
		postUpdate(Drier_State, 1)
		}
end

rule "Drier Run Sequence LEDs"
when
	Item Drier_State received command
then
	if Drier_State received command==0 {
		sendCommand(Drier_Run_LED, OFF)
		sendCommand(Drier_Fin_LED, OFF)
		}
	if Drier_State received command==1 {
		sendCommand(Drier_Run_LED, ON)
		sendCommand(Drier_Fin_LED, OFF)
		}
	if Drier_State received command==2 {
		sendCommand(Drier_Run_LED, ON)
		sendCommand(Drier_Fin_LED, ON)
		}
	if Drier_State received command==3 {
		sendCommand(Drier_Run_LED, OFF)
		sendCommand(Drier_Fin_LED, ON)
		}

rule "Drier Running to Complete Schedule"
when
	Item Drier_State, 1 {
then
	if Item Drier_Run_Sensor received command OFF {
		if (driercompletetimer!=null) {
			driercompletetimer.cancel
			driercompletetimer = null
		}
			driercompletetimer = createTimer(now.plusMinutes(2)) [|
				postUpdate(Drier_State==3)
			]
	}
	}
	
rule "Drier Stopped to Idle Schedule"
when
	Item Drier_State, 2 {
		if (drieridletimer!=null) {
			drieridletimer.cancel
			drieridletimer = null
		}
			drieridletimer = createTimer(now.plusMinutes(5)) [|
			postUpdate(Drier_State==0)
		]
		}
1 Like

Another alternative would be something like a wemo insight plug socket, with which you can monitor the power drawn through the socket. The other benefit of course is that you could use openhab to start and stop the drier.

I use one of these to update the state of my TV if it goes into standby (which is does a while after the apple tv goes into standby)

I intend to get another one to control my dehumidifier - i’ll be able to turn it on via the wemo if my netatmo indoor humidity goes above a certain level, and monitoring the power will mean I can set up a rule to send me a notification when the power drops, so I’ll know when it has gone into standby (when the water tank becomes full).

Interesting. I shall look into the Wemo sockets. I assumed they were
purely on/off and didn’t do monitoring I already use RF sockets linked to
OpenHAB to switch on lamps.

Interesting idea. Thank you.

They do two kinds: a plain on/off and the “insight” which has the power consumption too.

Just looked at them online. It’s the cost that puts me off but I suppose
it’s a trusted solution. I certainly won’t buy into the Wemo brand for
everything else as I like to mix and match with my own custom kit via
OpenHAB. Just also seen that TP Link have the same device but slightly
cheaper.

As for the other part of my question - getting one text item on the sitemap
to show multiple states…running, stopped, idle etc rather than just
mappings for on and off, how can I achieve this?

You should be able to use mappings

Switch item=Drier_State mappings=[0=“Idle”,1=“Started”,2=“Stopped”,3=“Complete”]

I am using this exact setup, i.e. monitoring the power draw (albeit with a Fibaro Wall Plug Z-Wave device, and not the Wemo device) to monitor my washing machine, clothes dryer and dishwasher - with success, I would say.

When starting out, I installed the wall plugs on the devices and enabled persistence (using DB4O, or some other persistence service that gives you all the data) and left this for a while to capture the operational cycles of all the appliances.

Then, based on the collected data, I setup a few rules using power thresholds and guard times, to detect the different states of the appliances.

With this setup I can determine the following states:

  • Unit if OFF
  • Unit is ON, no program running (I call this IDLE)
  • Unit is ON, program is running (I call this ACTIVE)
    And more importantly, the following event:
  • Program ended

I have had this running for quite some time, and I have never seen it misinterpret a state or event. At one point I had to replace my clothes dryer since it was defect, and the only this I had to do was do a new capture of the operational cycle of this unit, and then tune the power threshold a little, and it was working again.

The Wemo works, unless you have an electric dryer.

I’m working on finishing up sensors for my washer and dryer. Consists of a NodeMCU board, a simple vibration sensor for the dryer, and a photoresistor to monitor the status LED’s of the washer.
The dryer portion is done and working well. I’m finishing up an enclosure to mount it all in, then I need to do some final testing on the photoresistors to make sure I can tune them in to give me the voltage I need.

Thank you all for your comments so far. I like the use of the Fibaro unit,
Wemo and persistence - ingenious!

My dryer is a budget model that requires the twist of a dial and then push
of a button to set it off. It hasn’t got any LEDs. I’m quite happy to set
the machine off manually as I’ll have to be in front of it anyway to load
the washing.

I think the monitoring of energy is the simplest and cleanest solution yet
probably the most expensive at £30 to £50 for a plug in device…and for
that I could just keep track of the time I load it. I like the idea of the
vibration and/or sensor to actually detect when it’s running, yet I don’t
pretend to have even a good knowledge of programming - it’s never been my
strongest subject.

It will be interesting to see what other ideas spring up.

Thank you again.

My dryer sensor doesn’t used LED’s (mine doesn’t have any either), just a cheap vibration sensor. Including the NodeMCU board, less than $5 worth of parts.

Basically, if it sees vibration for more than 30 seconds (adjustable, to avoid false positives from bumps) it decides that the dryer has started. Then, if the vibration stops for more than 2 minutes (adjustable again, in case you open the door to add/check something) it signals the end of cycle, reports it to OpenHAB via MQTT. OH then sends a push notification, or whatever you want it to do.

For the washer I’m reading the LED’s because there’s not a good reliable way to base it on vibration with the different fill cycles. And I’m too cheap to spend $50 on a Wemo :yum:

I use these and they work really well