Add packages to my Openhab

HI Guys, I have the problem that I don’t finde any informations how to add packages .
For example I need this one:

import org.openhab.library.tel.types.CallType

What should I do to import/add the pakage to my openhab?

Hi Chris, welcome to the community :slight_smile:
You want to put the import statement at the beginning of your rule file. Here is an example, that might help you:

https://community.openhab.org/t/fritz-box-tr-064-save-the-number-of-the-last-call/22273

Hi Stefan, thanks for your reply, not the import is my problem, thx package:

rule.rules

import org.openhab.library.tel.types.CallType

rule “Phone is ringing”

The question is how and where I have to add the Package for “org.openhab.library.tel.types.*” to my openhab System

Hi Chris, maybe I do not understand your issue correctly. As it is an openhab library it “is there” without installation. The import statement tells openhab to load it as part of loading the rule file during initialisation.

I did a quick installation of the current openhab version (2.5.4-1) on my desktop and tried to follow the example I pointed out. The TR064 binding throws errors when the phone rings, but I did not see any issues when the rule file was loaded, meaning the import statement worked (although it should be pointed out that loading .* libraries is deprecated).

1 Like