Openhab on Synology

PreRequisite :        2

Installation        2

Install Synology Docker.        2

Install OpenHab Docker Image        3

Connect to your Synology server with SSH as root        3

Setup User & Folder        3

Install and run the openhab docker image        3

Perform the OpenHab initial setup        4

Sony Beamer        4

OpenWebNet BTicino Binding        6

Enable Eclipse IOT Marketplace        6

Install the OpenWebNet Binding        6

Install the OpenWebNet dependencies using the openhab OSGi console        7

Configure F454 Bus        7

Other info        8

Set debug logs on openwebnet binding        8

Connection a openhab from outside from home        9

Internet box network settings        9

SSH connection        9

Connect to the OSGi Console        9

List Bindings        9

Tail logs        10

Find the IP of the OpenHab Container        13

PreRequisite :

You should know the following :


Install Synology Docker.

From the Package Center, search & install docker :

Install OpenHab Docker Image

References :

Connect to your Synology server with SSH as root


ssh root@NAS_IP

Or use putty on windows

Use putty.exe

Setup User & Folder

Copy paste each of the following command

#add a user & group for openhab

useradd -r -s -u 9001 /sbin/nologin openhab

usermod -a -G -g 9001 openhab openhab

#create folders for openhab

mkdir -p /volume1/docker/openhab/conf

mkdir  /volume1/docker/openhab/userdata

mkdir  /volume1/docker/openhab/addons

#set the correct rights on the folder

chown -R openhab:openhab /volume1/docker/openhab

Install and run the openhab docker image

docker run \

        --name openhab \

        --net=host \

        -v /etc/localtime:/etc/localtime:ro \

        -v /etc/timezone:/etc/timezone:ro \

        -v /volume1/docker/openhab/conf:/openhab/conf \

        -v /volume1/docker/openhab/userdata:/openhab/userdata \

        -v /volume1/docker/openhab/addons:/openhab/addons \

        -d \

        -e USER_ID=9001 \

        -e GROUP_ID=9001 \

        --restart=always \


Upgrading your existing installation

docker stop openhab

docker rm openhab

Update the version (2.5.0 to 2.5.1 for exemple) in the script here

Perform the OpenHab initial setup

Connect to http://IP_OF_YOUR_NAS:8080

And complete the initial setup :

I’ve setup the binding for Philips Hue, my beamer and AV prior to setting up OpenWebNet Bticino.

Sony Beamer

Pioneer AV

Philips Hue

OpenWebNet BTicino Binding

Resources :

Enable Eclipse IOT Marketplace

Go to “Add-Ons”, “Misc” and install “Eclipse IoT Market”

Install the OpenWebNet Binding

Wait a few dozen of seconds after installing Eclipse IoT Marketplace and search


Click Install

Install the OpenWebNet dependencies using the openhab OSGi console

Connect to the OSGi Console and type two the following commands

feature:install openhab-core-io-transport-upnp

feature:install openhab-transport-serial

It should take a few seconds to execute and each return silently

Configure F454 Bus

Go to Inbox, you should see the following :

Click the blue button, the following window will appear :

Click “Add as Thing”

The Inbox will be updated with all your light switch & other stuff

You should see :

Automation : Roller shutter / blind / (store / volet roulant en francais)

Switch : your light switchs

Thermotstat : the temperature measuring stuff

Energy Central Unit : probably where you can configure room temperature

Add your roller shutter, it will be available in the “other” room.

Test each to know which is which, and rename them accordingly with the name of the correct room

Other info

Set debug logs on openwebnet binding

Connect to the OSGi Console and type the following command

log:set DEBUG org.openhab.binding.openwebnet

log:set DEBUG org.openwebnet

Connection a openhab from outside from home

Internet box network settings

On your internet box, setup a port forwarding :

(internet) port 4888


IP_OF_YOUR_NAS port 22

SSH connection from a Mac/Linux box

Connection to your Synology NAS in SSH with a Tunnel to access OpenHab web interface  :

/usr/bin/ssh -o TCPKeepAlive=yes -o ServerAliveInterval=10 -o ServerAliveCountMax=6 -p4888 -L7080:IP_OF_YOUR_NAS:8080 root@YOU_PUBLIC_IP


On windows you can use Putty to define port forwarding.

Connection from Android with the Mobile App

Setup Steps :

  1. KeyChain-> + -> Generate key: set name, type RSA, set a passphrase and check “save passphrase”
  2. Host -> + ->
  1. Name:  Nas (your synology server)
  2. Hostname or IP : your Nas public IP (your box must make a port forwarding to your nas)
  3. Check SSH
  4. Sepcify the port you set on your internet box for port forwarding
  5. Username :  a valid Nas user
  6. Key : use the Key created in step 1
  1. Port Forwarding -> + ->
  1. Label: openhab
  2. type: locale rule
  3. host from: Nas
  4. port from : 7080
  5. Host to: Your OpenHab IP
  6. Port to: Your OpenHab port : 8080
  7. Last field: (to allow only your android phone to use this port forwarding)

Usage Steps :

  1. Go to Port Forwarding, and activate the port forwarding rule we’ve created by clicking on it
  2. Go to Host to connect to your Nas

In the OpenHab Application:

Go to Settings,

Local :

  1. Your local IP address of your OpenHab install :

Remote :

  1. The address must look like this :

The application will connect to your phone ( is always your own device local IP), and connect to 7080 port. Which is a port that is forwarded to your  openHab instance IP and port 8080 through the SSH connection.

Connect to the OSGi Console

docker exec -it openhab bash


Default password is habopen

List Bindings


Tail logs


Docker Env Variables

Find the IP of the OpenHab Container

Connect to http://IP_OF_YOUR_NAS:8080

Go to Configuration -> System, network settings


If the field is empty, click on the arrow, and select the only IP available, it’s the IP of OpenHab docker image.

OpenHab & Google Home

2.5.0 release