I made my way through installation of OH2 2.0.0.b2 on a vanilla Synology Diskstation DS214play (Intel Atom CE5335 2x1,6GHz, 512MB RAM) on DSM 5.2 with all your help here which was adventure of its own. OH2 is now up and running, bindings are also well working. Nice work!
However, OH2 doesn’t seem to automatically reload conf files. I have to configure a lot in .items, .sitemap, and .rules and I have to manually shutdown OH2 on its console and restart the OH2 server (which takes around 2 minutes) everytime I do changes on any of the files.
Is there a way to configure auto reload or to enforce reload on the console?
In the console you can type log:tail to see what OpenHAB is actually doing. Sitemaps, Items, Rules, etc, etc, should be reloaded upon change in OpenHAB2b2. At least, that is working just fine on my setup.
That helps.This means that my setup (or the Synology package) is broken. I am using log tail all the time using the debug start script but there is no indication about rereading any config. When I change my conf files and wait for 30minutes, there is no change propagated.
In a working environment, is there a log entry once a new config is (re)read?
Problem is gone here. I chnaged nothing (just other hard- and software, kidding), only one restart of OH. Now I see in log, only secends after saving that OH takes differences. I don’t know why.
But I have to say, that I edit my config files via an AFP-Share and thought about something that checks the filechange which will not be triggered by the changes made via a network share.
But even if I “touch” the files on the CLI where I run OH2 nothing is reloaded according to the log.
I’ve done some more testing. I had the config directory symlinked from /var/openhab2/ to /etc/openhab2/. I’ve removed that link an the files itself now reside back in /etc/.
After a restart of openhab the log tells me, that a save of the files is recognized again:
21:29:09.848 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model '_default.sitemap'
So the problem seems to rely on the Symlink. This worked without any problems in OH1.
Maybe someone could confirm?
you mentioned problems with symlinked config/models? I discovered the same issue today and I’am able to confirm your observation. I have my OH-config folder symlinked to another folder because i’m using docker and i need a persistent folder. Refreshing the models without symlink works perfect, but it fails with a symlink.
I have investigated this problem and found out, that OH2 uses Eclipse Smarthome AbstractWatchService. See
The problem is the WalkFileTree which ignores per default symlinks. FileVisitOption.FOLLOW_LINKS should passed into the Walker.
I will start a discussion on github and prepare a PR.
Thx for the hint with the symlinks
Instead of the global configurations/openhab.cfg file, there is now an individual file per add-on in conf/services. The : prepended to each configuration property is removed in the new .cfg files.
Thank you very much for sharing the link. I did NOT read that before.
" The : prepended to each configuration property is removed in the new .cfg files."
By this line, it seems “folder:sitemaps=10,sitemap” should be put in something like folder.cfg without folder: prepend. Am I correct to say that?
If so, as I do not find folder.cfg, should I create a blank folder.cfg? Or is there any extra steps I should go through?
on my environment, after I changed conf/sitemaps/demo2.sitemap, new item does NOT apprear on sitemap.
In detail, in conf/sitemap/demo2.sitemap,
at beginning, one line, Switch item=orvibo_s20_ACCF2392F5BE_power label=“s20” icon=“switch”
Later, I change it as Switch item=orvibo_s20_ACCF2392F5BE_power label=“s20” icon="switch" Switch item=zwave_device_1579c2c54b2_switch_binary label=“zwave_binary” icon=“switch”
I know by restart OH2, the new item will show on basic UI.
However, I wonder whether this can happen without restarting OH2.
I got this 02:00:33.635 [ERROR] [.core.internal.folder.FolderObserver] - Cannot activate folder watcher for folder ‘/opt/openhab_sep2/conf’: Function not implemented
It seems related to my setting.
For folder:sitemaps=10,sitemap,
1 add folder.cfg.
2 add sitemaps line.
$cat services/folder.cfg
sitemaps=10,sitemap
Does some expert shed some light?
Thank you very much.
Hello, you seem to have another problem clouding your experience.
You do not need the folder.cfg. Delete it.
OH2 reloads sitemaps automatically. Normally you just have to refresh the page after 2-3 seconds.
Your example looks valid. I expect the error to be some place else. Please have a close look at the log while you are editing the sitemap file. Here is one example you could add to hopefully see a successful change:
Text label="Testing Refresh..."
Which version of openHAB2 are you on / when did you set it up?