The one thing you’ve probably missed is that the Jython libraries in my repo are not supported on OH 3 yet. Over the last few weeks I’ve been trying to make that clear in the readmes on the repo but that’s not complete.
The challenge is coming up with a new implementation that is backwards compatible which takes more work than just a couple of tweaks.
So on OH your only choice is to either make the changes to the code yourself (it boils down to changing Joda DateTimes to ZonedDateTimes) or use the JavaScript version of the library. The JavaScript version is likely going to be the only one I maintain going forward. Once we have a marketplace where these rules and libraries can be distributed like add-ons, I’ll convert the code to be a Rule Template and because I want to have as few extra dependencies as possible I’ll use JavaScript without the Helper Libraries.
I do plan on upgrading the python libraries where possible to work with OH 3, but the rules like ephem_tod and debounce will likely become deprecated. Why maintain them when users can just install them? It doesn’t matter what language they are written in because no one ever needs look at the code except me.
If using the Helper Library you have to at least have a configuration.py. Just copy the example one to a .py file and you can leave the defaults. I didn’t think the rule depended on configuration.py but it appears to try to import the name of the Group Item and the name of the TOD Item from there. I did away with that in the JavaScript version and just expect a hard coded TimesOfDay Group and TimeOfDay Item.
Anyway, if you want to use ephem_tod in OH 3, you must either fix the Python version or use the JavaScript version. The JavaScript version does not depend on the Helper Libraries. It also doesn’t create the Item for you nor does it use rules_utils (I haven’t written a JavaScript version of that yet and am not sure I will). It also doesn’t use item_init because I’ve not written the JavaScript version of that yet either and with MainUI it’s better to use a widget to initialize the DateTime Items anyway. See OH 3 Alarm Clock and OH 3 Examples: How to boot strap the state of an Item.
All you need to do is create a TimeOfDay String Item and a TimesOfDay Group.
Create your DateTime Items with the ephem_tod metadata and make sure they all have a valid state (not UNDEF, not NULL).
Then create a new rule in MainUI, copy the contents of ephemTimeOfDay.yml into the Code tab of your new rule. Save.
Finally run the rule by clicking the play button in MainUI. Watch the logs for errors. If there are no errors you are good to go. If not, the error should indicate what is wrong.