Following on from my previous post on issues with removing rules, it seems as if the solution is to use ruleRegistry.remove
and not rules.remove
- this was picked up by @Spaceman_Spiff - Port JSR223 bundle to openHAB 2 - #160 by Spaceman_Spiff . @steve1 also mentions in the same thread:
There are a few scope objects that are created for each script. I think that the automation manager and rule registry are two of those.
This may explain the difficulties I had in removing the rules via REST/karaf etc. Anyway, I haven’t tested extensively, but looking good so far.