Optoma projector

Optoma UHD51 (without a!) has a web interface to control the projector. The variant with a for Alexa is able to be controlled via Alexa or Google so maybe this variant without a with Home Assistant?

I myself managed to get my Optoma UHD51A controllable by HA using the telnet interface.
Most Optoma projectors, with networking and the WebUI, seems to have telnet enabled by default so this should work for yours as well.

Short guide to get started:

On my HA machine (RPi running Hassbian), I first installed netcat:
$ sudo apt-get update ; sudo apt-get install netcat

Then, downloading the manual for another optoma projector model containing RS232 Commands.

On Page 89, The same RS232 Commands in HEX seems to be unified among several (if not all) models.

Example:

HEX Power On: 7E 30 30 30 30 20 31 0D

Sending the hex using netcat with echo to the projectors IP-address and standard telnet port (23),
awakens it.

Example command sending the HEX above of “Power On” to my projector on IP 192.168.0.99:
$ echo -n -e "\x7e\x30\x30\x30\x30\x20\x31\x0d" | nc -q 1 192.168.0.99 23

You can add the commands as shell commands and you can build yourself a HA-Switch for power toggle.
I believe and hope that the telnet options can enable for a future development of a native Optoma component to HA.

Good Luck!

2 Likes

Hi, I’m trying to do the same with my UHD51A. Could you please share your switch config? Thanks.

Did you end up having any luck getting this to work with your projector?

edit: This is working for on and off, now for input switching…

switch:
  platform: telnet
  switches:
    projector:
      name: Projector
      resource: 192.168.1.45
      port: 23
      command_on: "\x7e\x30\x30\x30\x30\x20\x31\x0d"
      command_off: "\x7e\x30\x30\x30\x30\x20\x30\x0d"
      timeout: 0.9

This is what I ended up doing, just to turn on and off. I did not need to change inputs, but I guess you can use the same protocol for that:

1 Like

this works beautifully for me. I can now switch input and see the state for the projector, everything I need! Thanks!

Fyi, practically the same setup worked for UHD380X, with an addition to be able to see state:

- platform: telnet
  switches:
    projector:
      name: Projector
      resource: 192.168.x.x
      port: 23
      command_on: "~0000 1\r"
      command_off: "~0000 0\r"
      command_state: "~00150 1\r"
      value_template: '{{ "Ok1" in value }}'
      timeout: 1.0
1 Like

Very interested in seeing how you change the inputs etc… is that also set in the switch yaml too?

Thanks, this works for my UHD51A as well!

I’m trying to setup my projector with the telnet integration, but the state is not working for me.
I tried the same config as agios, but I get the following error message:

Empty response for command: ~00150 1

The on/off commands work if I remove the command_state configuration line.

And I just confirmed that the projector returns the state string when receiving the ~00150 1\r command via telnet in my windows shell with the telnet command. (I get OK10003108C00426 back).

Is there anyone to debug in more details what is going on with the telnet commands in Home Assistant?

Can you post your exact config? Is it completely identical?

Also, I would probably uppercase the K in Ok1 in your case, my projector returned a lowercase K

It’s possible to use the RS232 codes (e.g. for Optoma zh406 https://www.optomaeurope.com/ContentStorage/Documents/d6f486ce-d13d-44d4-83f9-71a6bf010570.xlsx)

  • “~0012 1\r” Sets input source to HDMI 1
  • “~0012 5\r” -//- VGA 1
  • “~0012 10\r” -//- (S-video?)
  • “~0012 15\r” -//- HDMI 2

EDIT: Dirty a bit, but works

switch:
    - platform: telnet
      switches:
        optoma:
          name: optoma
          resource: 10.x.x.x
          port: 23
          command_on: "~0000 1\r"
          command_off: "~0000 0\r"
          command_state: "~00150 1\r"
          value_template: '{{ "Ok1" in value }}'
          timeout: 1.0
        optomasource:
          name: optoma_Source
          resource: 10.x.x.x
          port: 23
          command_on: "~0012 1\r"
          command_off: "~0012 15\r"
          value_template: '{{ "Ok1" in value }}'
          timeout: 1.0

I created a script for source switch to have it as entities (optoma_hdmi1, optoma_hdmi2)

Maybe you guys can help me. I have an Optoma UHD51A. I can turn it off and on from my phone through HA and it updates the status and works great. If I try to create a scene that turns it on, it doesn’t work. Any Ideas? Here is my yaml

# Projector
switch:
  - platform: telnet
    switches:
      projector:
        name: Projector
        resource: 192.168.1.16
        port: 23
        command_on: "~0000 1\r"
        command_off: "~0000 0\r"
        command_state: "~00150 1\r"
        value_template: '{{ "Ok1" in value }}'
        timeout: 1.0

Here is the scene yaml

    switch.projector:
      friendly_name: Projector
      state: 'on'

So, I can shut it off with a scene no problem, I just cant turn it on. Turning it on through HA is hit and miss though the dashboard. Sometimes it works, other times it doesn’t.

This worked nicely for a UH ZH406 projector! Thanks everyone.

Sorry,

This is a dumb question because I am new to HA but can I not simply past the above code into my Configuration.yaml folder to make this work with my Optoma projector. When I paste it I get an error?

duplicated mapping key (91:1)

88 |
89 | # Optoma Projector 192.168.2.12
90 | # Projector
91 | switch:
------^
92 | - platform: telnet
93 | switches:

Alan, your code worked perfectly for my Optoma UHZ65. Note: I had to put the projector power mode into “active” mode to be able to turn it on from HA. Your post saved me tons of time. Super easy to put this into configuration.yaml with my projector’s static IP, restart and it worked! I was already running Terminal in HA so I didn’t have to make any OS level changes.

This worked for my UHD65lv once I used “OK1” instead of “Ok1”. Thanks for sharing!

Might be a bit late, but it seems like, you already have the “switch” key used somewhere in your config.
You need to paste the code beginning with the line “-platform: telnet”, into you already existing “switch” section in your config. Then it should work :slight_smile:
You cant have 2 similar named sections in your config!
Also pay attention, that you have the correct indentation!