Synology DiskStation

synology
Tags: #<Tag:0x00007f51e46be828>

(j4ckz0n3) #323

The same happend to me last weekend. I updated from 2.2.0 to 2.3.0 on my DS213+ and lost all my bindings etc.

@cniweb Is there any update manual for the Synology users? Can we use the backup, update and restore scripts from runtime/bin folder?


(Andre2308) #324

For the updatescript you ned unzip… synology uses normaly 7z.


(scott dee) #325

you have to edit the backup script to use 7z. its a bit of a pain


(Mark Lavercombe) #326

@waspie @andre2308

Could either of you clarify? Is there a good post somewhere that details exactly how to backup, upgrade and restore an OH 2.* install on synology nas?

I haven’t been able to find one and am currently working on getting everything back up and running again :frowning:


(acs) #327

+1 with this request!


(scott dee) #328

I will try to shed some light on what i know about this process later today


(scott dee) #329

The smartest solution here is to use Hyperbackup and schedule backup jobs that way.

To use the in-built backup scripts … crap, i don’t have it installed as a package anymore…

I’m kind of in the middle of moving probably 200 mqtt items to the new mqtt binding. I’ll get back to you on this.


(scott dee) #330

I lied, I forgot I installed 2.4 on my other syno

Firstly, enable the recycle bin for the share you confs are on. that’s the first line of defense. The second is to install the hyperbackup app and setup a backup schedule. the third is editing the built in backup script.
the script is located @ /volume1/@appstore/openHAB/runtime/bin
If you installed nano, use nano. If you know how to use vi, you’re a better man than I.
nano backup
find this line:

command -v zip >/dev/null 2>&1 || {

replace with

command -v 7z >/dev/null 2>&1 || {

find

OutputFile="$OPENHAB_BACKUPS/openhab2-backup-$timestamp.zip"

replace with

OutputFile="$OPENHAB_BACKUPS/openhab2-backup-$timestamp.7z"

find

your code goes here

find

  zip -qr "$OutputFile" . || {

replace with

  7z a -r "$OutputFile" . || {

(Christian Häussler) #332

Thanks, I think we can include the backup script with changes for synology directly in the package.


(scott dee) #333

Similar edits will need done to the restore script, too. Forgot to mention that.


(acs) #334

Here’s some info on upgrading from 2.3 to 2.4.

A clean install (without changing the /smarthome/openHAB folder) resulted in the error above, so I tried to update it (it wouldn’t at first, so I uninstalled and tried that).

First off, I configured Hyper Backup for making sure to have a copy of my /smarthome/openHAB folder.

Updating 2.3 to 2.4 only worked after I renamed the existing openHAB config folder and restored it. This is because the tmpfs folder would not allow a proper install. Error below:

2019-01-20 23:10:25&gt; -----------------------------------------------------------------
2019-01-20 23:10:25&gt; called with stop
2019-01-20 23:10:25&gt; stop: copied TMPFS to Saved
2019-01-20 23:10:25&gt; stop: /volume1/smarthome/openHAB/userdata/logs is mounted =&gt; start unmounting /volume1/smarthome/openHAB/userdata/logs
2019-01-20 23:10:25&gt; stop: /volume1/smarthome/openHAB/userdata/persistence is mounted =&gt; start unmounting /volume1/smarthome/openHAB/userdata/persistence
2019-01-20 23:10:25&gt; stop: /volume1/smarthome/openHAB/tmpfs is mounted =&gt; start unmounting /volume1/smarthome/openHAB/tmpfs
2019-01-20 23:10:25&gt; stop: directory /volume1/smarthome/openHAB/tmpfs exists =&gt; removing
2019-01-20 23:15:26&gt; -----------------------------------------------------------------
2019-01-20 23:15:26&gt; called with stop
2019-01-20 23:15:26&gt; stop: copied TMPFS to Saved
2019-01-20 23:15:26&gt; stop: directory /volume1/smarthome/openHAB/tmpfs exists =&gt; removing
2019-01-20 23:19:35&gt; -----------------------------------------------------------------

Installed 2.3 again, without TMPFS or Zwave.

I then installed 2.4 over 2.3, with TMPFS and Zwave. Even though it returned a failed installation at the end of the package installation wizard (common issue, at least with me), it actually installed properly this time. It only ran after a second trial to start, although the HTTPS port wouldn’t work. HTTP did, and that’s what I’m using.

The upgrade was not successful in keeping the configurations. At this time, I stopped the package and rebooted the NAS because I was still having issues with TMPFS. After this I copied the config files again, and even though openHAB would now start without asking to create UI elements, it was basically empty.

In the end I had to install the Zwave binding again and subsequentially all devices.

I’m wondering if using Docker would make this process easier? How does an upgrade go about in the Docker version, you download and clear the container?


(scott dee) #335

pretty much, but i gave up on the docker install. Mine would stop updating items at random times between 6-18hrs every time. even with most bindings removed. I went back to the SPK install and it’s been solid as a rock.
That said, I think it may have been related to MQTT 1.x + 2.x that caused it but I’m not certain


(acs) #336

Thanks for the comment. I’m thinking of (once again) giving up openHAB altogether and move back to Domoticz. It’s not an as refined UI experience, but it is far more robust that all the issues I’ve had with openHAB up until now.
I thought that the user permissions for the zwave usb dongle were the worst part in the comparison, but I was very wrong. With OpenHAB (on a Synology) configuring a scene or group can only be done via configuration files, there isn’t a working rules interface, events are also unavailable, the installation process is not straightforward (needs fix scripts!), it has (at least v2.3 had) memory leaking issues and - as I’ve discovered just now - upgrading is a nightmare, if even possible.
The advantage with OpenHab is that it has a more refined UI experience, but even that doesn’t make it all that easy to use. It just looks nicer.
In writing this I can’t even understand why I haven’t moved back to Domoticz yet - other than the UI is quite ugly.


(scott dee) #337

This is actually really easy with the right udev script. I finally got it right recently if you’d like a copy. I tried Domo but the Lua scripting thing seemed way too hard and the toy interface to make rules seemed way too restrictive.

I can help you get back on track if you want to stay committed to openhab. We can work one issue at a time until you’re working again as long as you’re patient (since I’m on vacation right now).


(acs) #338

I have it working as well, but what bugs me is that Domoticz installs from the package and although it’s not perfect, for the most part it works - it doesn’t need messing with users or having to handle weird USB permissions issues. I haven’t messed with LUA scripting for what I used it for, the graphical rules interface sufficed. I have quite simple usage of this and if baffles me I had to be writing code-like text files (though simple) to successfully group some things. It’s not that it’s something I couldn’t do - it’s just that it is way too complex for something that should be simple.

But I’m complaining too much. Thanks for your willingness to help. I’ve setup my basics as they were before, so for now it’s fine, but I’ll get back to you when I’m up for trying to get something else going.


(Jeff) #339

total noobe been working with openhab installed on a synology ds118 for a few days now, which may be my biggest mistake when trying to learn about how to do all this. i should probably break down and buy a rasberry pi and this would be a lot easier i think. i have installed the OpenWeatherMap widget on the habpanel and have the OpenWeatherMap account and weather and forecast working in paper ui, but i can’t figure out how to get the icon files into the proper location to install on synoloygy, they block you from anything below the home folders. i have gone through the gyrations of enabling root access with ssh and can navigate to /volume1/@appstore/openHAB/conf/html where i think the files go on the command line but not with any sftp client to browse and add files. this is a synology issue that makes me want to delete the synology install and start over with raspberry pi or run on a mac mini or MacBook. am i missing anything? thanks for any help


(Mark Lavercombe) #340

Use Winscp to place the files. Or whatever the Mac equivalent is. Then you have a gui. That’s how I do it on my Ds918…


(Jeff) #341

i have tried cyberduck and filezilla and both return messages like…

|Error: |Received unexpected end-of-file from SFTP server|
|Error: |Could not connect to server|

did you enable root user by editing /etc/ssh/sshd_config? did you do anything special to setup access? i can now login as root via ssh from the terminal on my mac, but not browse files with sftp port 22.

are you able to access the /volume1/@appstore/openHAB/ ?


(Mark Lavercombe) #342

In my install the folders are in /volume1/public/openHAB/addons, /volume1/public/openHAB/conf etc…

Have you followed this: https://www.synology.com/en-global/knowledgebase/DSM/tutorial/File_Sharing/How_to_access_files_on_Synology_NAS_via_FTP


(Jeff) #343

yes, except i used volume1/SmartHome/openHAB as the install location and have very few files there. the admins, conf and other directories got installed in /volume1/@appstore/openHAB/ directories as i mentioned.

maybe i missed some option during the install process?

openhab

i ran the installer from https://github.com/openhab/openhab-syno-spk/releases/tag/2.4.0.000

crud, i think i just figured it out. this is what happens if you don’t follow the instructions on the next image. i didn’t create conf and addon folders. looks like it’s time to nuke and repave and try again. ugh. lol.