The project I am working on requires me to set the ID and channel data of a device.
Both are in HEX, I managed to get the ID data working fine but the channel data is an issue
becaue its a 16bit hex value
Node Red is viving me "/wAAAAAA"
And it should be "AP8AAAAAAAAAAAAA"
This is how im doing it in the function
let buff = new Buffer([0x00FF,0x0000,0x0000,0x0000,0x0000,0x0000]); let base64data = buff.toString('base64'); msg.payload.data = base64data;
Im assuming the reason for this is that the buffer is only 8bit and it needs to be 16bit?