Jython helper libraries for OH3

First, great work on the adaption and the binding :slight_smile:

Second, my question, i have a module which is under lib/personal. from this module i can’t user the Telegram action defined as it keeps saying global name ‘actions’ is not defined which is expected, but when i use “from core import actions” it also doesn’t work with the error “‘module’ object has no attribute ‘get’” which i can imagine is getting mixed with another module.

In short, is there a possibility to use binding actions from a module placed in lib/personal folder?
I tried importing “scope” but didn’t help.
By the way, it was working fine with OH2.5 and Telegram binding-1

Ok, i found out how to do it. I needed to import Things as in:

from core.actions import Things
telegram = Things.getActions("telegram", "telegram:telegramBot:Bot-UUID")
telegram.sendTelegram("Hello From Telegram")
4 Likes

@Mohamed_Negm I’m glad you found the solution! Sorry I didn’t get back to you sooner, I don’t have much time for the forum right now.

1 Like