Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update openhab2 on synology diskstation #146

Closed
abraunisch opened this issue Jan 19, 2019 · 13 comments
Closed

How to update openhab2 on synology diskstation #146

abraunisch opened this issue Jan 19, 2019 · 13 comments

Comments

@abraunisch
Copy link

Hello,

i would like to be update my openhab 2.3.0.005. to a newer version.
As far as I understand there doesn't exits any update-function at this moment :-(

Therefore, I would like to ask the following questions:

  1. when will there be something like that?
  2. is ther anywhere a simple documentation how can i update openhab manualy
    and (very important) successfully without any errors? I search for some inforamtion
    but cant't find a save approach

Thanks for your help,
Andreas

@jaywiseman1971
Copy link

I'm also running OH on Synology and I'm at the original version 2.3.0.001 and I would like to be update my openhab to the 2.4 version also. I see the main owner released 2.4 SPK but I'm a bit scared to jump to it manually vs. following some sort of steps, please . . .

I have many "add-ons" at level 2.4 and 2.5 already including the zWave one which is a big change; so I think my upgrade won't be so bad once I can follow the instructions.

Thanks again for all your work on this; jumped into OH in June 2018 and I've been obsessed with it ever since.

Best, Jay

@cniweb
Copy link
Member

cniweb commented Jan 30, 2019

Hi, a automatic update is not implementet, at the moment.
But you can use the manuel update mechanism from OH himself.
See OH docs: https://www.openhab.org/docs/installation/linux.html#backup-and-restore

@frest-de
Copy link

frest-de commented Feb 2, 2019

The Backup/Restore script does not work with synology. The package "unzip" is missing. But even after installing unzip (entware/ipkg) and editing the restore script it seems to be working, no error, but the openhab installation does not work any more.

I backuped the folder /volume1/@appstore/openHAB before.

@cniweb
Copy link
Member

cniweb commented Feb 3, 2019

@frest-de can you post your adjustments?
You're right, because unzip package is missing.
That would have to be a prerequisite if the package is to be an update.

@frest-de
Copy link

frest-de commented Feb 3, 2019

I just installed unzip on my synology using entware-ng an changed the path to unzip in the restore script. The script runs without any errors after that. Resoring OpenHAB does not work anyway.

@jaywiseman1971
Copy link

I think Synology replaced unzip with 7z. Here are 2 threads talking about it.

rclone/rclone#1949
https://portal2portal.blogspot.com/2017/01/synology-nas-wheres-my-unzip-command.html

I personally haven't tried it but I'm watching this thread because I do want to upgrade my Synology OH to 2.4 also.

Best, Jay

@frest-de
Copy link

frest-de commented Feb 3, 2019

correct, you could replace unzip with 7zip in the script as well.

@petermorlion
Copy link
Contributor

petermorlion commented Mar 15, 2019

The openHAB documentation about backup and restore isn't about updating. But I found I can just follow the installation instructions with a newer package after I have backed up my files.

Incidentally, the backup script seems to have worked fine on my Synology. It's the restore script that's giving me troubles. Does anyone have the correct 7zip command line to get it working?

If we want to make this easier, what kind of help would you need? I'm no openHAB or Linux expert, but I am a software developer, so I know my way around at least a bit.

@petermorlion
Copy link
Contributor

Found the correct 7zip command. In the restore script replace line 21, change:

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

to

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

You could also change the error message two lines lower.

Then, at line 82, change

unzip -oq $"InputFile" -d "$TempDir" || {

to

7z x "$InputFile" -o"TempDir" -y || {

(there is no space between the -o and the "TempDir"!

@cniweb
Copy link
Member

cniweb commented Apr 4, 2019

@petermorlion can you build a script for this change? Then I can integrate it on the update mechanism for sinology update process. Thanks!

@petermorlion
Copy link
Contributor

I created PR #150

@cniweb
Copy link
Member

cniweb commented Apr 8, 2019

@petermorlion Thanks for you PR! I will try to use the script with the update.

@cniweb
Copy link
Member

cniweb commented May 27, 2019

In Version 2.4.0.002

@cniweb cniweb closed this as completed May 27, 2019
eric-auguie pushed a commit to eric-auguie/openhab-syno-spk that referenced this issue Dec 3, 2020
eric-auguie pushed a commit to eric-auguie/openhab-syno-spk that referenced this issue Dec 3, 2020
Signed-off-by: eric-auguie <[email protected]>

git commit --amend --signoff# Veuillez saisir le message de validation pour vos modifications. Les lignes
eric-auguie pushed a commit to eric-auguie/openhab-syno-spk that referenced this issue Dec 9, 2020
Signed-off-by: eric-auguie <[email protected]>

git commit --amend --signoff# Veuillez saisir le message de validation pour vos modifications. Les lignes

Signed-off-by: eric-auguie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants