New folder structure

Not sure I get your point. There are bat scripts since openHAB 1.0 and nothing has changed about that or is anything missing?

I donā€™t think your configurations are ā€œlostā€, since these never get overwritten. Have you added your addons in the list at <conf folder>/services/addons.cfg?

@g_g_rich, Does this have the same effect if you place this in: /etc/default/openhab2

I was not aware of those scripts. Probably Google would have been my friend.
I will report back when I update my OH2 installation.

ā€¦ or the docs: :slight_smile:

http://docs.openhab.org/installation/windows.html

This bat is to start openhab but not to update it.

Ahh, okay, did not get your point right in

@sihui I can work around this in the script, of course, but I wonder if it wouldnā€™t be better to move it to the runtime. I commented on the ticket that @Kai opened.

Makes sense :innocent:

Noob here. I am running OH2 on RPi Offline SNAPSHOT. Initial install was about 2 months ago. Dev was going well so I decided it was time to get the latest SNAPSHOT (#648 I believe). After install, I copied my ā€˜userdataā€™ and ā€˜confā€™ directories back to /opt/openhab2 from the backup (overwrite of new SNAPSHOT directories). The system seems to be running well and the new bindings (include the Openhab Cloud Connect) were available in PaperUI However, they would not install.

Openhab.log
2016-12-17 19:33:14.529 [WARN ] [url.mvn.internal.AetherBasedResolver] - Error resolving artifactorg.apache.karaf.kar:org.apache.karaf.kar.core:jar:4.0.4:Could not find artifact org.apache.karaf.kar:org.apache.karaf.kar.core:jar:4.0.4
shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.apache.karaf.kar:org.apache.karaf.kar.core:jar:4.0.4

and many more entries like this.

I compared the new /opt/openhab2 directory structure to my backup copy and noticed that the karaf folders are now located directly under the runtime/ā€¦ folder, while the backup has them under runtime/karaf/ā€¦

There are probably more directory moves that I didnā€™t catch but this one was in the log file so I will start there.

Is this part of the folder move?

Are there pointers or global variables that I need to configure to re-point to the new folders?

Or should I re-install 648 and only copy back my ā€˜confā€™ directory from backup?

Thanks,

A lot has happened in the past couple of months including major changes to userdata. I would start over and only preserve your conf.

Thank you, I will give it a try.

Stan Seago

Also, is this the way I should get the most recent stable SNAPSHOT and install it?

wget https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBui

ld/artifact/distributions/openhab-offline/target/openhab-offline-2.0.0-SNAPSHOT.

zip

sudo unzip openhab-offline-2.0.0-SNAPSHOT.zip -d /opt/openhab2

I am also only running idk 101 but I have downloaded

jdk-8u111-fcs-bin-b14-linux-arm64-vfp-hflt-22_sep_2016.tar

Should I install it and where? (I am on a RPi with Jessie)

Thanks again.

Stan Seago

The best idea is always to use the official install or upgrade instructions:

http://docs.openhab.org/installation/linux.html#package-repository-installation

Easiest way is described here:

The best idea is always to use the official install or upgrade instructions:
http://docs.openhab.org/installation/linux.html#package-repository-installation

Would be great if someone could add upgrade instructions for windows based systems :slight_smile:

Openhab2 is still in Beta so I fully understand all the structural changes which were done lately. I am using it since like a year now and really love it but having done an update now i feel the pain as dummy user. I am going to dig through all changes and error messages now to figure out to get like my hues working again. So reading the changes section here I will have to go through:

  • new folder structure
  • mapdb instead of jsondb
    Anything important structural which could be the cause of my system not working anymore I miss?

Would be really great to not only have a general Windows update instruction but also adding special cases there on structural changes. Not sure if I ask for too much here on a Beta system so :wink:

NoTechi

Yes, it would be nice if there were some instructions how to upgrade OH2 (snap-shot) for Windows based systems. As it now I am stuck at build #657 and canā€™t get newer versions to run.

A windows installation is a manual installation so you may use the upgrade instructions for manual linux installations.

http://docs.openhab.org/installation/linux.html#upgrade-backup-and-restore

Iā€™m referring to this part:

Upgrade, Backup and Restore

To stay up to date with new releases, you should do regular upgrades of your manual installation. This is especially important if you are working with the latest snapshot as changes and fixes are incorporated constantly.

Your personal configuration will be retained on upgrades. We still recommend a backup before each upgrade.

To upgrade your manual installation, you simply need to replace the openHAB runtime files. Make sure to first stop your openHAB instance.

To make a backup of your openHAB 2 system, you need to retain your configuration and userdata files.

Instead of the linux command for backing up the system and unzipping you need to use the equivalent windows tools ā€¦

But be aware of all the structural changes especially when you are coming from an older version (prior to #624):
https://community.openhab.org/c/openhab-2/news-important-changes

Magnus I just went through the upgrade process and I can give u a short rundown what I did ā€¦ nothing to go to the official instructions but might be of help for you :slight_smile:

It didnā€™t took long to decide to start from scratch since fixing looked like impossible to me as newb. So I did following:

  1. backup copy of my current openhab folder
  2. replaced my current openhab folder with newest nightly build
  3. run the standard config from paper UI and made all general settings like language etc.
  4. copied all my rule files and the sitemap from my backup to the new structure.
  5. now the main difference starts since from what I have learned is that the intention is to not have items/thing files anymore. All things/items should be configured through the paper UI
  6. enable Item Linking ā€œsimple modeā€ under configuration system
  7. add the Bindings you need (e.g. the Hue Binding) from addons
  8. you should have lots of new stuff in your Inbox now.
  9. some bindings might need special attention like my Homematic Binding which needs to get the ip configured in config files or the hue binding. I used the openhab2 docu for bindings and even though some documentation in there might be outdated with the new structure I figured it out somehow. Like the hue binding docu is still describing the configuration with item and thing files instead of describing the setup within the paperui and I am pretty sure other binding docu is like the same state.
  10. within the Inbox accept all detected things until the Inbox is empty (you can hide not needed things as well but I just added everything)
  11. disable Item Linking ā€œsimple modeā€ under configuration system --> took my some time to figure this out. Without you will not see a sparate section for items within paperui. This might not be needed but I couldnā€™t figure out a better way to add items which are not related to a thing.
  12. Now I took my former item file as reference and started to add new linked items with the same names as used in my rules and sitemap.
    First I added items from type group according to my former groups within the config file. This is required to be able to assign a group to a item when creating it.
    To add the items you need to open a thing in paperui. There you will find available channels. On the right side of the channels are little arrows. If you press them you will find linked items to this channel. There click on the plus sign and pick ā€œcreate new itemā€ on the popup when u click on the item field. Then give it the same name, label, category and type as in your former items file. And if this item is part of a group you created earlier pick the right group ā€”> this took some time!

Thats it in a nutshell even though I might have missed something. No clue if this is understandable or even the correct way but it looks like I am up and running again!

What I am still struggeling with is now what I should do if I want to update to a new nightly build again. I would really appreciate if someone with more experience could describe the standard windows update procedure within the official openhab docu with the new structure.

NoTechi

Sorry to be such newbish but which are the runtime files I need to replace. Would it be sufficiant to just replace the ā€œruntimeā€ folder and the files within the openhab root like the start.bat and leave everything else untouched? If yes that would be perfect :slight_smile:

NoTechi

I have never used openHAB with Windows, but ā€¦ yes, that should do the trick.
With Raspbian I had a problem from one upgrade to another (donā€™t remember which one) and I had to replace all files in /userdata/etc except the host.key and the org.openhab.addons.cfg (and the logging files).
Maybe that is needed on Win too ā€¦