Docker install on Synology : how to create use with no home and no shell

:+1:
Glad you got it working

Sorry, not sure if I can be of any help here.
Iā€™m not a developer and not really familiar with the LSP.
For me it looks like the communication to the LSP canā€™t be established.

What exactly are your VSC settings for the openhab section?

Here is a summary how Iā€™ve got my EnOcean USB310 stick to run on my Synology/Docker setup:

First I had to create a start up script for my Synology to load some additional modules, as described here:

sudo vi /usr/local/etc/rc.d/startup.sh

The content is:

sudo insmod /lib/modules/usbserial.ko
sudo insmod /lib/modules/ftdi_sio.ko
sudo chmod 777 /lib/modules/usbserial.ko
sudo chmod 777 /lib/modules/ftdi_sio.ko

Change rights of startup.sh:

chmod 700 /usr/local/etc/rc.d/startup.sh

Next I had to add an additional rule, for renaming the tty device and for setting the required privileges as described here. First I though I could skip this step. But setting the right privileges was necessary because the rights of the host system got passed over to the container.

I created

/lib/udev/rules.d/55-usb-enocean.rules

with the following content:

SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="usbEnocean", MODE="0666"

The USB vendor and product ID I found with lsusb:

|__usb1          1d6b:0002:0404 09  2.00  480MBit/s 0mA 1IF  (Linux 4.4.59+ xhci-hcd xHCI Host Controller 0000:00:15.0) hub
  |__1-2         0403:6001:0600 00  2.00   12MBit/s 90mA 1IF  (FTDI FT232R USB UART AL05792Y)

Than I had to modify my docker-compose.yml :

[...]
EXTRA_JAVA_OPTS: "[...] -Dgnu.io.rxtx.SerialPorts=/dev/usbEnocean"
[...]
devices: 
      - "/dev/usbEnocean:/dev/usbEnocean"

Finally I had to set the path property of the EnOcean Gateway thing.

/dev/usbEnocean

Can anyone give a newbie guide on how to enable write priviledges to VSC for the conf files when OH is installed as a docker in synology?

How do you access the conf folder with vsc? Via smb?

Here is what worked for me:
Open FileStation and go to your conf folder. Right click and select properties. Now you can change the permissions of the folder. Make sure the user you use to mount the share has write access.

I use winscp , (which I have root access) and just edit with notepad+. But I wish to have the VSC functionality.

Ok. I will try to change the folder permissions. Thank you.

Update: Hmm I changed the permissions to allow read and write on the conf folder and sub folders but VSC still does not allow me to save changes

Ah, winscp = Windows + FTP, right?
Iā€™m using Linux and smb to access my Syno. Not sure how to set up the privileges on a Windows host. For which user have you allowed read and write on the conf folder? An admin user? Maybe you can discribe a little bit more detailed what you did to mount the network share or post a screen shot of the folder permissions.

Hi guys,

Iā€™m delving into the world of docker / OH on my synology and have read and digested as much info as I can take I think.

Iā€™ve followed the various instructions and seem to have a working docker with OH, I can web browse to paper ui etc and also VSC into the openhab folder so I can start adding a few bits but itā€™s also opened up a load of questionsā€¦

  1. when I SSH into my syno, I assume I have to cd into the appropriate folder if I want to do anything at command level or do I need to do something else - Iā€™ve noticed the terminal option on the docker???

  2. my CONF folder is empty, ie no folders for html / items / rules etc. Do I just need to add these manually or does this mean my install didnā€™t go to plan?

  3. if I was to run a live and a test docker of OH, is it easy to duplicate / replicate the settings from one into the other?

Thanks in advance.

Depends on what you want to do on command level. Are you talking about the normal shell of the Linux system to e.g. move files? Or are you talking about the openhab Karaf Console?

OH Karafā€¦sorry, should have explained that a little more.

To connect to Karaf you donā€™t have to ssh into your Synology but just directly into the openhab console.

Should be something like this

ssh -p 8101 openhab@<ip-of-your-syno>
1 Like

Great thanks.

Did your install set up all the rules and items etc folders or do I need to do that, I used openhabian on my original set up on the pi and it was a while ago now so I canā€™t remember what is supposed to happen from scratch.

I also canā€™t remember if I had to do this manually or not :joy:

I would just start the container and check if it runs and the folders are created. If not create them manually

Hi all,

Iā€™ve gone and set up a docker with OH in, pretty much folliwing the example in post 6 from @hannibal29, and that part seems to be fine, Iā€™ve got a container with OH 2.4 running, so far so good.

Iā€™ve had to manually add the items / rules / sitemaps etc folders within the conf folder, no biggie here either.

But something just doesnā€™t seem right, I canā€™t ssh into the karaf console directly via putty, try as I might. I have to log into the syno and then log into OH, this works but I feel itā€™s not right.

Iā€™ve gone to ip of syno:8080 and chosen standard, I now have the paper and basic UI. The paper ui, I have installed a few bindings and Iā€™ve added a few things from the inbox but whenever I create an item, rule, or a sitemap it doesnā€™t work. The sitemap is just a c&p from my working pi and on the syno I get the default

It seems like you have not defined any sitemaps yet. To build one, please check the documentation for guidance.

Which I know I already have, and items files donā€™t seem to link in with items on the paper UI, thereā€™s nothing on the ā€˜controlā€™ part if the paper UI and rules donā€™t seem to fire.

Thatā€™s all before I mention that I canā€™t seem to find the logs anywhere to be able to see what is happeningā€¦

Have I got a dud build, am I forgetting some basic set up steps that Iā€™ve long forgotten, (I havenā€™t started from scratch for ages and when I have Iā€™ve used openhabian so itā€™s done some of the work for me), or am I trying to run before I can walk here?

Is it because Iā€™ve got 2 instances of OH running on my network, a pi with openhabian and this docker, are they conflicting?