There was one thing I couldn’t get right after migrating to OH3. I cannot create rules, scripts and schedules.
When I try this, I get on the first attempt (in the log):
00:46:36.680 [WARN ] [automation.rest.internal.RuleResource] - Creation of the rule is refused: null
And on the 2nd save attempt:
00:49:23.986 [WARN ] [automation.rest.internal.RuleResource] - Creation of the rule is refused: Cannot add element, because an element with same UID (5130d50f0c) already exists
However, the rule is not saved - or at least not visible
OK. Now I found a solution by my own.
I did the following: (just if somebody gets someday the same issue)
Stopped openhab sevice
openhab-cli clean-cache
I edited /var/lib/openhab/automation_rules.json an removed everything except the {}. Everything I tried during the last days was there, as well al some old rules I made with OH 2.5 and its Next-Gen Rule Engine.
Restarted Openhab
Voila, it works, now I am able to create rules in OH3 as expected.
Seems that this is / was a migration issue in connection with the NGRE of OH2.5
Thanks a lot!
Not sure how I missed it all this time but been struggling with rules not firing and not being able to create new rules through the GUI for about a month now
This fixes all open issues for me.