When restarting the openhab2 service or my raspberry pi3, rules show as uninitialized when paperui comes back up. I have MQTT binding installed, and have succesfully configured mysql persistence and jdbc yesterday. The rules issue was also there before I configured all this. I understand they were dependent on SQL/persistence, so I had hoped this issue would be resolved once I configured that.
I’ve already adjusted the configuration refresh settings in configurations/openhab.cfg as follows:
I think I still need to make sure the rules load/init AFTER persistence is loaded, since I did find multiple google results mentioning rules become/stay uninitialized because the item used in them has no current value. So when it restores the stored value before it tries to init the rules, then it might just work instantly.
Most google results reference openhab1 though, so getting this to work in openhab2 is confusing.
so, is the folder used by openhab still
, or is it
I’ve deleted openhab.cfg in my configurations folder, it doesn’t make a difference. So you were right in that is isn’t being used by openhab2.
It’s still a topic about the rules being uninitialized so my question is now, where can I control when these rules initialize? In my first post I post the config I used in openhab.cfg, but since that’s obsolete I should be able to control those settings in another file, no?
but no idea what to add or remove. I can see it nicely follows openhab in choosing MySQL as the standard interface, but that’s about it. Can’t seem to find the bundles folder in which the file I need to edit resides
I found today a reason why some of my rules stopped working.
I had several rules that were rather similar (all for rollershutters)
so I first created one rule that worked well.
and then I created copies for other and I replaced the active parts (aka the buttons and the rollershutters)
That worked well for all of them, and still they always stopped working and when I reloaded them with an extra space or so, they worked again.
My problem was I all gave them the same rule name
“rule rollershutter changes"
"rule rollershutter bedroom Parents changes”
“rule rollershutter bedroom Child 1 changes”
What I think happened was everytime I ran one, it replaced in memory the other rule (with the same name)
yes of course functions can’t have the same name, yet when I load multiple rule files with rules with the same name, openhab does not complain (or I don’t see it)