I started to split up my configuration to several items files. One of them is one called “Groups.items” where all the groups go. But the others dont seem to get access to it, groups arent working on my sitemap. It only switches to working when copying all the groups definitions to the items files itsself.
I have not tried it myelf yet, but this issue seems to be connected to a general question I have regarding OpenHAB’s handling of configuration files. So I hope it’s okay to jump in here and maybe the whole thing can be cleared up.
I think it may be related to the way or order in which (item) files are ‘processed’. I am not sure how OpenHAB handles item files when starting up and reading/loading them:
Option 1: Openhab reads item file A (alphabetical order?) and ‘processes’ it. If groups are not yet defined (maybe in item file B) then it will be a problem.
Option 2: All item files are first read and loaded without interpreting them. After that they are ‘processed’. This way all items and types are known.
I hope I’m not completely barking up the wrong tree here
I have been using it that way since long time ago in openHAB 1.x. I haven’t seen any problems in openHAB 2.x. Have you checked the log to verify that all files are loaded without errors?
My approach is to group items.in different files, so all my Z-Wave items is in one file called zwave.items. The rooms is defined in a file called house.items.
I have tried to prefix my files with a number for grouping load order. It doesn’t seem that it is loaded that way when looking at the log.
I gave it another try, putting all Groups in one item file. While before it worked i now got a problem with the “Administration” group i created and im getting the following error:
2018-01-16 09:46:09.892 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Dynamic group with label 'Administration' will be ignored, because its item 'gAdministration' does not exist.
I dont know why the Group gAdminsitration isnt recognized any more as i dodnt change code…