Notification based on vibration time of dryer

I have a vibration sensor on my dryer that I would like to notify me when the dryer has run at least 35 minutes and then check every 15 minutes to see if its still moving. If it's not moving I want it to trigger an announcement to come through my speakers.

Everything I've tried will trigger the timer if the dryer is bumped and then after 35 minutes I get the notification.

Another variable is, because the washing machine (that's on a power sensor) is running so close to the dryer, its triggers the dryer vibration timer during the spin cycle.

So ultimately what I'm looking for is:

  1. if the washing machine is running (using power via the power sensor), ignore the dryer vibration sensor and keeps flow from starting.
  2. If the dryer is running for 30 minutes or more, signal the notify actions after vibration is NOT sensed for 5 minutes.

I know how to get the notification part to work, the problem is I can't the first part to work so anytime the dryer senses any sudden vibration, it starts the timer to set off the notification.

I appreciate any help someone can provide. I'm a novice so I'll visual example or instructions spelled out for me. Or send a flow for me to copy and use.

Thanks in advance!!

Could you use a second power sensor to detect when the dryer is active?

Why test if the dryer is running for at least 30 minutes?
You could use a trigger node to send nothing, after 5 minutes send "Dryer stopped vibrating", with further messages from the vibration sensor extendng the delay.

[{"id":"e6b2ad917c1704f5","type":"inject","z":"a41771eafa3a03e3","name":"Poll Washer Power Sensor","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":210,"y":260,"wires":[["5f5cac12708eb1e6"]]},{"id":"e1e71b412a813bb4","type":"gate","z":"a41771eafa3a03e3","name":"","controlTopic":"control","defaultState":"open","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"default","x":410,"y":340,"wires":[["d5fd5dcf9c1bf779"]]},{"id":"5f5cac12708eb1e6","type":"change","z":"a41771eafa3a03e3","name":"Topic = control, Payload = open/close","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":260,"wires":[["e1e71b412a813bb4"]]},{"id":"81c5a8e8215d4718","type":"inject","z":"a41771eafa3a03e3","name":"Vibration detected","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":340,"wires":[["e1e71b412a813bb4"]]},{"id":"d5fd5dcf9c1bf779","type":"trigger","z":"a41771eafa3a03e3","name":"","op1":"","op2":"Dryer stopped","op1type":"nul","op2type":"str","duration":"5","extend":true,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":590,"y":340,"wires":[["bc9138a7618a8278"]]},{"id":"bc9138a7618a8278","type":"debug","z":"a41771eafa3a03e3","name":"Dryer has stopped vibrating","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":820,"y":340,"wires":[]}]

My dryer has a different appliance power connector so I need to use the vibration sensor instead.

I suggested the 30 minutes just to ensure that sudden bumps onto the dryer would trigger the automation. I'm sure 5 minutes would work also.

I imported, your sample flow. Where do I add the entities for the washing machine and the dryer to make it work?

Thank you so much for responding!!!

Here is a snap shot of my original node and with yours showing under it.

I don't know how your Node-red flow acquires it's knowledge of the washer power consumption or dryer vibration. So I have used simple inject nodes to simulate these inputs.
Of course that means my flow is not directly applicable to your real-world problem.

The heart of my flow is the Trigger node.

A message arrives from your vibration sensor. Let's say it's just a 1.
The trigger node starts a 5 minute countdown.
If another 1 arrives (the dryer is still vibrating), the countdown starts again ("extend delay if new message arrives").
When the 5 minutes has elapsed (no vibration for 5 minutes), the trigger sends on a message "Dryer stopped".
This is the message you would pass on to your Sonos.

Since the countdown only begins when vibration is detected, I assume that means the dryer is running. Thus I don't need to code your "running for 30 minutes" test.

Of course you pointed out problems with this:
a) vibrations from the washer can be picked up by the dryer vibration sensor.
b) A simple knock, slamming the door maybe, can trigger the vibration sensor.
and c) Both machines could be running at the same time.

I can see a couple of ways to tackle a).
The way my flow uses: A message that the washing machine is running closes a "gate" node preventing the flow through the trigger. Actually it might be better to put this gate after the trigger, not before.
Another way is to use the washing machine sensor to set a context variable flow.washerRunning to true. A Switch node could test this variable and discard messages from the trigger if it's value == true.

b) is harder to deal with. Not sure how to code this one.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.