Action to be triggered when the power consumption is decreasing?

Hello Fellow Node Red users,

I got a 3D Printer for Xmas, all works fine. I would like to get a notification when the printing is done.
For sure, the straight way with Octoprint and the Home assistant it's easy, did a testing with Octo4a works great, but at this moment I don't have any device which could permanentlly run Octoprint and don't want to invest.

What I have, is a Shelly 1PM which is concted to the printer, so I can see the consumption.

image

I would like to get an action triggered, when the power consumption drops.
I found some examples used for the Washingmachine, but all of them are considering as start of the power monitoring the start of the Shelly/Smart plug. I don't want to start the Shelly, the Shelly is doing only powermonitoring, it's allways on.

I have tried to use an RBE node, but because the power is fluctuating, not just increasing, it's not working.

image

Do you have any other sugestion?

Thanks,

A filter node can be set to "block unless value change is greater than" a set amount, which seems like it should work.

Otherwise a switch node can only pass messages when the payload is below a certain level.

You might need a second filter node to block repeated messages.

Thanks Jbudd, but how to avoid messages when the Printer is idle? The consumption will be bellow the set value, and I will get by each polling the action triggered.

Like this?

So, finally I have found what I needed, straight out of the box.

node-red-contrib-edge-trigger

The Failing edge Node is doing exactlly what I need. Thanks J budd for supporting.

My preference in this case would be to use core nodes rather than a contrib node. With contrib nodes you can be sure it will keep working into the future, with contrib nodes you do not know whether it will continue to be maintained.

Colin, you are right, but I have no ideea how to create this manually with standard nodes. And writing a function, is to far from my knowledge. Thanks,

Yes you do, @jbudd suggested how to do it earlier. A switch node and a filter node. Did you try that method? If it didn't work show us what you tried and what the problem was.

Our maybe a switch followed by a trigger.

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