-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Is it planned for these libs to eventually become interface-compatible with the legacy OpenHAB Helper Libraries❓
Alternatively, provide a migration guide?
Why consider?
I don't have any current stats to back this up, but I believe the helper libs are/were pretty popular back in the day (esp. as they were available in multiple languages 🥇 and really well documented 📖 ).
I believe the repo might have been abandoned and the original libraries available at: https://github.com/openhab-scripters/openhab-helper-libraries may no longer work as-is with OH >= 3.x, but there are forks, such as these:
- https://github.com/CrazyIvan359/openhab-helper-libraries/
- https://github.com/jsjames/openhab-helper-libraries
... that just work ™ - to this day (OH 5.0 snapshot, legacy Jython-based binding).
I see these libs adopt some of similar syntax, like @rule annotations, so it would be awesome 🚀 to make the migration as painless as possible.
- Note: I'm not at all proposing to overencumber the libraries with needless legacy.
Just making a practical observation that since there's something out there (with non-zero install base), it may make some sense to consider leveling with those APIs where it makes sense, to make it easier for people to jump ship to the new coolness 😉.
Same goes with directory organization etc.
Alternative ideas / constraints
- IMHO it only makes sense to support
python 3.xgoing forward, which means even if these libs were 100% API-compatible with theopenhab-helper-libraries(legacy), one would likely need to at least run their scripts through2to3for syntax compatibility. - The new libraries get to use much more modern stuff with some legacy APIs likely not being needed at all. A "breaking changes" kind of note for these would be helpful though (and while the implementation will surely differ, I'm not sure if the APIs need to vary too much).
- Alternatively, the
org.openhab.automation.pythonscriptingbinding could allow choice of which helper libs to use (this cleanroom implementation vs. a legacy-compatible).
PS. @HolgerHees hats off to you for the great work you've done w/ both these libs and the OH binding. 👏 👏 👏
I haven't been able to run it on my production setup yet (too many legacy rules to rewrite), but it is looking very promising already when I was playing with it on a sandbox. Don't want to overpromise anything as I don't have much time for personal projects lately, but would happily help out in the limited capacity I can (at least testing & feedback, possibly some coding)