Using RS232 to control an Optoma projector

Well the sensor should log everything.

If you send the command from the cli in home assistant do you get a response?

No I don’t get a response in the SSH terminal within HA although I’m using the same echo command I used to send a command to the screen (with a different hex code) and I didn’t think echo commands showed responses…

Yeah ok.

Are there any terminals installed, picocom, minicom, socat?

If not you could try this:

echo -e -n '\x7E\x30\x30\x30\x30\x20\x31\x0D' > /dev/ttyUSB0 & cat -v < /dev/ttyUSB0

echo command cannot read back the response, check the thread I posted above. I think we discussed it there.

But its true that the sensor should read the response. However, despite what I sent, the sensor remains empty as for you

but I could read the responses with some utilities for hex commands, so the projectors sends back the response on the serial line

Which is why I added this on the end:

... & cat -v < /dev/ttyUSB0

It won’t help with your command, but I wanted to test if you are receiving anything in home assistant. It should redirect the received serial data to the screen.

I receive number of “F” on every row. So there is a development. Expected response should be “Ok1” for powered on “Ok0” for powered off

I get different responses each time i enter the command:

Try that using COOLTERM https://freeware.the-meiers.org/
The author, Roger, was in touch with me over an email and tried to figure out the command. We were not successful, probably due to my limited knowledge, however, I used the utility to be sure the command works as it should. It will shows you the proper returns. I will do the same and we can compare results

Hi, good job getting it done!

I want to do something similar, just for my LED strip.

But I am facing an issue: I want to control the LED strip with commands and need to send them through a serial port, I believe I have a problem with the baud rate, but I have no idea how to set it. Do you have any ideas?

I am running HAOS on an OnLogic CL210G-10.

This is my current config:

switch:
  - platform: command_line
    switches:
      serial_light:
        command_on: echo -n -e '["0666233948a0/led-strip/-/brightness/set", 100]' > /dev/serial/by-id/usb-0403_6015_bc-usb-dongle-r1.0-3e9437b9cd99-if00-port0
        command_off: echo -n -e '["0666233948a0/led-strip/-/brightness/set", 0]' > /dev/serial/by-id/usb-0403_6015_bc-usb-dongle-r1.0-3e9437b9cd99-if00-port0
        friendly_name: Serial Light

light:
  - platform: template
    lights:
      serial_light:
        friendly_name: "Tower Light"
        value_template: "{{ is_state('switch.serial_light', 'on') }}"
        turn_on:
          service: switch.turn_on
          target:
            entity_id: switch.serial_light
        turn_off:
          service: switch.turn_off
          target:
            entity_id: switch.serial_light