Synology DiskStation

Tags: #<Tag:0x00007f1e50578648>
(scott dee) #344

This is an incredibly easy process if the folder is shared :stuck_out_tongue: get your folders fixed and then just drop the files in. You should never need to be in @appstore folder


(Jeff) #345

yes, now everything is accessible. what i had before was the result of not creating the /conf, /addon, and /userdata before installing. if you don’t do that, turns out it will install without error, but put those directories in the @appstore folder. i wasted a ton of time on figuring that one out, but i appreciation the conversation that helped me sort it out.



(scott dee) #346

Start over then, you’ll make your life a lot easier

And rpi has its own set of problems. They’re fine machines but you already have a very capable machine


(Mr. Wiseman) #347

HI Synology Peers,

I’m at a point now where I need to upgrade my OH to 2.4 due to binding requirements. I’ve seen a lot of different discussions about the upgrade; mostly on the GitHub Synology thread.

Package -

I understand there is not a upgrade button/feature yet. I am “somewhat” savy with ssh and vi.

I saw a post by @cniweb on GitHub below:

“Hi, a automatic update is not implementet, at the moment. But you can use the manuel update mechanism from OH himself.”

Are these the steps -->

My current OH 2.3.001 is a standard install via the Synology web interface using the shared folder option (openhab). I have not created any symbolic links to anything (I saw issues around this on threads). I have lots of add-on Jar’s dropped in the folder including the updated/rewritten zWave binding.

Can anyone please provide a list of steps for me to follow for the upgrade that they used?

Best, Jay


iRobot 9xx on openHAB
(scott dee) #348

you can’t even use the built in method because synology uses 7z instead of zip. There are steps to make it work and i think cniweb is going to incorporate those changes at some point but as of now it’s best to just back it up yourself.

the main points would be to backup your entire conf folder, userdata folder, and addons folder.

you’ll want to restore the entire conf folder and probably addons folder but just pieces of the userdata folder. that one is a bit harder
from userdata you probably only need/want:
uuid (file)
openhabcloud (folder)
jsondb (folder)
config/org/openhab/ (there are files in here you may want like habpanel.config and that might be the only one, the others are rebuilt)


(Mr. Wiseman) #349


Thank you for taking the time to jot down some notes. I have a few questions . . .

Can I unzip the on a Windows box and drop the entire contents onto the Synology via a share? Good or bad idea?

Either way using the SPK or the ZIP; what directory should I execute “what” script to start the upgrade? I do have a share already called openHAB which has the v2.3 SPK sitting in it on the Synology; is this the place to drop the v2.4 SPK or ZIP in?

Picture of v2.4 unzipped:

I’m assuming I do NOT uninstall OH 2.3?

Here are 2 screen shots of the unzipped content for /scripts & /wizard_uifiles. Is there an order of execution of scripts?

Picture of /scripts of v2.4 unzipped:
Picture of /wizard_uifiles of v2.4 unzipped:
Best, Jay


(Mr. Wiseman) #350

How do I automate this script above on a schedule? Use scheduler with what syntax?

I’ve made the changes from Zip to 7z already.

Best, Jay


(j4ckz0n3) #351

Would it be possible to use a modified update script (changing unzip to 7z) from runtime/bin folder on a Synology? I’m not sure if the used paths and variables are correct on a Synology.

Furthermore: what about file system permissions?


(scott dee) #352

You install the SPK as any other. I would uninstall 2.3 first to be sure there’s no leftover cruft.

if you’ve modified the backup/restore scripts then you’ll run your backup script prior to uninstalling 2.3
COPY these modified scripts because they’ll be overwritten by the new install.

I would still make a copy of it yourself as well.

Install the new SPK and run the restore your modified scripts and then restore. That should cover it.

@jackzone I would ask @jwiseman for his scripts. I dont currently have modified scripts, i restore by hand.

permissions are set during the install


(Mr. Wiseman) #353

I modified the OH canned backup scripts but they aren’t running (not sure how to schedule them). What I have been doing with OH backups on the Synology is the following for many months now.

  1. I attached a SSD on the back of the unit via the USB port and use HyperBackup on the /homes/openhab directory nightly.
  2. My Sonology is attached to a Windows network via Active Directory and I copy/paste the entire /homes/openhab directory every few days to my Windows network.
  3. My setup is probably not the norm; I actually have 2 Synology’s in a HA pair, with one of them being the primary (so by default, a failure of a unit would not take me down).

Most likely I will be following @waspie advise/instructions and do the restore by copying my “key” files/folders back over manually from my Windows backups. I have a TON of tweaked settings across numerous files for performance tuning that I want to re-incorporate back into 2.4.

I haven’t decided “when” I’m going to upgrade (I’m a bit scared, I have 15k lines of rules code which is overwhelming if it works but fails on some of the rule logic) but I will let everyone know when I do the upgrade and what steps it took to upgrade.

The biggest factor of why I’m upgrading is because I’ve just started learning about MQTT and it requires a minimum of OH 2.4 (new core things/items defs) needed with the newer MQTT v2.5 binding in order to get my Roomba commands to work.

Best, Jay


(scott dee) #354

@jwiseman while you’re at it,I would use 2.5.0 M1
modify your /etc/hosts to point whatever the URL in the .SPK file is to point to localhost. That will make it fail downloading the openhab distribution files and fallback to held in your public folder. So, download and rename the m1 zip file to 2.4 as seen in the .SPK file. M1 has some good MQTT fixes in it that you’ll want.


(Mr. Wiseman) #355

Hey Scott,

Few questions . . .

What is the URL to the M1 Zip File, jFrog, Maven, etc. so I can manually download it?

In the v2.4 /scripts/ file; this is where v2.4 it’s getting downloaded. I copied/pasted the URL into a browser and just change it to 2.5.0 but it gives me a 404 error.

echo "Set instance variables..." >>$LOG

# Add more files by separating them using spaces


Best, Jay


(j4ckz0n3) #356

There seems to be no 2.5.0 directory at the moment:


(scott dee) #357

@jwiseman @jackzone

select linux - apt - milestone
scroll down to manual installation and then click the big unmissable download link


(Mr. Wiseman) #358

Upgraded OH from 2.3.001 to 2.5m1 on a Synology:

I first wanted to thank the folks that helped me put this list together in this thread (@waspie & @Dennis1108 @ github )

Over all impression in the last 12 hours is the stability and consistency of 2.5m1. The logging has really improved in the events log. CPU usage has been reduced by 50%.

My Synology OH Setup:

Two DS716 setup in a HA cluster configuration (active/passive)

* RAID-1 drives in both units
* One USB SSD drive hanging off one of the DS716 units to backup OH to
* Two AEOTec USB zWave controllers (which are copies of each other)
* Using OH v2.3.001 from the Package Center (never updated to v2.3.005)
* I’m using these bindings:
	- zWave v2.5, HUE, Sonos, WeMo, Onkyo, Amazon Echo, Unifi, MQTT, Open Weather Map, Mail, Air Quality, IP Camera, Nest, Network, Samsung TV, Synology Surveillance Station, Climacons, HUE Emulation, CalDAV
* Majority of my OH configuration has been done with single configuration files for things, items and rules.  I have around 15k lines of code in the rules file since starting in June 2018.
* I'm running HABPanel on three Samsung tablets on walls

Steps I Followed:

1.	Backup the entire \homes\openHab directory to another machine (do it twice, just in case)

2.	Stop OH via the Package Center

3.	Reboot the Synology to insure all OH hooks are disconnected

4.	Uninstall OH v2.3.001 from the Synology via Package Center

5.	Rename \openHAB\openhab public folder that contains the installation files \openHAB\openhab to \openHAB\openhab2.3 to insure there isn’t any conflict during this upgrade process

6.	Download OH2.4 for Synology (PKG & ZIP)

	b.	Unzip a copy of the of the ZIP on a PC for later review and copying over to the Synology

7.	Copy openHAB- over to \openHAB public folder (not the \homes\openhab directory)

8.	** Package Center, Manual Install, look for openHAB- on your local PC

	a.	Choose 3rd destination /var/services/homes/openhab
	b.	I did NOT choose to install tmpfs or zWave options.  I get the latest zWave binding (JAR) from the latest build online since it changes every week with new updates to it (Thanks @chris !)
		i. If you had zWave running natively on v2.3; you’ll need to completely reset up zWave devices from scratch, there was a complete rewrite done (lucky for me; I did this on 2.3 prior to this upgrade)

9.	Reboot the Synology

10.	OH should auto start after the reboot, take a look at the log files to see what errors could be coming up.  Mine was multiple IPs bound to interfaces.

	2019-04-05 17:09:05.041 [WARN ] [] - Found multiple local interfaces - ignoring
	2019-04-05 17:09:05.063 [WARN ] [] - Found multiple local interfaces - ignoring <--
	2019-04-05 17:09:05.065 [WARN ] [] - Found multiple local interfaces - ignoring

	You can resolve this from either the GUI Paper, System, Network setting or adding this line item in the runtime.cfg file

11.	Wait for OH 2.4 to completely start up; look at the openhab.log to verify complete startup

12.	Stop OH 2.4 via Package Center

13.	Download v2.5m1

		i.	Select Linux - apt - milestone
		ii.	Scroll down to manual installation and then click the big unmissable download link
		iii.Download OH 2.5m1 runtime and openhab-addons-2.5.0.M1.kar files

	b.	Modify your /etc/hosts to point to the main domain URL in the openHAB- file to localhost. You’ll need to SSH into your system and go into super user mode in order to modify this file

                     if you have a HA cluster; make sure to add it to both device hosts file)
		ii.	This will make it fail downloading the openHAB distribution files from the Internet and fallback to held in your \openHAB public folder (not your \homes\openhab folder)

	c.	Download and rename the file to as seen in the /scripts/ file within .SPK file. 

	d.	Copy over the newly renamed to /openHAB/ public folder (not your \homes\openhab folder) from your PC

	e.	Copy over openhab-addons-2.5.0.M1.kar to the /addon’s directory; this will be used to pull the bindings from since the domain host entry points to your localhost now

14.	Blow away and recreate the /userdata/tmp and /userdata/cache directories as a precaution.

15.	Startup OH via Package Center (which will still show v2.4), review the logs to insure it starts up fine

16.	Stop OH via Package Center

17.	The main restore points would be your entire /conf folder,  /userdata folder, and “some” of /addons JAR’s.  

	a.	/userdata you probably only need/want:
		i.	uuid (file)
		ii.	openhabcloud (folder)
		iii.jsondb (folder)
	b.	/config/org/openhab/ (there are files in here you may want like habpanel.config, the others are rebuilt)
	c.	Copy/paste entries from your copy of your /userdata/etc/org.ops4j.pax.logging.cfg into the new logging file which is different than v2.3 so don’t overwrite the entire logging file

18.	Once v2.5m1 is running stable; start adding addon’s via the GUI slowly.   You will see a system performance issues when adding a lot of bindings semi-quickly.

	a.	Insure this file is in the /addon’s directory you downloaded previously --> openhab-addons-2.5.0.M1.kar
	b.	You’ll want to use the GUI for all addon’s that exist in your installation vs. dropping them into the addon’s directory (one at a time to insure each work).
	c.	The only addon’s I dropped into the directory where ones that were NOT part of the GUI selections (one off bindings)
	d.	You will see duplicate binding entries in the GUI binding area 1.13 and 1.14 along with 2.4 and 2.5m1, choose the 2.5m1 options 
	e.	Modify your addon’s.cfg file for binding entries to insure the bindings load the next time you clear cache/tmp directories

The ONLY major issues I encounter was:

	1.	Sitemaps, all my slider items had to be committed out –
	2.  Having some duplicate bindings running from 2.4 and 2.5m1 that I had to manually stop and uninstall
	3.  Changing some startup rule logic - I'm guessing 2.5m1 is a bit more strict on item states

** Possible Hurdles for Some OH Synology Installations (I did NOT have to do this):

	a.	Remove the user in the Synology web UI
	b.	Reboot Synology
	c.	Following instructions from @Dennis1108
		ii.	I did NOT have to do this step but here’s what mine looked like:

	root@ds716cluster:~# df -h

		Filesystem      	Size  	Used 	Avail Use% 	Mounted on
		/dev/md0       		2.3G  	1.2G  	1.1G  53%	/
		none            	3.9G     	0  	3.9G   0% 	/dev
		/tmp            	3.9G   	23M  	3.9G   1% 	/tmp
		/run           	 	3.9G  	4.0M  	3.9G   1% 	/run
		/dev/shm        	3.9G  	4.0K  	3.9G   1% 	/dev/shm
		none            	4.0K     	0  	4.0K   0% 	/sys/fs/cgroup
		cgmfs           	100K     0  	100K   0% 	/run/cgmanager/fs
		/dev/drbd-md2   	3.5T  	2.1T  	1.5T  60% 	/volume1
		/dev/sdq1       	470G   	73M  	470G   1%	/volumeUSB1/usbshare

Best, Jay

1 Like

Not work OpenHAB site
(Mr. Wiseman) #359

Synology Peers,

Is it possible to upgrade a Synology from OH 2.4 to OH 2.5 w/o having the developer create a OH 2.5 SPK for the Synology?

The reason for the question is; the Unifi binding which does a lot of folks presence detections requires 2.5 now because of this --> based on @mgbowman statement of “as the required change to ExtensibleTrustManager isn’t in 2.4”.

Best, Jay


(Neil) #360

Hi jay, you should be able to work it out from this