Config file updates only in effect after a restart

Maybe we have misunderstanding.
i do not want to go through the trouble of having to stop openhab, clear my cache, start openhab again for every single thing I change in a sitemap, every time again

But perhaps you mean , just clear one time and everything will be fixed?

So I will give it a try to clear the cache

Yepp … could be fixed … perhaps … hopefully :grimacing:

well. at least it fixed something. About an hour ago all my rules stopped working. They seem to be back on line again :slight_smile: so thanks for even solving problems that I didnt even bring forward yet :slight_smile:

I will see if it solved my other problems.

Anyway, thanks a lot for your help and sorry about the misunderstanding about the cache clearing.
i will see if my initial problem now is solved :slight_smile:

Maybe it is wise to clear my cache everu other week or so.

UPDATE
sadly it did not solve my initial problem. When I change an item label from say
"Aquarium light" to “Aquarium” my application keeps insisting it is “Aquarium light”. I need to resrat openhab to be able to see the change

This is not an intended behaviour, probably it’s time to open a bug report.

Cheers, David

Thanks David. That seems like a good idea

What does your log tell you?
It should read something like

017-07-21 18:56:22.334 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'motion.items'

If this would be a general issue this forum would have been flooded with posts …

1 Like

It’s only needed a few times, mostly after upgrading.

Aquarium light
log does not tell me anything even remotely connected to that. I presume because it still is dealing with the ‘previous’ item file somewhere in cache… which was the original problem.

Nevertheless still useful coz I came across some other info/warning issues… nothing serious. but worth fixing

Bug
I presume you are right. That makes me I guess just a ‘statistic’ :wink:

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