Sorry if this is a beginner question, but I have the following situation:
A KNX message is received everytime a binary switch changes its value, i.e. toggles between on and off. When displaying these on or off status in a dashboard line chart, obviously and correctly a saw-tooth pattern results, with diagonal lines between the 0 and the 1 state.
However, this does not reflect the binary nature and makes it difficult to immediately and intuitively see in which periodes the switch was on or off. What I want is a rectangular shape with a horizontal line at 1 for on and at 0 for off.
My thought was that I would simply need to add an additional data point each time a new state arrives. For example, the state is 0 since quite a time and a 1 is received, I would add a 0, so the line chart represents the old and the new 0 value and immediately after I would give the 1 resulting in the almost-vertical rise to state 1. Perfect representation of the switch values.
But how do I do this in NodeRed? I need a node that can create one additional message and passes on the original message very close after each other (otr maybe it works consecutive at the same time).