openhab / openhab-qnap-qpkg

openHAB Packages for QNAP NAS systems
Eclipse Public License 2.0
77 stars 21 forks source link

is there an easy way to update the current 2.0.3.qpkg to latest 2.2.0 Snapshot? #33

Closed Rar9 closed 1 year ago

Rar9 commented 6 years ago

is there an easy way to update the current 2.0.3.qpkg to latest 2.2.0 Snapshot?

/share/MD0_DATA/.qpkg/openHAB/distribution/runtime/bin/update 2.2.0-SNAPSHOT

is not working for me

thopiekar commented 6 years ago

Nope, but maybe I'll find time on the weekend to build a fresh QPKG (finally).

thopiekar commented 6 years ago

Bad news guys. My NAS just keeps crashing. It is terribly annoying that QNAP is not able to find a fix for that. I was optimistic that the problem has been solved, because I sent a lot of data from my location in the Netherlands, where I make my graduation project, to Germany, but during the weekend when I was planning to organize my data and I began to remove my backups, the NAS just began to crash. And by crashes I really mean crashes. It reboots everytime and tells that the filesystem might be corrupt, because the system has not been correctly turned off. It really worries me, because I have on this device personal files and data for work stored (at least this was the plan), to improve my productivity. Instead I spent already many weekend in backups, etc. But now I'm out of nerves.

I'm really sorry for this, but I think the only one to blame here is just QNAP.

johnroma commented 6 years ago

I am sorry to hear that Thomas, you must be going through a nightmare having to worry about all personal files aside from work. I hope QNAP gets their act together, and that you after some time feel some inspiration to release a fresh QPKG, if you do please let us know..

Good luck!

thopiekar commented 6 years ago

Thank you for your kind words, @johnroma ! Whatever the outcome of this case is, I will share with you at least a documentation how to build the QPKG on your own.

JHCD commented 6 years ago

@thopiekar sounds like my problem... in the end only the memory was defect... I send it to the Netherlands and get it back repaired within 3 days...

thopiekar commented 6 years ago

Well, it was already in repair once. Hope they will fix it now.

fafter commented 6 years ago

Hoping that you get your device and data soon.. Subscribed to this thread, eager to get the 2.2+ running on my qnap.

thopiekar commented 6 years ago

Thank you for your feedback guys! Will keep you updated!

gitpower2017 commented 6 years ago

Hello,

i have interest on the document to build my on openHAB2 qpkg.

Best regards

maikbooehme commented 6 years ago

Hi all, I'm new to the openHAB2 thing, so I'm looking forward for a new package of 2.2.0 .

best regards Maik

saback commented 6 years ago

Hi @thopiekar,

First of all, thanks for the great work. I'm using your package for a while and it is great to have it. I hope you will have your QNAP fixed. I discovered today an issue with my OpenHAB and it is related to a existing bug that I believe had not being fixed before 2.0.3. The link to the issue is here: https://github.com/eclipse/smarthome/issues/3607

I'd really appreciate if you can release a new package soon or share a document on how to build the openHAB package for QNAP so someone else (I'm happy to do that) can build it and release helping you.

Thanks!

thopiekar commented 6 years ago

Sadly my NAS is still at the repair. Haven't heard anything from it.

Well, packages are created on the NAS itself. I know of no tools (supported by QNAP) which allow to build the package somewhere else..

Andy1402 commented 6 years ago

Hi all.

@thopiekar I am sorry to hear that your NAS is broken. I hope it will be fixed. As you know I am actually not the fittest with github. But maybe I can help to upgrade to OH 2.2. Please correct me, if sth. is not the right way.

@Rar9 @johnroma @JHCD @fafter @gitpower2017 @maikbooehme @saback I try to explain how it is possible to build the OH 2.2 PQKG:

Download "openhab-qnap-qpkg-master.zip" and extract the zip file. You have to change the following files/lines:

In file "package_routines" you have to change the line 149: OLD: extract_data openhab-2.0.0.tar.gz ${SYS_QPKG_DIR}/distribution-tmp NEW: extract_data openhab-2.2.0-SNAPSHOT.tar.gz ${SYS_QPKG_DIR}/distribution-tmp

In file "qpkg.cfg" you have to update the following lines: 4, OLD: QPKG_VER="2.0.0-2" 94, OLD: QDK_EXTRA_FILE="openhab-2.0.0.tar.gz" 4, NEW: QPKG_VER="2.2.0" 94, NEW: QDK_EXTRA_FILE="openhab-2.2.0-SNAPSHOT.tar.gz"

In file "shared/openHAB.sh" you need to update the line 20: OLD: QPKG_SNAPSHOT_VERSION=2.1.0 NEW: QPKG_SNAPSHOT_VERSION=2.2.0

Download the OpenHAB 2.2 Snapshot into your directory "openhab-qnap-qpkg-master" (Main folder where you can find the files "package_routines" and "qpkg.cfg": https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.2.0-SNAPSHOT.tar.gz

Now you have changed everything you need to build the qpkg for OpenHAB 2.2. I did it on my NAS in the following path: \Upload\openhab-qnap-qpkg-master To build the QPKG, you need to login via SSH. Go to your folder and build the QPKG: cd /share/Upload/openhab-qnap-qpkg-master qbuild

Finally the QPKG has build. The QPKG file has been created in the path: openhab-qnap-qpkg-master\build\openHAB_2.2.0.qpkg

With this explanation it is possible to do it by yourself - I hope :-)

Alternatively I did it for myself. I downloaded the Snapshot with the following OH 2.2 release: Build #1037 (13.09.2017 08:52:56) You can download the zipped QPKG here: http://AndreasKress.de/OpenHAB/openHAB_2.2.0.zip Please let me know if it is not ok to to share this on this way. I hope it will help sb.

Regards. Andy

saback commented 6 years ago

Hi @Andy1402,

Thanks for you tip. I could create my package without too much trouble. I end up going with the stable version OH2 2.1.0 instead of OH2 2.2.0 but it worked like a charm.

I only notice 4 errors in my logs:

  1. Error resolving artifact org.openhab.distro:addons:xml:features:2.0.0
  2. Can't load features repository mvn:org.openhab.distro/distro/2.0.0/xml/features
  3. Failed installing 'openhab-package-expert': No matching features for openhab-package-expert/0.0.0
  4. Failed installing 'openhab-binding-exec, openhab-misc-restdocs, openhab-misc-openhabcloud, openhab-binding-network, openhab-ui-habpanel, openhab-action-pushover, openhab-binding-mqtt1, openhab-transformation-map, openhab-ui-classic, openhab-ui-habmin, openhab-transformation-xslt, openhab-binding-lgtv1, openhab-action-mqtt, openhab-transformation-exec, openhab-ui-paper, openhab-transformation-scale, openhab-transformation-javascript, openhab-binding-wemo, openhab-binding-weather1, openhab-binding-plex1, openhab-transformation-regex, openhab-misc-ruleengine, openhab-transformation-jsonpath, openhab-persistence-mqtt, openhab-transformation-xpath, openhab-persistence-rrd4j, openhab-ui-basic, openhab-binding-ntp': Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-runtime-base; type=karaf.feature; version="[2.0.0,2.0.0]"; filter:="(&(osgi.identity=openhab-runtime-base)(type=karaf.feature)(version>=2.0.0)(version<=2.0.0))"

I believe they are all related to the binding information not being updated from version 2.0.0 to 2.1.0

Any idea on how to update that information for the openHAB2 package?

One more time many thanks to you @Andy1402 and @thopiekar

Cheers

Andy1402 commented 6 years ago

Hi @saback.

I did my Upgrade from Ver. 2.1.0 to 2.2.0. But with OH 2.1.0 I hadn't this problem. I think your problems are general OH Issues and not related to this QNAP QPKG especially.

Perhaps this could help? https://community.openhab.org/t/openhabian-update-openhab2-uis-being-installed/19930 Then you could try to reinstall all bindings.

Did you only change files in the path "conf" after installing OH? Or did you copy old files in other paths ("userdata" e.g.), too? I believe this could be the problem, too?

Cheers

saback commented 6 years ago

Hi @Andy1402,

Yes, I agree. Although the 2.1.0 package had been working fine with those warns I decided to remove the 2.0.0-3, install my new 2.1.0-0 as a fresh install and recover from the backup.

Everything is working fine now and there is no more annoying warns/erros in the logs.

One more time, thanks for you and thopiekar for the package and how to modify it for new versions.

Cheers,

ViperEclipse commented 6 years ago

Alternatively I did it for myself. I downloaded the Snapshot with the following OH 2.2 release: Build #1037 (13.09.2017 08:52:56) You can download the zipped QPKG here: http://AndreasKress.de/OpenHAB/openHAB_2.2.0.zip Please let me know if it is not ok to to share this on this way. I hope it will help sb.

Sounds great. But since i do not have any test enviroment ;) the question is: did anyone upgrade from 2.0.1 to the 2.2.0 package provided by Andy?

Thx

maikbooehme commented 6 years ago

so I got a clean install running now. OH 2.2.0 is running.

Stefan39135 commented 6 years ago

i think a clean installion is the best way to get 2.2 work which files/folders must be in the backup?

maikbooehme commented 6 years ago

You need to backup the files. The uninstall of the older version is removing the whole folder .

Best regards Maik

Am 18.09.2017 um 14:46 schrieb Stefan39135 notifications@github.com:

i think a clean installion is the best way to get 2.2 work with files/folders must be in the backup?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Stefan39135 commented 6 years ago

do you have a List of the files/folders to be backup/restored

Andy1402 commented 6 years ago

I always prefer a clean install. I never tried to update a OH Version directly.

For the backup you need the whole "conf" folder. If you put some addons in the folder "addons", you need to backup them, too.

maikbooehme commented 6 years ago

@Andy1402 could you please let me know, where OH2 is putting the self learned things? Where can I find the files holding the information about the connected things and items. The conf subfolders are empty,

Andy1402 commented 6 years ago

@maikbooehme I don't know where OH saves the things, which you add per click in the Paper UI. I always add my zwave things manually after a clean install. But I although have things, which I added with a conf file. They are here: OpenHAB\conf\things\default.things

But I can't believe that all your conf folders should be empty. Didn't you create a sitemap, item file and so on? Maybe you have only a problem with your permissions in the folder "conf"?

maikbooehme commented 6 years ago

Hi Andy ,

It seems to be that the things get stored in a json dB .

I created my own Sitemap,items and things ... but for some items which were coming from the learning process I m getting error messages when I try to delete them .

Best regards Maik

Am 20.09.2017 um 20:01 schrieb Andy1402 notifications@github.com:

@maikbooehme I don't know where OH saves the things, which you add per click in the Paper UI. I always add my zwave things manually after a clean install. But I although have things, which I added with a conf file. They are here: OpenHAB\conf\things\default.things

But I can't believe that all your conf folders should be empty. Didn't you create a sitemap, item file and so on? Maybe you have only a problem with your permissions in the folder "conf"?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

StandeB commented 6 years ago

Hello,

I just installed Andy's 2.2.0.qpkg on my Qnap NAS TS-419P+ (arm based) and I can't connect to OH any more. This is a fresh install where I removed the previous qpkg of OH and installed Andy's qpkg downloaded from here. I get the error message: "this site can't be reached (NAS IP address) refused to connect"... The only noticeable difference from the original 2.0.3.qpkg which was working fine on my NAS is that this time the new OH app is using port 8444 whereas before with the previous version it was using port 8090. I tried both ports and even restarted the NAS but to no avail. Am I missing something Obvious? Thanks for your help.

Stan

Andy1402 commented 6 years ago

Hi. @maikbooehme: Is the problem still existing? I never had such problems...

@StandeB: My version uses the port 8090, too. It is the version from thopiekar, which only has the newer OH2 package... But your problem sounds as a known OH2 Bug. I had the same issue. You can try to stop OH and wait a minute. Then check this file: ...\OpenHAB\distribution\userdata\tmp\instances\instance.properties

Check the third line (item.0.pid = ...) Is the pid > 0? If it is, then it is the bug I think. You can set the pid to 0. Thenafter you should be able to start OH.

Best Regards. Andy

StandeB commented 6 years ago

Hi Andy, Thanks for your super prompt reply. I don't have a distribution folder in my OpenHAB folder on my QNap NAS; just addons, conf and userdata. Don't know if this is normal or not. Below is the content of \OpenHAB\userdata\tmp\instances\instance.properties and item.0.pid is indeed set to 0 (see below). Any other ideas?

Best Regards,

Stan

count = 1 item.0.name = main item.0.loc = /share/MD0_DATA/openHAB/userdata item.0.pid = 0 item.0.root = true

Andy1402 commented 6 years ago

Hi Stan.

Hmm, could you obviate problems with permissions? Maybe you could try to replace all existing permissions of your OH folder, files and subfolders?

Best Regards. Andy

StandeB commented 6 years ago

Fixed!! Thanks for putting me on the right track. When I uninstalled the previous version, the original OH folders and content had been left behind in the openHAB folder on the NAS. I thought this was normal and that it would be overwritten with the new installation.

Changing the folder permissions did not help. However it got me to think that perhaps I needed to cleanup the openHAB folder on the NAS before installing the new version. So I uninstalled the OH app, deleted all files in the openHAB folder, reinstalled your latest qpkg and hey presto it worked first time :-).

One more question if I may. I upgraded to ver 2.2 so that I could get the widget gallery in HABPanel. But when I click on +Add widget / Get more... I then get the following error message: Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. Any idea why?

Many Thanks again for your help.

Best Regards,

Stan

StandeB commented 6 years ago

Hi Andy,

Have you had any problems with the widget gallery in HABPanel? As mentioned above I get an error message every time I try to access it. Any idea what the issue might be?

Best Regards,

Stan

Andy1402 commented 6 years ago

Hi Stan.

I'm not using HABPanel. If I click on it, there is no error message. What do you do to see the error?

Best Regards. Andy

StandeB commented 6 years ago

Hi Andy,

HABPanel starts fine. However when

I click on +Add widget / Get more... I then get the following error message:

capture

Best Regards,

Stan

StandeB commented 6 years ago

Is anyone else having issues with the HAPPanel Widget Gallery not loading?

Andy1402 commented 6 years ago

I'm not having this problem. But it seems that you are not alone: https://community.openhab.org/t/habpanel-widget-gallery/34691/6 Does ist help to update JRE? Maybe you need the Java security files`? I copied 2 security files for an addon in my Java JRE....

StandeB commented 6 years ago

Thanks Andy. I did see that thread: it's the one that made me upgrade to the new OH2 package you put together to get the widgets! I have already updated the JRE_Arm package but to no avail... Which security files did you copy to your Qnap NAS and how do you go about it?

peelos commented 6 years ago

https://forum.qnap.com/viewtopic.php?f=320&t=137240&p=645556#p645556 now packaged on the qnap forum!

Andy1402 commented 6 years ago

@StandeB: In path \jre\lib\security it was necessary to overwrite these 2 files: local_policy.jar US_export_policy.jar

Google for "Java Cryptography Extension (JCE)" The first one is the correct one. You can download both policy files from Oracle.

StandeB commented 6 years ago

Thanks Andy. I'll try than in the next few days when I have a moment and will let you know how I get on.

MrWilson86 commented 6 years ago

Is there any chance we get the stable 2.2.0 version as a .qpkg in the near future?

Stefan136 commented 6 years ago

@MrWilson86 - I compiled the stable Version 2.2.0 myself using the Guideline provided in previous comments. Ialso update the Icon using the new OpenHAB design. It is working fine on my QNAP :) However I don't know how to provide the file in GitHub :(

Rar9 commented 6 years ago

Perhaps easiest to write down the compile steps for starters

Am 24. Dezember 2017 11:29:34 MEZ schrieb Stefan136 notifications@github.com:

@MrWilson86 - I compiled the stable Version 2.2.0 myself using the Guideline provided in previous comments. Ialso update the Icon using the new OpenHAB design. It is working fine on my QNAP :) However I don't know how to provide the file in GitHub :(

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/openhab/openhab-qnap-qpkg/issues/33#issuecomment-353777068

-- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

Stefan136 commented 6 years ago

@Rar9 - check above the detailed guideline Andy1402 provided. I used it as reference.

valefranch commented 6 years ago

Hi I try to build a stable Openhab 2.2 QPKG, but I have some difficulty with linux command via SSH. @Stefan136 can you upload your working Openhab_2.2.qpkg in google drive or someting similar and post the link? thanks in advance Valentino

valefranch commented 6 years ago

I create a .qpkg of about 253KB ?? I think I mistake the download of the "openhab-qnap-qpkg-master.zip"! Could someone give me a link for this file? thanks

Stefan136 commented 6 years ago

You can download the Master ZIP on below page: https://github.com/openhab/openhab-qnap-qpkg/tree/master

Direct link: https://codeload.github.com/openhab/openhab-qnap-qpkg/zip/master

Let me know if it works for you

Stefan

valefranch commented 6 years ago

It works ! :) (I must uninstall the preview version before install 2.2 version) If someone need I share a copy of openHAB_2.2.0.qpkg that I create, here: https://drive.google.com/file/d/1VxeXgJKr6eNm3CjVJIewaJSlMiHC8xKu/view?usp=sharing

thanks a lot Vale

fafter commented 6 years ago

Thanks for the positive feedback and response. I have a question:

How is OpenHab on memory usage? I have a TS431 with only 1G DDR3 memory (plus 512MB flash), non-upgradable.

Happy 2018!

Francois.

On 05/01/2018 10:24, valefranch wrote:

It works ! :) (I must uninstall the preview version before install 2.2 version) If someone need I share the copy https://drive.google.com/open?id=1VxeXgJKr6eNm3CjVJIewaJSlMiHC8xKu

thanks a lot Vale

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-qnap-qpkg/issues/33#issuecomment-355498249, or mute the thread https://github.com/notifications/unsubscribe-auth/AdqJ_i3ve3PMMJOpYBfzNJVVcmAZIxkaks5tHdxIgaJpZM4OxMQo.

6r15u commented 6 years ago

@valefranch, could you compare your solution to mine in this repo?

valefranch commented 6 years ago

Sorry 6r15u I don't understand your request! I'm not very practiced with github. v.