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/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.
In fact, I started to rewrite those scripts yesterday.
For now, I have a problem with npm environment. I must install some recent distro for this or try to install npm under Windows. I’ll let you know when something is ready.
Unfortunately no. When it goes on standby, USB is disconnected.
I have successfully started extension on my laptop and discovered devialet extension from RoonServer, but I’m still tinkering with it.
For now, I have a question. Is it possible to control serial device via extension on RoonServer but connected to RoonBridge endpoint? Raspberry Pi in this case. I believe, that extension must be running on RPi?
Thanks, but I need clarification. I believe that extension is directly responsible to “talk” to a serial device? So, an extension must be running on a device with a physical connection to controlled device via serial port?
If you use a serial port or a usb<–>serial adapter, then yes, you need to have the extension be on the physical device as the serial port or the usb port – how else would you speak to the port?