Shell Command to send hex bits to a tcp port for serial control of Panasonic Projector

I’m trying to create a very simple button to turn on my projector. My projector has an RS-232 input that allows serial control. I have a Global Cache iTach IP2SL. This is all properly configured and has been tested and is confirmed working.

After reading several threads it looked like the easiest way to do this was with a shell command, so I tried the following:

shell_command:
  projector_on: echo -e -n '\x02\x50\x4F\x4E\x03' | nc 192.168.1.22 4999

along with a simple button card to call the command.

type: custom:button-card
name: Projector On
tap_action:
  action: call-service
  service: shell_command.projector_on

Problem is, this doesn’t work and I don’t really know why. The hex commands do work and have been confirmed in two different terminal programs, so I am at a loss.

I’ve seen others use this exact method, the only difference here is instead of sending to a USB serial device, I am sending to a tcp port.

Obviously new at this, but any help would be appreciated.

Thanks

Hello,
i have worked on two solutions how to control an Acer projector.

One solution is via a USB-to-RS232 interface cable connected to the Home Assistant server USB port. This includes the use of shell commands.

The other solution is based on a ESP8266 WiFi-to-Serial module.

See more details on the GitHub repository:

GernotAlthammer/HA-ESPHome-ACER-X1261-WiFi: ESPHome code for projector ACER X1261 controlled via RS232 interface