I have set up some sort of home automation for OPPO BDP-105. It has RS232 port and with Roon Bridge on my Raspberry PI2 it was really simple. I have used swatch software for linux to watch over the RAATServer_log.txt file and when specified string is found, it executes python script which turns on OPPO and set input to USB via RS232.
Below is my simple setup, for anyone who is interested:
/usr/bin/swatch --config-file=/etc/swatch.conf --tail-file=/var/roon/RAATServer/Logs/RAATServer_log.txt --daemon
watchfor /starting playback: now/ exec /root/oppo.py
#!/usr/bin/python import time import serial # configure the serial connections (the parameters differs on the device you are connecting to) ser = serial.Serial( port='/dev/ttyUSB0', baudrate=9600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS ) print "Powering device ON" ser.write("#PON" + '\r\n') out = '' time.sleep(1) while ser.inWaiting() > 0: out += ser.read(1) print out print "Setting input to USB" ser.write("#SIS 7" + '\r\n') out = '' time.sleep(1) while ser.inWaiting() > 0: out += ser.read(1) print out
You can do a lot more with RS232 and OPPO, all documentation is on their site.
I’ve used FT232RL USB to RS232 cable, similar to this.