Threema

Hey everybody,

I recently started to work on a Threema binding because Telegram is of no option for me. You can find the source at GitHub - lordyavin/openhab-addons at threema.

I’m ready to integrate the addon but because of the commons-io dependency of Threemas SDK I fail to “mvn install” it. Originally the SDK refrences commons-io 2.4. An upgrade to 2.10 did not help.

[ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-binding-threema; type=karaf.feature; version=3.2.0.SNAPSHOT; filter:="(&(osgi.identity=openhab-binding-threema)(type=karaf.feature)(version>=3.2.0.SNAPSHOT))" [caused by: Unable to resolve openhab-binding-threema/3.2.0.SNAPSHOT: missing requirement [openhab-binding-threema/3.2.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.binding.threema; type=osgi.bundle; version="[3.2.0.202107120651,3.2.0.202107120651]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.binding.threema/3.2.0.202107120651: missing requirement [org.openhab.binding.threema/3.2.0.202107120651] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.apache.commons.lang)(version>=2.4.0)(!(version>=3.0.0)))"]]

Looking forward for your responses and tips and hope that it might be useful for others.

Wow, what a welcoming community :slightly_frowning_face: Anyway, I have an update. I resolved the dependency issues by upgrading all dependencies of the original SDK and replaced org.json with Gson. So far so good. I pushed the changes of the SDK to GitHub - lordyavin/threema-msgapi-sdk-java.

I’m unsure how to proceed. For some reasons Threema does not distribute the SDK via maven, so I would have to do that. Any opinions if I should include it in the binding or publish it to a maven a repository?

Late answer, but still - your post I think belongs more into development category than addons. Maybe GitHub - marchof/three4j: Threema Gateway Client API for Java will give you better luck? Anyhow, if service provider publishes openapi descriptor you can generate client automatically.

Other option is publishing official SDK under your own maven groupId (ie. io.github.lordyavin/threema-msgapi-sdk). Look for materials mentioning “publishing to maven central”.

Best,
Łukasz

Thanks for pointing me to three4j. Will check it out.