Notify dryer is finished with ThirdReality Vibration Sensor

Hello I have Home Assistant OS installed

  • Core 2024.12.5
  • Supervisor 2024.12.0
  • Operating System 14.1
  • Frontend 20241127.8

I am having issues with creating a good automation with a sensor that keeps going back to “Cleared” meaning no vibration, like it is resetting its counter.

In the past with other sensors like a power sensor I can do something like; if power consumption is high. Wait until it is off for 6 minutes and then send voice announcement.

This vibration sensor is doing this crap though


Please keep in mind that the dryer was on the entire time. I tried different things like setting vibration sensor to low, med, high, highest. Similar results.

So how would I create an automation where I am searching for a minimum of 5 “motion detected” over the course of 5 minutes = Start

Wait for motion to be set to no motion detected for 5 minutes then proceed to send out voice announcements.

Trigger "Detecting Motion"
For Duration
3 minutes.

This condition does not ever come true.

Another thing I tried

Trigger "Detecting Motion"
dont set duration timers

AND IF
No Motion
For Duration
3 Minutes

Except this will probably trigger way too often with too many false positives.

Any suggestions?

1 Like

Still having issues but here is the direction I have taken.

Created a new sensor/helper using YAML under configurations.

# Ties to a History Stats Helper
# This is keeping track of how often sensor switches to on in five minutes
sensor:
  - platform: history_stats
    name: helper_vibration_dryer
    entity_id: binary_sensor.third_reality_inc_3rvs01031z_motion
    state: "on"
    start: "{{ now() - timedelta(minutes=5) }}"
    end: "{{ now() }}"

After a lot of troubleshooting (it did not originally look like what I just posted above).
It does seem to measure stuff… not sure why its doing decimal increments.
image

Anyways my automation does not work because it doesnt do jack.

alias: Dryer Vibration Automation
description: Notify when dryer stops running
triggers:
  - entity_id: binary_sensor.third_reality_inc_3rvs01031z_motion
    trigger: state
conditions: []
actions:
  - choose:
      - conditions:
          - condition: template
            value_template: |
              {{ states('sensor.helper_Vibration_Dryer') | int >= 5 }}
        sequence:
          - target:
              entity_id: input_boolean.dryer_running
            action: input_boolean.turn_on
            data: {}
      - conditions:
          - condition: state
            entity_id: binary_sensor.third_reality_inc_3rvs01031z_motion
            state: "off"
            for:
              minutes: 5
        sequence:
          - target:
              entity_id: input_boolean.dryer_running
            action: input_boolean.turn_off
            data: {}
          - data:
              title: Dryer Update
              message: Dryer has halted or finished its cycle.
            action: notify.notify
          - data:
              cache: false
              entity_id: media_player.googlehome9088
              message: Dryer has halted or finished its cycle.
            action: tts.cloud_say
mode: single

guessing its because I am searching for values of 5, and higher but I am stuff at 0.XX values?

Anyone know why?
since int is designed for whole numbers, will it be as easy as doing

 {{ states('sensor.helper_Vibration_Dryer') | float >= 0.05 }}

Anyways spent whole day on this, so obviously out of my depth. Any assistance appreciated.

Fixed it.

Create a sensor to keep track of how often it goes into a “motion” mode, indicating vibrations are detected.

Create a sensor in configuration.yaml file.

# This is keeping track of how often it switches to "ON" or motion detected in five
# minutes
sensor:
  - platform: history_stats
    name: helper_vibration_dryer
    entity_id: binary_sensor.third_reality_inc_3rvs01031z_motion
    state: "on"
    type: count
    start: "{{ now() - timedelta(minutes=5) }}"
    end: "{{ now() }}"

Create an input Boolean in Helpers


name: dryer_running
icon: mdi:fire
Entity ID: input_boolean.dryer_running
Area: Optional
Label: Optional
Voice Assistant: No need to expose them
Enable: true
Visible: true

Create the automation once the prerequisites are setup

alias: Dryer Notification
description: Notify when dryer stops running
triggers:
  - entity_id:
      - sensor.helper_vibration_dryer
    trigger: state
conditions: []
actions:
  - choose:
      - conditions:
          - condition: template
            value_template: |
              {{ states('sensor.helper_Vibration_Dryer') | int >= 5 }}
        sequence:
          - target:
              entity_id: input_boolean.dryer_running
            action: input_boolean.turn_on
            data: {}
      - conditions:
          - condition: state
            entity_id: binary_sensor.third_reality_inc_3rvs01031z_motion
            state: "off"
            for:
              minutes: 5
        sequence:
          - target:
              entity_id: input_boolean.dryer_running
            action: input_boolean.turn_off
            data: {}
          - data:
              title: Dryer Update
              message: Dryer has halted or finished its cycle.
            action: notify.notify
          - data:
              cache: false
              entity_id: media_player.googlehome9088
              message: Dryer has halted or finished its cycle.
            action: tts.cloud_say
mode: single

So far its been working great for me. Hope this helps others.

4 Likes

@chris1bass THANK YOU. I got the same sensor and was trying to do the same thing, this was a huge help. I actually bought three of them and did some science - if it helps, I noticed that different spots on my dryer brought more consistent “motion detected” results. For my dryer, it was more toward the front = more consistent with the sensitivity on the sensor turned all the way up.

Glad it was able to get you going.

Question what type of dryer design do you have? For example, this is mine.

I just assumed the fat rounded door would result in inconsistent measurements, but I haven’t moved it around much yet.

My next-door neighbor with his car that is louder than a Harley Davidson at startup keeps triggering it once in a while for me, so I am still fine tuning it. My windows rattle for goodness’ sake lol.

Thank you, Chris! Just set this up with my 3rdReality sensor!

A heads up to anyone coming after, ifyou want to save a step when creating this or cleaning up your automations, you can create your helper Boolean as a template instead and use the same {{ states('sensor.helper_Vibration_Dryer') | int >= 5 }} to bypass needing the automation! You can then have it report as “Running” or “Vibration” as you wish and tie it to your washer/dryer. So handy!


Cheers!

1 Like

Just set this up so we’ll how well it works for me. One thing I’m trying to work around and figured I’d post here as I explore this is dealing with a “wrinkle release” cycle. I’m curious to see if this will detect that the dryer has stopped based on the fact that it never “really” stops, but there is just a longer pause between vibrations. I have a load in now so I’ll keep an eye on it and report back.

2 Likes

Thanks for sharing this. I have a sensor coming and wondering if you, or others, can suggest what sensitivity to set for the sensor? I see you mentioned in your OP that you tried all the different levels but wondering which you settled on.

Hey there, would you mind showing how you set this up? I tried creating a Template Helper (using the Binary Sensor type), copied the state code in, but get this error message:

Edit: figured it out seconds after posting this: For anyone after me, don’t copy in the brackets!

@ coolsaber57
How did you get to that menu ?

I thought that I had a grasp on this by adding a Helper boolean “dryer running”.
And renaming my Vibration sensor entity “third_reality_inc_3rvs01031z_motion”

But there is clearly some steps that I am missing that seem to be already implied to others.

UPDATE: I found TEMPLATE instead of BOOLEAN as a helper type and figured it out.

FOLLOW UP QUESTION:
What are the differences between these two ?

(1) triggers:

  • entity_id:
    • sensor.helper_vibration_dryer
      trigger: state

(2) - conditions:
- condition: state
entity_id: binary_sensor.third_reality_inc_3rvs01031z_motion
state: “off”

So much terminology to keep track. Boolean vs state vs Binary. Sensor vs Entity vs Device

When using template sensors (or template binary sensors)

The default way they work is that whenever the upstream sensor (typically referenced as the state) changes - the value of this sensor also changes.

Triggers and conditions work for template sensors in the same way they work in automations:

  • Triggers start the automation or sensor update “running”
  • Conditions allow you to check some conditions before continuing.

In the case of automations if the trigger happens and the conditions pass the actions run.

In the case of template sensors if the trigger happens and the conditions pass the value of the sensor updates - otherwise the old value is retained.

More details can be found here:


A quick side note on the Third Reality Vibration sensor (I use a 3RVS01031Z) to monitor my AC - to check if its running when it shouldn’t be.

Unfortunately it tends to eat batteries, since its sends updates every second whilst it is detecting motion (I haven’t found a way of stopping it doing that) hence:

  • Battery life is good if it isn’t triggered often.
  • But it only lasts a few months if it’s often detecting motion.

On the plus side it only uses 2 x AAA batteries, but its still a bit annoying.

I appreciate the quick response. I was trying to understand the difference in the two entity ids. The first one was sensor.helper_vibration_dryer and the trigger was a state change. The second one was binary_sensor.third_reality_inc_3rvs01031z_motion.

Further up in the message chain was a helper to make a binary sensor. The first entity had “helper” in the entity name. The second one had “binary_sensor” in the entity name. Are there two helpers for this automation ? Or a different face of the same binary sensor helper ?

I think the third_reality_inc_3rvs01031z_motion is the real sensor and the sensor.helper_vibration_dryer is using the history stats integration - I am afraid I haven’t used that integration, so I can’t give you any info on it.


Caution: I use Zigbee2MQTT (and I think the OP is using ZHA) so you might need to translate some of my knowledge.

Anyway I can give you what I do (for my AC) and explain that so that might help you figure something out, I use a template binary sensor:

template:
  - binary_sensor:
    - name: "Invalid Run Dining AC"
      unique_id: invalid_run_dining_ac
      device_class: power
      delay_on:
        minutes: 1
      state: >
        {{  is_state('binary_sensor.dining_ac_vibration_vibration', 'on') and is_state('input_select.acdiningcontrol', 'Off') and (now() - states.sensor.dining_ac_vibration_y_axis.last_updated).total_seconds() < 30 }}
  • name and unique_id are needed to show up in the UI and be referenced from automations.
  • device_class makes it show up as a power icon in the UI.
  • delay_on means that it must be running continuously for 1 minute before it triggers - this is because the AC might take a moment to shut down after I turn it off.

The state can be broken down as follows
Is the sensor currently detecting vibration?

is_state('binary_sensor.dining_ac_vibration_vibration', 'on')

And,
Is the AC meant to be off currently?

is_state('input_select.acdiningcontrol', 'Off')

And,
Have I received an update from the sensor in the last 30 seconds?

(now() - states.sensor.dining_ac_vibration_y_axis.last_updated).total_seconds() < 30

This is because the sensor actually shows up like this:

  • Boolean sensor that indicates if vibration is detected/clear (on/off)
  • Separate sensors for movement in X, Y an Z directions.

So I am accounting for two issues:

  • Firstly if you have a battery failure the device can get stuck in the “on” (motion detection state).
  • The boolean sensor only changes if the state changes (clear/detected) where as the motion sensors constantly change due to the vibration.

Net result, my sensor only trips if all of the following are true:

  • Motion is detected (and has been for 1 minute).
  • The AC should be off (and has been for 1 minute)
  • Updates have been received in the last 30 seconds.

I then simply feed this sensor into an automation:

triggers:
  - trigger: state
    entity_id:
      - binary_sensor.invalid_run_dining_ac
    from: "off"
    to: "on"
actions:
  - action: remote.send_command
    data:
      command: power
      device: aircon_lg
    target:
      entity_id: remote.deskremote

Note: The vibration sensor isnt completely reliable - it sometimes goes to clear when it shouldn’t - this is actually helpful to me, because it means that I send the off command each time it cycles.

1 Like