Crestron Room View projector control

Hi,
din’t really know where to put his topic, but I’ll try here.

I have an quite old Mitsubishi EW270U projector that only support Crestron Room View for controlling (not PJLink). I didn’t find any information about how this protocol works so I had a look at the network traffic and it was quite easy to find the different commands. So if you have this projector (or maybe another one using Crestron Room View) you can add the following in configuration.yaml to be able to turn it on and off using Home assistant (replace the IP with your projector IP address).

shell_command:
  projector_on: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x04\x00" | nc 192.168.0.123 41794 && sleep 5s'
  projector_off: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x05\x00" | nc 192.168.0.123 41794 && sleep 5s'
  projector_mute: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xfc\x13" | nc 192.168.0.123 41794 && sleep 5s'
  projector_unmute: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xfd\x13" | nc 192.168.0.123 41794 && sleep 5s'
1 Like

I tied to figure out some other commands as well, with below you could almsot replace the remote control.

configuration.yaml:

switch:
  - platform: command_line
    switches:
      sw_projector_mute:
        command_on: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xfd\x13" | nc 192.168.0.123 41794'
        command_off: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xfc\x13" | nc 192.168.0.123 41794'
        command_timeout : 10.0
      sw_projector_blank:
        command_on: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xee\x13" | nc 192.168.0.123 41794'
        command_off: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xef\x13" | nc 192.168.0.123 41794'
        command_timeout : 10.0


shell_command:
  projector_on: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x04\x00" | nc 192.168.0.123 41794'
  projector_off: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x05\x00" | nc 192.168.0.123 41794'
  projector_menu: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x1d\x14" | nc 192.168.0.123 41794'
  projector_enter: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x23\x14" | nc 192.168.0.123 41794'
  projector_right: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x21\x14" | nc 192.168.0.123 41794'
  projector_left: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x20\x14" | nc 192.168.0.123 41794'
  projector_up: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x1e\x14" | nc 192.168.0.123 41794'
  projector_down: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x1f\x14" | nc 192.168.0.123 41794'
  projector_unmute: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xfd\x13" | nc 192.168.0.123 41794'
  projector_mute: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xfc\x13" | nc 192.168.0.123 41794'
  projector_blank: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xee\x13" | nc 192.168.0.123 4179'
  projector_unblank: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xef\x13" | nc 192.168.0.123 41794'
  projector_source: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x6f\x17" | nc 192.168.0.123 41794'

An example how to add an “remote” to the UI - I’m using the virtual command_line-switches for mute and blank. I think that works although they might get the incorrect status if you also use the IR.

square: true
columns: 3
title: Projector
type: grid
cards:
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: call-service
      service: shell_command.projector_on
    name: 'On'
    icon: mdi:projector
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: call-service
      service: shell_command.projector_off
    name: 'Off'
    icon: mdi:projector-off
  - show_name: true
    show_icon: false
    type: button
    tap_action:
      action: toggle
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: call-service
      service: shell_command.projector_menu
      data: {}
      target: {}
    icon: mdi:menu
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: call-service
      service: shell_command.projector_up
      data: {}
      target: {}
    icon: mdi:chevron-up-box-outline
  - show_name: true
    show_icon: false
    type: button
    tap_action:
      action: toggle
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: call-service
      service: shell_command.projector_left
      data: {}
      target: {}
    icon: mdi:chevron-left-box-outline
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: call-service
      service: shell_command.projector_enter
      data: {}
      target: {}
    icon: mdi:checkbox-outline
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: call-service
      service: shell_command.projector_right
      data: {}
      target: {}
    icon: mdi:chevron-right-box-outline
  - show_name: false
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: switch.sw_projector_mute
    icon: mdi:volume-off
  - show_name: false
    show_icon: true
    type: button
    tap_action:
      action: call-service
      service: shell_command.projector_down
      data: {}
      target: {}
    icon: mdi:chevron-down-box-outline
  - show_name: false
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: switch.sw_projector_blank
    icon: mdi:checkbox-blank-off-outline

1 Like

Hello there,

What you did here is exactly what I was looking for, for a project ive been working on. I am however, having some issues implementing this. I am not new to home assistant but new to creating things inside of it. I added the switch and shell command code to the configuration.yaml thinking that was the correct place. When i press the button on the dashboard i get service XXX is unavailable. I tried to add it to scripts by both creating a new script or just includeing it inside of scripts both in code and !include xxx.yaml. When i try to create a script with the code i get

Message malformed: extra keys not allowed @ data[‘switch’]

Is there any help you could provide?

Hi!

Strange - could there be something with the code, something missing or so? One idea is to strip it down to just one shell_command for example and try to get that working.
And changes to configuration.yaml requires a restart (or if it’ enought with a reload).

I had a look at my configuration.yaml again, and for some reason I’m only using shell_command now. Can’t remember why but there were probably a reason.

shell_command:
  projector_on: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x04\x00" | nc 192.168.0.108 41794'
  projector_off: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x05\x00" | nc 192.168.0.108 41794'
  projector_menu: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x1d\x14" | nc 192.168.0.108 41794'
  projector_enter: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x23\x14" | nc 192.168.0.108 41794'
  projector_right: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x21\x14" | nc 192.168.0.108 41794'
  projector_left: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x20\x14" | nc 192.168.0.108 41794'
  projector_up: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x1e\x14" | nc 192.168.0.108 41794'
  projector_down: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x1f\x14" | nc 192.168.0.108 41794'
  projector_unmute: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xfd\x13" | nc 192.168.0.108 41794'
  projector_mute: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xfc\x13" | nc 192.168.0.108 41794'
  projector_blank: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xee\x13" | nc 192.168.0.108 4179'
  projector_unblank: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\xef\x13" | nc 192.168.0.108 41794'
  projector_source: 'echo -n -e "\x05\x00\x06\x00\x00\x03\x00\x6f\x17" | nc 192.168.0.108 41794'

I tried with just the shell I think but I’ll double check it was late last night. I appreciate the quick response I’ll report back.

I think i got it figured out. Have to take the Pi to church now and see if i can control the two projectors. Not getting service errors anymore tho. I big time appreciate the help and integration you have made here.