Sure, but I was mistaken about the rest commands. It is actually switches I used but I’m sure you could Rest as well
> arcam_decode_plii_movie:
command_on: 'echo -e "\x50\x43\x5f\x34\x31\x30\x0d" > /dev/ttyUSB0'
arcam_decode_plii_music:
command_on: 'echo -e "\x50\x43\x5f\x34\x31\x31\x0d" > /dev/ttyUSB0'
arcam_decode_pliix_movie:
command_on: 'echo -e "\x50\x43\x5f\x34\x31\x33\x0d" > /dev/ttyUSB0'
arcam_decode_pliix_music:
command_on: 'echo -e "\x50\x43\x5f\x34\x31\x34\x0d" > /dev/ttyUSB0'
arcam_decode_neo6_cinema:
command_on: 'echo -e "\x50\x43\x5f\x34\x31\x37\x0d" > /dev/ttyUSB0'
arcam_decode_neo6_music:
command_on: 'echo -e "\x50\x43\x5f\x34\x31\x38\x0d" > /dev/ttyUSB0'
The command I send is based on a the serial format for Arcam and I had to refer there for the details.
For sending volume changes, I use the shell command
> /bin/bash -c "echo -e -n a='\x50\x43\x5f\x30\x31\x{{ '%0x' | format( states.input_number.arcam_volume.state | int + 0x30 ) | string }}\x0d' > /dev/ttyUSB0"
For responses I use Node Red as I haven’t found a method of receiving responses via HA.
> [{"id":"537ff01a.d5694","type":"tab","label":"Arcam Serial","disabled":false,"info":""},{"id":"44db0922d68e743c","type":"serial in","z":"537ff01a.d5694","name":"Arcam","serial":"9b6c3c03.9253f","x":110,"y":640,"wires":[["069ade71dffbeb06","7dfadfb3b9d2d04b","a886b1ec6801ec26","0e76b3690275815c"]]},{"id":"f4409487.fa405","type":"function","z":"537ff01a.d5694","name":"Convert volume to actual level","func":"let data = [...msg.payload]\ndata = data.map(hex => parseInt(hex));\ndata[6] = data[6] - 48; // or 0x30 or \"0x30\"\nmsg.payload = data;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":480,"wires":[["5a12ef2665f015c4"]]},{"id":"5a12ef2665f015c4","type":"ha-entity","z":"537ff01a.d5694","name":"Send volume to HA","server":"cbd47e7957cb4d83","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Volume"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:volume-equal"},{"property":"unit_of_measurement","value":"dB"},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload[6]","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":910,"y":480,"wires":[[]]},{"id":"069ade71dffbeb06","type":"switch","z":"537ff01a.d5694","name":"Check volume command","property":"payload[3]","propertyType":"msg","rules":[{"t":"eq","v":"0x2f","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":290,"y":480,"wires":[["f4409487.fa405"]]},{"id":"a886b1ec6801ec26","type":"switch","z":"537ff01a.d5694","name":"Check source input","property":"payload[3]","propertyType":"msg","rules":[{"t":"eq","v":"0x31","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":310,"y":680,"wires":[["1f89e1860f9973da"]]},{"id":"7dfadfb3b9d2d04b","type":"switch","z":"537ff01a.d5694","name":"Check display","property":"payload[3]","propertyType":"msg","rules":[{"t":"eq","v":"0x2b","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":320,"y":600,"wires":[["e882bdf78af02669"]]},{"id":"0b7236e323df4bdb","type":"switch","z":"537ff01a.d5694","name":"Check analogue or digital","property":"payload[4]","propertyType":"msg","rules":[{"t":"eq","v":"55","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":310,"y":760,"wires":[[]]},{"id":"126b50998dd5d87c","type":"function","z":"537ff01a.d5694","name":"function 1","func":"var rawData = msg.payload.toString(); // Convert the buffer to a string\n\n// Check if the received data is 8 characters long\nif (rawData.length === 8) {\n // Split the string into pairs of two characters\n var hexValues = rawData.match(/.{1,2}/g);\n\n // Convert each pair from hexadecimal to decimal\n var parsedData = hexValues.map(function (hex) {\n return parseInt(hex, 16);\n });\n\n // Subtract 0x30 from the 7th sensor value\n if (parsedData.length >= 7) {\n parsedData[6] -= 0x30;\n }\n\n // Convert values to ASCII characters\n var asciiData = parsedData.map(function (decimal) {\n return String.fromCharCode(decimal);\n });\n\n // Send data to separate Home Assistant sensors\n for (var j = 0; j < asciiData.length; j++) {\n // Prepare individual sensor payload\n var sensorPayload = {\n payload: asciiData[j],\n topic: \"homeassistant/sensor/sensor\" + (j + 1) + \"/state\"\n };\n\n // Send sensor data to Home Assistant\n node.send(sensorPayload);\n }\n} else {\n // Handle error when the received data is not 8 characters long\n msg.payload = 'Invalid data length';\n node.error(msg.payload);\n}\n\nreturn null;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":200,"wires":[[]]},{"id":"e882bdf78af02669","type":"ha-entity","z":"537ff01a.d5694","name":"Send display value to HA","server":"cbd47e7957cb4d83","version":2,"debugenabled":true,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Arcam Display"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload[6]","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":930,"y":580,"wires":[[]]},{"id":"1f89e1860f9973da","type":"ha-entity","z":"537ff01a.d5694","name":"Send input to HA","server":"cbd47e7957cb4d83","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Arcam Input"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload[6]","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":910,"y":680,"wires":[[]]},{"id":"0e76b3690275815c","type":"switch","z":"537ff01a.d5694","name":"Check volume change command","property":"payload[3]","propertyType":"msg","rules":[{"t":"eq","v":"0x30","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":320,"y":540,"wires":[["f4409487.fa405"]]},{"id":"9b6c3c03.9253f","type":"serial-port","serialport":"/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_00000000-if00-port0","serialbaud":"38400","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"0xd","bin":"bin","out":"char","addchar":"","responsetimeout":"10000"},{"id":"cbd47e7957cb4d83","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]
It’s complex but just about works. The key thing is understanding the format your serial port uses and I can’t help you with that, I’m afraid.