I have 3 sensors to send data but I need that in case any stops sending data show a message in the dashboard for example when it is active show ON and when it is inactive show OFF, the ideia is create a alert message.
If you compare the current value with the previous one and if it is the same it is signal that the sensor is stopped and then it should send a message saying OFF but the current value is different from the previous one it should send message to say ON.
I have a Join node with this configuration
The platform i´m using is CompactRIO and Labview, the version of Node-Red is [v0.19.5], the sensors sending data every 10 seconds, i´m reading the data between topics of OPC UA (ex. ns=2;s=LM35), more or less the value of temperature is stable. I send the values to a database
and i need detect if the sensor is sending data or not sending data(like show a message ON or OFF
when one sensor stops sending data( in this case the LM335), in my database the value is undefined like this
For Dasboard i only need to show in dashboard a message (text) that says ON or OFF when the sensor is active (ON) or inactive (OFF), is that i want show in dasboard.
so the Trigger node should be able to tell you when you don’t get a value when you expect it.
A switch node should be able to separate that from a true value
and a change node will be bale then to change msg.payload to On
I would suggest you set up some triggers with different values and have a play
Not from the train on my phone!
Show us what you have done, you have all the pieces you need.
Start with the trigger node, configure it and attach a debug.
Confirm the messages in the debug, match what you expect.
I showed you in the other thread how to configure the trigger node to send On each time a good sample is received, and if the samples stop coming then to send Off.
You have the delay set to 500 milliseconds so it will send one then 0.5 seconds later it sends the other. You need to set the timeout larger than the normal time between samples.
Also you do not want to send ON or OFF to the Join node, that should still be connected direct to the sensor.