Resent last correct value if actual value was incorrect

Hey Node-Red-Users,

as shown here iam filtering out wrong data, but is it possible to resent last correct value if the second filter blocks an wrong value?

You can use a Trigger node to repeat the last message at regular intervals if that is sufficient.

Ok, and how must be the configuration?
It only should resent last msg if the actual msg is blocked because the msg is incorrect.

I am surprised how quickly you looked through the trigger node help and experimented with it to see how it performs. If I did not know the node I think it would take me at least 30 minutes to do that.

My problem is that iam not seeing how this node will take my last correct value and resent it only if one incorrect was filtered?

I see that these node can reapeat by time but this isnt what iam looking for, or i missunderstood this node.

If you put it after the filter node in your original thread then the messages it receives will be only the correct value messages. If the messages are arriving at the filter node at a regular interval, possibly 10 seconds for example, then if you set the trigger node to resend every 10 seconds then it will fill in the gaps. In fact probably best to set it to a fractionally longer time than 10 seconds so you don't end up with two messages coming out close together (one from the trigger node and one the new value coming in from the filter.

And the msg will change if the filter sends a new correct value?

Have you tried it with an Inject node, a Trigger node and a debug node to see how it performs? We are unpaid volunteers here, it is not reasonable to ask us to spend our time answering questions that you could answer yourself with a few minutes testing.

Can I ask why you want the repeating data? I thought you were writing this to a database, and there is little point filling a db with repeated data.

Sometimes the gaps are to big if iam looking with more detail on my data.
E.g if iam specify 1 hour that i want to look at iam only having 2 or 3 points.
This is because my Electricity-Meter only outputs a correct value arround every 40 seconds.
So i want to repeat the last correct value to fill the gaps between the data.
Atm iam trying to find a solution for it without messing up my database^^

On my system I do not bother storing the running total usage. I just store the current power and use influx to calculate the usage over any period that I am interested in. So if I want the total usage over the last month, for example, I run a query which integrates the current value data to give the total over that period (or a running total throughout the period if I want to graph it, for example).