Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[persistence] Persistence groups only work when the group is defined within the same items file. #1437

Closed
baku104788 opened this issue Apr 20, 2020 · 3 comments

Comments

@baku104788
Copy link

Previously I had persistence groups that I used across multiple files. Example persist strategy below

Strategies {
default = everyChange, restoreOnStartup
}

Items {
persistChanges* : strategy = everyChange
persistAndRestore* : strategy = everyChange, restoreOnStartup
}

items1.items

Group persistAndRestore
Switch statusone (persistAndRestore)

items2.items

//will not be persisted as the group isn't defined in this items file.
Switch statustwo (persistAndRestore)

Before 2.4M3 this worked perfectly. Post 2.4M3 this stopped working and I couldn't figure out why until now. It turns out that you need to define the group at the top of each .items file where I have items within the group that need to be persisted. Simply defining the group in one .items file and then using it on items across files does not work. My guess is that this may impact other group based actions in the core when they span files. This can easily be reproduced on any newer version of OH

@cweitkamp
Copy link
Contributor

Is this still an issue for you? For me it is working flawlessly for years.

@baku104788
Copy link
Author

baku104788 commented Jan 1, 2022

Honestly I couldn't tell you. with the new openhab 3 release I no longer use .items files. I can only tell you that it did not work in the 2 release following 2.4m3

@cweitkamp
Copy link
Contributor

Thanks for the feedback. I would suggest to close this issue for now.

Feel free to reopen it whenever you think the problem is still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants