Hi there,
I am quite new to Node-RED but very excited! Based on this forum I have been able to send a HEX command over TCP to my Husqvarna Automower - and received an answer as a buffer. So far so good. However - now I am stuck at converting the buffer back to a readable string.
The answer from the device is [15,54,189,0,0] and I would like to convert this to a readable string. I have tried a simple 3 step flow for testing this function:
-
Inject / msg.payload=buffer, content: [15,54,189,0,0]
-
function:
msg.payload = msg.payload.toString()
return msg; -
Debug
...returns something crazy: "6�"
Any suggestions how to convert the buffer back readable for humans?
Any help is highly appreciated, thank you and best regards, Christian