Sorry if this is dumb question but I am very new to Home Assistant. I am trying to send RS-232 commands from Home Assistant to an HDMI Matrix using a USB to serial adapter to change inputs and outputs on the Matrix. I have found a few topics on something like this or at least similar enough and most of them say to use something like this:
echo -e -n “data to send here” > /dev/ttyUSB0
In my case I have added this code to the configuration.yaml:
shell_command:
output1_1: echo -e -n "@W 00 00 #" > /dev/ttyUSB0
I have verified my USB to serial adapter is in fact /dev/ttyUSB0 and I have even been able to get this to change my input on the HDMI Matrix when I type it directly into the terminal. However, when trying to use it as a button calling the shell command, nothing happens. When I check the logs I see this error:
Error running command: echo -e -n "@W 00 00
, return code: 2
Can anyone help me figure out what I am doing wrong? I am using the Generic x86-64 Home Assistant OS installed on an HP mini PC.
Home Assistant 2022.9.7
Supervisor 2022.09.1
Operating System 9.0
Frontend 20220907.2 - latest