Remote serial control of a projector
I have a projector that I plan to mount on the ceiling of my living room. While it has a remote control, it would be fantastic to tie this into a home automation system so that I can push a single button to dim the lights, turn on and set up the stereo receiver, and turn the projector on.
The projector has a serial input for control, but wireless serial adapters cost a couple of hundred dollars, way more than I am willing to spend for this. But fortunately, USB to serial adapters are less than $10 and an Omega and mini dock give me wifi and a USB port!
I used a TrendNET TU-S9 USB to serial adapter as I happened to have it already. The kernel module was already present on the Omega, so as soon as I plugged it in I saw the device at /dev/ttyUSB0. From there it was just a matter of scripting out the control codes based on the projector manual.
I did need to install the coreutils-stty package on the Omega to get access to stty (to set the baud rate for the serial connection -- "stty -F /dev/ttyUSB0 115200" -- as it defaulted to 9600 where the projector needed 115200). I could probably get around this by using Python or another environment to access the serial port, but as I just needed to send hex strings and because I'm lazy, I wrote a shell script to do it.
Next up will be connecting this into OpenHAB so that I can centralize control of the projector with my lights, stereo, etc. And probably finding some lower profile cables and a nice case when I mount it to the ceiling
A picture of the daisy chain of connectors is below and the shell script is on my github: https://github.com/mccollam/VSControl
@fader That's such a cool project! You should totally make an App that gives you the remote control interface on your smartphone. What kind of stuff can you control using the serial interface?
@Boken-Lin Yeah, I think a web interface (or at least a REST interface) is the next step, once I have a few hours to play with it. It shouldn't be much to do. After that I might look into integrating it with something like OpenHAB.
It turns out through the serial interface you can control basically everything about the projector -- power, input selection, even things like adjusting keystone or gamma correction. (It's several pages worth of hex strings and associated commands in the manual. Some of them I'm still not sure what they do and will have to play with to see!) At a guess it's intended for industrial or commercial applications where the projector would be mounted somewhere you couldn't get to the controls (hidden in a wall or ceiling for example) but it's still quite useful for my purposes.
Also, looking back at the picture it's absolutely hilarious to me that the Omega is smaller than the serial connector I'm plugging into the projector!
@fader Now that I'm thinking about it, I think this can be super useful (in addition to being super cool). When giving a presentation, for example, it would be very convenient to have an app that allows you to not only go back and forth between the slides, but also adjust brightness, focus, input sources, etc. on the projector. Later down the line maybe even adding a servo to move the projector itself, lol.
Yeah, @Boken-Lin there are definitely some more advanced uses I could put this to. I've actually built out a nice remote control interface that works with not only the projector but with my stereo receiver and the Philips Hue lights I have in that room -- one button to dim the lights, turn on the projector, and set up the audio.
If I can ever get out from under the mountain of work I've got at my paying gig I'll write up more details about it and maybe try to do a tutorial for others interested in something similar. Thanks for the ping here to remind me to work on that some more!
I posted a bit more detail about the system and how I built everything over at my blog. It's not a full blueprint for what I built but gives a few small samples of code and the overall architecture. I'm happy to answer questions or go into more detail if anyone is interested!
Kit Bishop last edited by
@fader Looks really good. Well done