• Raspberry Pi
  • Pioneer VSX-94TXH
What I wanted to do
I have a Pioneer VSX-94TXH receiver that has served us well for a while. As part of my Home Automation project, I decided to check out how to control this receiver using the openHAB home automation software in combination with my latest toy, the Raspberry Pi (B+ model).

The Challenge
openHAB provides a binding for Pioneer receivers. Unfortunately, this does not seem to work for the VSX-94TXH model. I tried sending commands to it over my home network but without any luck. So I went looking for a different solution.

The Solution
The magic in this case turned out to be openHAB’s Serial Binding. This allows you to define a generic binding to a device connected via a serial port.
These were the steps I followed:
  • I hooked up my Raspberry Pi to the Pioneer receiver through an USB to RS-232 converter (something like this).
  • Issued the command below to try to find the port identifier that I should use
    dmesg | grep "ttyUSB" 
    Depending on how many different USB devices are registered, you may see multiple lines showing up. In my case, there was only one and showed that the port was “/dev/ttyUSB0”
    [   13.154549] usb 1-1.5: pl2303 converter now attached to ttyUSB0
  • Using the port identifier, I created an item in the openHAB “Items” file to define the receiver like this
    String AVR         "Receiver"    (Multimedia)    { serial="/dev/ttyUSB0" } 
  • Found a website with the RS-232 codes for Pioneer receivers and using the codes for my model, I set up a group of items and rules in openHAB.

    As an example, to be able to Mute and Unmute the receiver from openHAB, I set up an item

    Switch AVRMute			  "Mute"		
    and a rule that determines what command is sent to the receiver when the user toggles the Mute switch from the openHAB UI
    * Rule for Receiver Mute command

    rule "AVR Mute"
    Item AVRMute received command
    if (AVRPower.state == ON)
    sendCommand(AVR, "MO")
    sendCommand(AVR, "\r")
    sendCommand(AVR, "MF")
    sendCommand(AVR, "\r")
    postUpdate(AVRMute, OFF)

That’s it. Hopefully, the above should help you control any older receiver which can receive RS-232 commands and which you can connect physically to the Raspberry Pi.

Geek Topics

Share this Project