Oppo Roon Extension


(Maciej Biwejnis) #1

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:

/etc/rc.local

/usr/bin/swatch --config-file=/etc/swatch.conf --tail-file=/var/roon/RAATServer/Logs/RAATServer_log.txt --daemon

/etc/swatch.conf

watchfor /starting playback: now/
exec /root/oppo.py

/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.


Home Automation
(Danny Dulai) #2

@maciekb: you should be able to rewrite this Oppo thing as a proper Roon extension now… here is the Devialet one I wrote:

start here:


(Maciej Biwejnis) #3

In fact, I started to rewrite those scripts yesterday. :slight_smile:

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. :wink:

Best regards,
Maciek


(Danny Dulai) #4

Does the Oppo have a proper standby that does not power off the USB? Does the USB hiccup when you move away from the USB source?


(Maciej Biwejnis) #5

Unfortunately no. When it goes on standby, USB is disconnected. :frowning:
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?

Best regards,
Maciek


(Danny Dulai) #6

The extension uses the same discovery mechanism to speak to the core as RoonBridge and the remotes.

You can run that extension anywhere on your network.


(Maciej Biwejnis) #7

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?

Best regards,
Maciek


(Danny Dulai) #8

Depends on what serial access method you use.

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?

If you use a networked serial adapter, like http://www.globalcache.com/products/itach/ip2slspecs/, then your extension would speak via TCP/IP to it, so it does not need to be on the same device.

I wrote my Devialet thing using a directly connected port (usb or usb<–>serial adapter), so it must be run on the machine with the port.

There are advantages and disadvantages of going either way…

direct connection advantages:

  • you might have a serial port already, so nothing to buy
  • if you need a usb<–>serial adapter, its’ cheap… $15-$20 or so

direct connect disadvantages:

  • you must run extension on machine with port

network serial adapter advantages:

  • you can run anywhere

network serial adapter disadvantages:

  • $100+ adapter must be purchased.