This page last changed on May 03, 2015 by frand.

Hi everyone,

I struggled a few days in setting this up, so I thought to spare some of the pain from anyone else looking to do the same.
The installed projector used to be a Sanyo Z2000, and while it was somewhat straightforward to control using OpenRemote Telnet commands piped through a utility called socat, I was not so lucky with the HW40ES because it was far pickier with its serial port settings, and my expertise was not sufficient to insure the control codes passed through TCP/IP -> Serial conversion without being corrupted.

The new solution is technically simpler.

Please note the caveat that while the solution works, it's the result of a few days of trial and error, so people who actually know what they're doing are welcome to chip in!

The Hardware

  • Sony VPL-HW40ES projector
  • Raspberry Pi 2 running OpenRemote 2.1.1
  • No-name USB-to-Serial adapter (identified by the OS as a pl2303 converter)

The Setup Overview

  1. Configure your USB Serial port in rc.local
  2. Create shell scripts for individual projector commands
  3. Set up Shell Execution Protocol commands in OpenRemote designer
  4. Sync and enjoy

1) Serial port setup

Add the following line to your /etc/init.d/rc.local

stty -F /dev/ttyUSB0 38400 min 1 time 5 parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

This configures your USB serial port at boot for the projector's protocol: 38400 bps, even parity, one stop bit etc.

2) Projector Control Commands

Here is at least one document for the control codes, check with your retailer if they can provide an excel sheet with these in a more legible form.

For this example, there'll be just two control codes, Power On and Power Off.

Create a file by the name and type in the following:

echo -en '\xA9\x17\x2E\x00\x00\x00\x3F\x9A' > /dev/ttyUSB0
echo -en '\xA9\x17\x2E\x00\x00\x00\x3F\x9A' > /dev/ttyUSB0
echo "OK"

Remember to set the shell script to be executable by: chmod +x ./

Note, the Power On -command is special in that the projector requires the command to be sent twice.

echo -en '\xA9\x17\x2F\x00\x00\x00\x3F\x9A' > /dev/ttyUSB0
echo "OK"

I've added the OK echo for debugging purposes.

At this point you can test your serial connection by running the scripts from the command line. If your projector turns of when you execute then everything's good so far.

3) Commands in OpenRemote

The only thing to concern about is just the location of your shell scripts. For this example they're located in the pi default user home folder.
So then:

  • Create a new device for your projector, then add a new command
  • Name: Sony Power On
  • Choose Shell execution protocol from the protocol pull-down tab
  • Path: /home/pi/

Followed by a second command for Sony Power Off.
Next up is setting up buttons for the commands, but I won't go through that here.

And that should be it.

Document generated by Confluence on Jun 05, 2016 09:34