How to user Serial RS232 to control JVC DLA-RS600 Projector

I want to be able to control my projector over Serial. I have the PDF from JVC on what the codes are to control the Projector. I’m just not sure where to start in HA. I don’t see a generic Serial component and I don’t see a JVC component. Is “Command Line Switch platform” my best option?

Is my command something like “command_on: /dev/ttyUSB0 “some connection and command string””

Anyone know of other example I can work from?

thanks in advance!

I saw these (3) python packages and thought they may be useful for this when I was ready to get Projector in HA.
maybe to build a component



my apology for off topic. I know your are looking for command line component help but thought they may be useful to you as well.

I was struggling the same in order to make my HA to connect to my old burglar alarm system. After having managed to set up RS232 interface in my RPi3 first, with following configuration and python code I managed to send a command to my box via RS232 and get the reply back to HA to see those as sensor values on my UI.

configuration.yaml:

sensor:
  - platform: command_line
    name: Telecontrol S1
    command: "python /home/pi/.homeassistant/TC_S1.py"
    scan_interval: 120

python (sorry the code is not fully cleaned, but I hope you can get the idea):

TC_S1.py:

import serial
import sys
import time

replyArray = ["","","","","","","","","","","","",""]

endString = "TC543>"
send_string = "#s1?\n\r"
temp_string = ""

port_list = ["/dev/ttyS0", ]

for port in port_list:
    try:
        serialPort = serial.Serial(
            port = port,
            baudrate = 9600,
            parity=serial.PARITY_NONE,
            stopbits=serial.STOPBITS_ONE,
            bytesize=serial.EIGHTBITS,
            timeout=1
        )

        serialPort.flushInput()

        bytes_sent = serialPort.write(send_string)
        maxReplies = 40

        n = 0
        currentString = ""
        while currentString[:6] != endString:
            currentString = serialPort.readline()
            replyArray[n] = currentString
            n = n+1

        serialPort.flushInput()
        serialPort.close()

        temp_string = replyArray[1]
        print temp_string[0:-2]

    except IOError:
        sys.exit(1)

Hopefully this helps you forward, as I was myself struggling quite a lot to make this working.

Thanks. the jvc-remote might get me some basic simple commands. I would love to see a serial component to make this easy. Maybe I’ll try to submit a feature request. thanks

1 Like

I’m beginning to think I need to take some python classes. :slight_smile: Do you know how to send a serial command via the terminal. IE /dev/tty0 21,89,01,50,57,31,0a

That the hex codes needed to send for power on. I just don’t know how to formulate a complete string I can use in HA command line component.

thanks

If I get a chance I will test on my projector and send you example

Unluckily not; If I would then I would have taken that path myself. As the learning curve in using python was lower for me than figuring out how to use it via terminal I simply decided to take that path.

Anyone get serial command to JVC. Sadly I have forgotten how

Bit late, but for anyone still searching (as I did :slight_smile: )

Solution here

I moved projector control to Pi, so made this python service to communicate with projector via serial and HA via MQTT.
This is absolute minimum, so its implemented as on/off switch.
My projector is Pioneers rebranded version of JVC DLA-HD2.