I get several errors from the Astro binding. This is the latest one but I’ve also gotten ‘miles’, ‘kilometer’ errors as well. I turned off those channels to stop them.
2018-12-07 12:33:57.354 [ERROR] [ding.astro.handler.AstroThingHandler] - Can't update state for channel astro:moon:local:phase#agePercent : null
Finally fed up with seeing this error, I decided to try and get to the bottom of it. To date I have:
Removed the Astro Binding
Stopped OpenHab
Manually cleared the cache
Deleted everything in the /var/lib/openhab2/tmp directory
Searched for any .jar file with the word astro in it. (Did not find any)
Restarted openhab2
Installed the Astro Binding
Still I get the error. Finally, fed up and desperate, I grepped the /var/lib/openhab dir for agePercent. I found a hit in . the jsondb directory. (several in fact)
These entries survive deleting the Astro Binding so I think that the problem is that they contain references to channels that no longer exist in the binding.
My question:
Could the entries in the jsondb files be what is causing my Astro binding to throw errors?
Followup question:
Is there a tool to remove these entries other than a text editor?
Bonus Question:
Shouldn’t the binding clean these up automatically if this is the problem?
So if I delete the astro binding, then use the console to delete all the items, links, and things associated with it, and then re-install, I should be good?
that’s pretty good! (better than my bash-foo for sure!)
by the way/side note : some people use this method (openhab-cli <commands>) with the Exec Binding to restart a bundle if it gets stuck (with bundle:restart 123)
Not a big fan of this bundle:restart story since I try to debug the heck out of my installations to avoid this kind of workarounds