Clothes Dryer Automations

What tells you when the clothes are dry out of all that?

Well the above gives you a sensor with a set of attributes you can then build an automation around…

I opted to build two MQTT Publish Automations, one for Dryer State - Idle and one for Dryer State - Start. These just look at the “shake” attribute, but you could do something else.

- alias: Dryer State - Start                 
  trigger:                                 
    platform: numeric_state                
    entity_id: sensor.smartdry             
    value_template: '{{ state.attributes.shake }}'
    above: 150                                    
    for:                                          
      seconds: 30                                 
  condition:                                      
    condition: template                           
    value_template: '{{ states.sensor.dryer_state.state != ''Drying'' }}'
  action:                                                                
  - service: mqtt.publish                                                
    data:                                                                
      topic: hass/state/dryer                                            
      payload: Drying                                                    
      retain: 'true'                                                     
- alias: Dryer State - Idle                                              
  trigger:                                                               
    platform: numeric_state                                              
    entity_id: sensor.smartdry                                           
    value_template: '{{ state.attributes.shake }}'                       
    below: 100                                                           
    for:                                                                 
      minutes: 5                                                         
  condition:                                                             
    condition: template                                                  
    value_template: '{{ states.sensor.dryer_state.state != ''Idle'' }}'  
  action:                                                                
  - service: mqtt.publish                                                
    data:                                                                
      topic: hass/state/dryer                                            
      payload: Idle                                                      
      retain: 'true'                                                     

Then you can trigger other automations on the Dryer state (I personally do things like turn on exhaust fans, turn them off, and provide notifications).

I created some template sensors like this

      smartdry_temperature:
        unique_id: 0e564a2b1013f7e3a77f74038077127b
        value_template: "{{ state_attr('sensor.smartdry', 'temperature') }}"  
        unit_of_measurement: "°C"
      smartdry_humidity:
        unique_id: 0e564a2b1013f7e3a77f74038077127c
        value_template: "{{ state_attr('sensor.smartdry', 'humidity') }}"
      smartdry_runtime:
        unique_id: 0e564a2b1013f7e3a77f74038077127d
        value_template: >-
          {% if states.sensor.smartdry.attributes.loadStart > 0 %}
            {{ ((as_timestamp(now()) - states.sensor.smartdry.attributes.loadStart / 1000) /60) |int}}
          {% endif %}
        unit_of_measurement: "Minutes"

I still cant figure out the relationship between the dryness number in the phone app and the temperature/humidity/runtime. When i charted the data the shake and shakecount attributes were all over the place.

Here is the data I collected lets see if anyone else can see the logic in how to determine the dryness #, as its not in the api query used above. Temp in F is also not in api, just Celsius.

Dryness in app Temperature in C Temperature in F Humidity
75 52.66 126.788 24.58
76 53.02 127.436 23.07
77 53.16 127.688 22.17
78 53.92 129.056 20.98
79 54.21 129.578 20.08
Less Dry - 80 54.39 129.902 19.13
81 54.96 130.928 18.54
Dry - 82 55.5 131.9 17.85

Well dryness is inversely proportional to humidity.

Well, two ways:

  1. if you want to actually know when the clothes are dry, then use humidity, built a sensor that pulls that attribute and then alert when it reaches a certain humidity level
  2. if you just want to know when the normal dryer cycle is done, then shake is what you want to watch for the drum stopping

You can watch “shake” and just make sure it’s below a certain number, for a certain period of time. That’s how the app is doing it.

Loadstart goes to 0 when it’s not moving also.

Bummed that nobody sees the logic for figuring the dryness scale numbers. I was hoping I was missing something easy.

As Dryness goes up, so does temperature. Meanwhile humidity goes down. Entirely logical if you ask me.

Do you want the arithmetic? Put it all in a spreadsheet and play with some graphs.

It is close to linear.

Dryness = 2.5 * Temp(C) - 56.5 (approx, we can be more precise, but it won’t be that accurate anyway.)

Or using humidity

Dryness = -1.03 * Humidity + 100

2 Likes

Getting closer @nickrout, taking the absolute of (humidity-98) worked for the last load I did. More laundry this weekend. Last load i did the humidity never got below 12 and the dryer shut off because it thought the clothes were dry, so I’m leaning towards <13% humidity =done. Got the switchbot working on the automation to shut the dryer off and also broadcast to google that the laundry is dry.

Dryness in app Temperature in C Temperature in F Humidity ROUND(ABS(HUMIDITY-98),0)
0 37.77 99.986 100 2
61 55.15 131.27 32.06 66
81 59.77 139.586 16.74 81
84 59.54 139.172 14 84
85 58.7 137.66 12.5 86
1 Like

Do you still have a broken SmartDry device? If so, it would be great to get pictures of the internals. I’m curious how they’ve built it, and maybe an intrepid maker would potentially be able to create a DIY version

I got mine working again. I have an older unit and after closely inspecting it saw that a battery replacement had bent one of the small pins underneath the battery (negative) instead of being on the positive side. Once I fixed that the sensor started working again.

It’s basically just a temp, humidity, motion sensor. It’s open at the bottom (which is where the magnets are to adhere it into the drum) so so it could be built using any sensor that you can get raw values from. The trick is making sure you have sufficient signal since it’s inside a metal drum, inside a metal box. They use Bluetooth but the receiver has to be with in 10’.

Gotcha. I started exploring the ability to make this on my own but I wasn’t sure about hardening it to prevent it from failing while the dryer was running, so I ended up picking up one of these sensors. The instructions above work great, thanks for hacking away at this!

1 Like

Just got mine all working, outputting the ‘dryness’ via a template sensor… then using that as a trigger in the automation (with the dryer plug being on as a condition). then finally turning off the dryer plug once it hits that ‘dry’ level.

Works quite well! thanks for everyone in this thread :slight_smile:

what did you use for “dry” level?

Dryness = -1.03 * Humidity + 100

If Dryness above 83. Works really well!

1 Like

I came back to this thread to share that for anyone who hadn’t noticed, SmartDry now offers SmartThings integration. I set this up in HA and it appears to be working well. It even includes a binary “wet” sensor. Now seeing here how someone found a simple URL that returns all the necessary data, I may switch. But everything appears to be working great with SmartThings so I may just leave it as-is for now.

Can you give some details on how you set this up and how you created the binary sensor?

This has been an interesting read of the life of this mini-project! It seems like it wouldn’t be too terribly difficult to build this out with ESPHome with a device in a small project box (or custom 3D printed case) with some magnets on the bottom and sensors for temperature, humidity and motion. I’m not sure how the wifi of the ESP would hold up, but I would think you could deep sleep the device until the motion sensor triggers to save the battery. Kind of intriguing, I might have to tinker with this idea.

I just added SmartDry in the Smart Things app and then added the Smart Things integration to HA. I will say that the binary sensor doesn’t seem particularly useful for me. It doesn’t seem change to dry until well after the clothes are dry.