Home Automation on Synology NAS

I am the proud owner of a Synology DS209j NAS. This NAS has firmware that allows much more than just storage. While I only wanted one computer on 2/47 in the house. I also wanted a home automation server. Unfortunately, the Synology NAS devices weren’t intended to be home automation servers. Therefore, a lot of modification has been required to get it to act as a home automation server. These next few posts have been up in the Synology forum for a while now, but I wanted to add my work to my own blog so please click ‘read more’ to expand this post…


I have a Synology DS209j, and I’ll always run the latest firmware.

I’ve installed Xubuntu 9.04 in a virtual machine on my mac.

Following this page:

There is a document:

Following the document I’ve downloaded the latest toolchain from Synology as well as the latest GPL source:

As far as usb to serial hardware goes, I am using this product from Parallax as it give you proper RS232 levels and is very affordable:

From that page I followed the link to the external FTDI drivers for linux.

I renamed the ftdi_sio header and c file to .orig and placed these new files in their location in the synology source. From their I followed the document and made the modules.

Now i’ve got usbserial.ko and ftdi_sio.ko somewhere on my DS209j

Now you have to load the modules into the kernel and create the devices:

insmod usbserial.ko
insmod ftdi.ko
mknod /dev/usb/ttyUSB0 c 188 0
mknod /dev/usb/ttyUSB1 c 188 1

Also, add some lines like these to /etc/rc.local to make it persistent over reboot:

insmod /volume1/archive/usbserial.ko
insmod /volume1/archive/ftdi_sio.ko
mknod /dev/usb/ttyUSB0 c 188 0
mknod /dev/usb/ttyUSB1 c 188 1

run the command ‘dmesg’ and you should see something like this:

usb 1-2.1: new full speed USB device using ehci_hcd and address 15
usb 1-2.1: configuration #1 chosen from 1 choice
ftdi_sio 1-2.1:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT232RL
drivers/usb/serial/ftdi_sio.c: Number of endpoints 2
drivers/usb/serial/ftdi_sio.c: Endpoint 1 MaxPacketSize 16384
drivers/usb/serial/ftdi_sio.c: Endpoint 2 MaxPacketSize 16384
drivers/usb/serial/ftdi_sio.c: Setting MaxPacketSize 16384
usb 1-2.1: FTDI USB Serial Device converter now attached to ttyUSB0

The X-10 device I got working for now is known as the Firecracker CM17a, and the HD11A/CM11A 2-way computer interface

This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to Home Automation on Synology NAS

  1. SP7DPT says:

    Hi, can You send to my email sp7dpt@gmail.com all drivers to FTDI?. I using Synology DS210j and DSM 2.3-1139 Linux DiskStation 2.6.24.

  2. Ondra says:

    hi, I want to solve a similar problem … see http://forum.synology.com/enu/viewtopic.php?f=66&t=26042 … can You send me to email bad@centrum.cz compiled driver ftdi for DS210J (same version as last comment – DSM 2.3-1139, kernel 2.6.24)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s