Hi all - Apologies in advance as I am new to Node-Red and this may be an easy fix, but after multiple attempts I cannot seem to find the fix.
I am using node-red version 2.1.3.
What I am trying to do is pull data into node red from MQTT.
Once the data arrives I am identifying two separate figures. One being current time and the other being time since last motion was detected.
What I want to do is subtract time since last motion, from current time.
Within my function node, this is what I have most recently tried;
msg.payload = msg.payload - msg.payload.tslm; return msg;
The debug node gives me the output of 'NaaN'
Any help or guidance would be greatly appreciated.
Thanks in advance!