[SOLVED] Serial Binding: How to send raw bytes?

I am useing my openhab2 to control a rgb led-strip controled by an arduino. So i want to send serial bytes with the colors. (e.g 0xff 0x00 0x00 for a red color). But openhab2 is just sending the bytes as ascii code. I have already tried sending it in unicode format(’\u1111\u0000\u0000’) no difference. Is there anything i can do? Thank you for your answers.

I don’t use the serial binding, but I guess that is possible when using the Base64 option. Of course you have to calculate the color code to Base64 before sending it, but you can use javax.xml.bind.DatatypeConverter to do this.

1 Like