Config file updates only in effect after a restart

Thanks. I will just clear it whenever I encounter weird problems again. Did wonders for my rules :slight_smile:

So that means your edits don’t make it to the system at all.

What editor are you using? Are you accessing your files remotely (for example via samba share from another system) or locally (for example via nano or vi)? Or another option: are you transferring your files via FTP? That are actually all three options I know of.
Depending on that it could just be a file permission problem.

Wait!!!

I found something in the log: (logs are big :slight_smile: )
2017-07-22 16:18:33.003 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Huis.items’
2017-07-22 16:18:33.778 [WARN ] [rthome.core.service.WatchQueueReader] - Cannot customize folder watcher for folder '/etc/openhab2’
java.nio.file.FileSystemLoopException: /etc/openhab2/conf

Anyway, files are on the proper place in the config files when I have a look. and they do get in effect when I restart openhab. I use either Bluefish leafpad or Notepad+
i have always done that.
I just go to my network share from another computer like I have always done. I never changed the way I edit files, they are there where they are supposed to be. When i open for instance my smb://openhabianpi/openhab-conf/items/ folder and check the changes I made in my items file, the changes are there and on the next start up they get in effect on the next restart.

If you are not in debug mode a successful start log in openHAB has not more than around 100kB, depending on how many bindings are installed.

That is strange and I was not able to find any similar problem. But the Cannot customize folder watcher for folder '/etc/openhab2' should lead to a solution for people who are more familiar with the source code.
Unfortunately I’m not …
I would check the permissions of your folders if they are correct (and use the menu item “fix permissions” if not done already)

Thanks
The priviliges should be OK, i can jujst normally open and edit and save files, that has never been a problem.
it is just that the changes only come in effect on the next restart, not immediately like before.

My openhab. log=7.4MB so I guess I am not in debug mode :slight_smile: wouldnt even know how.

Anyway… you did yr best and solved some other issues for me So I deeply thank you :slight_smile:Enjoy the weekend

apparently other people had had similar problems… as far as I understand this issue: How to reload conf files without restarting OH2?

As I said: way to much, should be around 100kB.

What is the first error you are seeing? We have to go from there …
BTW, what java version are you running? (java -version on the console)

java openjdk version “1.8.0_121”

first error?? Any error?
2017-07-22 11:37:47.124 [ERROR] [systeminfo.handler.SysteminfoHandler] - No information for channel battery#remainingTime with device intex 0 :
org.openhab.binding.systeminfo.model.DeviceNotFoundException: Device with index: 0 can not be found!

But that is just systeminfo that cannot find a battery on my Raspi

i’d be happy to put it in DEBUG mode if i had the foggiest how

there shouldn’t be a conf subfolder within the /etc/openhab2/ structure (maybe it doesn’t exist and this is just a warning)
where are your *.items files stored?
in /etc/openhab2/items/ or /etc/openhab2/conf/items/ ?

2 Likes

you may be on to something.
they are in the standard openhabian folder which is etc/openhab2.

However… in order to get smarthome designer working I tried someones solution (I forgot the exact command) to create a conf folder in openhab2 and I think that mimicked a link to the parent openhab2 folder. I do not recall if that was when my problems started. I see that folder leads to endless recursion
i will remove it and see what it does. Thanks for pointing it out.

UPDATE
oh well, got from bad to worse.
removing that recursive directory removed all my conf files as well. Fortunately had back up… but in spite of putting the back ups back… sitemap now no longer recognized.

I seriously consider starting all over :slight_smile: :slight_smile:

1 Like

Aaaaah :smiley: These modifications to the configuration folder in order to make the Smarthome Designer work were all bulux to begin with. :sweat_smile: If you are using a recent openHABian setup the only share you need to mount on your PC is “openHAB-share” and the SmartHome Designer will do it’s thing.

Make sure that all your config files are in the right place, e.g. /etc/openhab2/sitemaps/myhome.sitemap

While we are at it, did you configure anything via /etc/openhab2/services/addons.cfg? The file can easily create problems if used in the wrong way. Nowadays I’d prefer to use the Paper UI for these settings, on my system the file is completely empty/commented.

Then after all the hickups, it might indeed be a good idea to restarting openHAB including clearing out the cache folder as mentioned by @sihui here.

Thanks Thom.
I have that openhabshare. works sometimes on windows, not on linux sadly,
Anyway, I removed that virtual mathruska conf directory did many restarts, reboots, but sadly all the same> A change in an item or say rules file will only show up after a restart.

I never added anything manual to the addons.cfg, always truogh paper UI, and indeed sitemaps in the right place, exactly where openhabian diskimage says they shld be

So as it is, still the original problem of having to restart for every change in a file. Very very annoying

I agree with the others. Something is seriously fumbled up with your setup. You should either clear cache and tmp once to move potential problems there out of the way, otherwise there is maybe a serious error in your config files. That could stop the dynamic reload but survive a restart. At this point it’s really up to you. You could of course backup your config files, then start with a fresh openHABian setup. I don’t think that’s needed.

1 Like

Thanks Thom

it is solved
I did clear the cache and tmp. that was not it I think
Then I removed the conf directory that was recursing all my files like a russian doll
Then I did clear cache and temp again
then I waited
and then after trying a few times it worked again.
I think the conf directory was the problem

I got that by following this recommendation

Dim, hard to say, but I think it was that conf file that caused the havoc. removing that did not solve it immediately… but after a while (and again a cache/tmp clear) it started working again

Well spotted

1 Like

Yeah… don’t do that :slight_smile:

This (creating a conf folder within /etc/openhab2/) will cause this FileSystemLoopException within the config directories :stuck_out_tongue:

yes, i had a conf directory in a conf directory in a conf directory etc etc etc.
No surprise Openhab had no idea what file to update although in the end all files where the same.
But as usual with openhab… any solution also needs a bit of time for it to work. Once the Russian doll conf dir gone and again a clear cache and tmp dir it didnt immediately work, but some 5-10 min later, worked like a charm again.

Suddenly Openhab feels like a friend again rather than a stubborn bully

2 Likes

I like the Matryoshka doll analogy!
If you add some vodka to the mix, your system will fly ! :smile:

1 Like

@Dim @ThomDietrich @sihui
Thank you all very much for your help
It did not only solve my problem, but I learned as well: studied my openhab log with a bit more attention than usual and came across a few other pointers that I should have a look at. No big things, just some WARNINGS and INFO that can easily be fixed, but I now learned where to find the log info I was missing in the eventlog.

I am a happy man!!

3 Likes

I went ahead and closed this horrible thread :smile:

Do you use the “openHAB Log Viewer”?