I installed OpenHab 2.3
How can I install:
Node-red?
Paper Log View?
sorry, i donât use either of those two.
Has anybody implemented delayed RULES logic (below) in their openhab2.service due to more than 1 startup rule firing when starting up OH2?
If so, Synology doesnât have âsystemctlâ nor can I find the âopenhab2.serviceâ file.
Running OH2.3, latest build for OH.
Any help would be grateful!
Best, Jay
My prefered variant
This is the most simple alternative, but just works with linux and systemd (e.g. openhabian). Thanks to @ptweety for this variant.
Simply create the file `/etc/systemd/system/openhab2.service.d/override.conf. This overrides the standard startup script where applicable.
If you are on stretch-based openhabian, you may use sudo systemctl edit openhab2.service
, otherwise you have to use sudo nano /etc/systemd/system/openhab2.service.d/override.conf
[Service]
ExecStartPre=-/bin/bash -c '/usr/bin/find ${OPENHAB_CONF} -name "*.rules" -exec /usr/bin/rename.ul .rules .rules_away {} \\;'
ExecStartPre=-/bin/bash -c '/usr/bin/find ${OPENHAB_CONF} -name "*.script" -exec /usr/bin/rename.ul .script .script_away {} \\;'
ExecStartPost=/bin/sleep 240
ExecStartPost=-/bin/bash -c '/usr/bin/find ${OPENHAB_CONF} -name "*.script_away" -exec /usr/bin/rename.ul .script_away .script {} \\;'
ExecStartPost=-/bin/bash -c '/usr/bin/find ${OPENHAB_CONF} -name "*.rules_away" -exec /usr/bin/rename.ul .rules_away .rules {} \\;'
TimeoutStartSec=360
Thatâs it.
Is there a package for the new release for OH 2.4.0 for synology?
And the fix for the USB permisssions?
iâve moved to a docker container myself
Do you find the socket container update process is easier?
Any issues with usb ports etc?
Seems to be a ok. You have to hand edit the config and I can help you with that. It was a lot easier than I thought it would be, even making my own docker that includes curl and nano and python for speedtest
Hello,
Iâm also interested in updating in the Nas Synology DS216J with OH 2.4.0, I have no idea how to do it.
Can you post as you did?
I installed OH 2.3.0 with 2.3.0.005
Sure, Iâll try to include as much as I remember. Youâll have to adjust for your individual setup, so pay attention.
First, if you donât already have docker, install it. Then, in docker, click on registry and in the seach box type openhab.
Itâll download and then appear in the âimageâ section of docker. Give it some time to fully download.
While thatâs taking place, lets talk about folders and such. Hopefully your folders live in the public share. If not, this is where youâll adjust what happens next.
If you do use public, your openhab configuration lives in /volume1/public/openHAB
youâll need to map /volume1/public/openHAB/addons userdata and conf to their respective folders under /openhab - more on this is a second
Once fully downloaded, select it and click âlaunch.â Give it a name and click âAdvanced Settingsâ and then the Volume tab. Ignore the localtime and timezone entries for now, focus on userdata, addons, and conf.
If you know what Iâm doing there, great. If not, donât worry about it right now.
Make yours look like this:
Next, click on the âPortsâ tab. Itâs going to get a little hairy here. Depending on what ports you have in use elsewhere on your system you may need to at the very least set these to something else while you transition and then you can change them back. Once youâre comfortable that itâs working you can uninstall the synology OH package and eventually set your ports back.
Also, now is a good time to mention you should have an âopenhabâ user and âopenhabâ group created through the control panel. If you created them through ssh and theyâre not visible through control panel, fine. Make a note of the openhab UID and GID. (you can find these in /etc/paswd and /etc/group find openhab and look for the first number:
mine is 1028 - > UID for openhab)
Back to docker, click on the âEnvironmentâ tab. Change the highlighted settings to your environment:
Ignore the device one, i donât think that does anything - weâll get to that later
Then click âApplyâ and âNextâ but uncheck the box for running the container and finally click âApply.â
Now your container should be almost ready to go.
Next we hand edit the container file to make life a little easier.
Still in the docker app click on the âContainerâ tab on the left side and select the container you just created.
Click âSettingsâ then âExportâ and download the config to your local computer
Open the json file that you just downloaded in your favorite editor (notepad++ ?)
Now is the time we add the z-wave stick if you have it. At the top of the file, make yours look like this, adjusting for your own system:

"devices" : [
{
"CgroupPermissions" : "rwm",
"PathInContainer" : "/dev/ttyACM0",
"PathOnHost" : "/dev/ttyACM0"
}
],
You also need to add localtime and timezone which is either a pain or not really possible through the UI.
Find in your json file the section that looks like this:
Thatâs not exactly right in the picture but itâs corrected here in the text for you:
{
"host_volume_file" : "/etc/timezone",
"mount_point" : "/etc/timezone",
"type" : "ro"
},
{
"host_volume_file" : "/etc/localtime",
"mount_point" : "/etc/localtime",
"type" : "ro"
},
Save the file. Back on the synology using âFile Stationâ upload the file you just saved. Then in docker delete the container you created. Once deleted, click settings at the top and Import. Point it to the file you uploaded with file station. Youâll have a new container with your custom settings.
Now might be a good time to shut down the openhab package. After thatâs off, you can start that docker container. On the running container click âDetailsâ
Then you can look at the terminal and create a bash terminal if you want.
Here you see a karaf console and a bash console. Youâll probably see a bunch of errors. A lot of the config files were customized for the synology install. Youâll need to hand edit a lot of those files to fix all the paths. Itâs a pain, but you do it once and itâs done.
I know this all looks complicated, but itâs really not.
In a session opened to the synology (not the openhab terminals) cd /volume1/public/openHAB/userdata
then âgrep -r appstoreâ youâll get a list of all the config files that have synology specific paths.
use nano or vi or whatever to edit those files. the base path in the openhab container for everything is /openhab
so edit the paths in those files
Thanks for your detailed explanation, unfortunately I have DS226J and Docker is not compatible.
Quite right ?
no idea, sorry. man, i spent 30 minutes writing that up
It will certainly serve to another user
I might use it, thanks for the write up!
Now, how do you update when 2.5.0 releases?
change the image tag you download. probably need to edit the json file a little, too.
I have a new 2.4.0.000 Release deployed:
Thanks, fantastic !!!
@cniweb
I installed the 2.4 over my 2.3.
All of my bindings, things and items are gone!
Is there anyway to retrieve them??
Do you have the recycle bin enabled for the share that the files were on?