- Hardware: Raspberry Pi 3B+
- OS: Raspberry Pi OS (32 Bit - Buster)
- Java Runtime Environment:
- openjdk version “1.8.0_152”
- OpenJDK Runtime Environment (Zulu Embedded 18.104.22.168-linux-aarch32hf) (build 1.8.0_152-b76)
- OpenJDK Client VM (Zulu Embedded 22.214.171.124-linux-aarch32hf) (build 25.152-b76, mixed mode, Evaluation)
- Jython 2.7.0
- openHAB 2.5.5 (Release Build)
I’m using the NGRE with Python scripts. These rules seem to rules seem to work well, but some how I’ve managed to create some “Phantom Rules”, and short of hacking at the JSON DB, I can’t figure out how to get rid of them. (These “Phantom Rules” are more than cosmetic as they are not just in the PaperUI, and actually triggering according to the logs.) Does any one have any suggestions? Here is examples and and what I’ve tired to remove the rules.
Phantom Rule Example
In the above screenshot, I apparently have two rules named “Front Porch Lights On at Civil Dusk”.
However, I only have one Python script file, and that file only has one such rule.
What I’ve Tried to Delete the Duplicates
- From the PaperUI, I’ve tried to delete both rules. However, I get a 404 error in the PaperUI, and this is logged.
2020-06-21 15:15:57.983 [INFO ] [utomation.rest.internal.RuleResource] - Received HTTP DELETE request at 'rules/1f004450-df27-4a4a-86b9-51b5a9530911' for the unknown rule '1f004450-df27-4a4a-86b9-51b5a9530911'. 2020-06-21 15:16:22.849 [INFO ] [utomation.rest.internal.RuleResource] - Received HTTP DELETE request at 'rules/229e9d59-ecb4-4849-a9c8-da379ef4e62e' for the unknown rule '229e9d59-ecb4-4849-a9c8-da379ef4e62e'.
I’ve tried to delete the rules through the REST API. Unsurprisingly, I still get a 404 and the same messages logged in point 1 above.
- Stopping openHAB [sudo service openhab2 stop]
- Renaming the Python script file to .old
- Clearing the cache [sudo openhab-cli clear-cache]
- Starting openHAB. (After the I start it, PaperUI shows no rules, which I expect.)
- Renaming the Python script file to .py
- Restarting openhab. (After the restart duplicate rules show up again in PaperUI.