#Thread
1 messages · Page 1 of 1 (latest)
That doesn't seem to work
This is my flow:
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
This gives back these debug messages:
26/1/2023 20:59:36node: debug 2
msg.payload : string[170]
"SER=0009a7<br>↵TS=1674763149<br>↵TS_R=174168<br>↵PRES=0<br>↵HR=0<br>↵HR_DM=0<br>↵RR=0.0<br>↵RR_DM=0<br>↵ACT=0<br>↵ACT_DM=0<br>↵FW=t120 v2.2.1↵<br>↵END=1<br>↵"
Then the Presence value seems to be gone
"SER=0009a7<br>↵TS=1674763612<br>↵TS_R=174631<br>↵0↵HR=0<br>↵HR_DM=0<br>↵RR=0.0<br>↵RR_DM=0<br>↵ACT=0<br>↵ACT_DM=0<br>↵FW=t120 v2.2.1↵<br>↵END=1<br>↵"
I replaced it with your config but still full output
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
try a fucntion node
const regex = /PRES=(\d+)<br>/;
const matches = msg.payload.match(regex);
msg.payload = Number(matches[1]);
return msg;