I developed a new version of XMPP (Jabber) binding (it`s my primary messenger), which is based on the newest version of the Smack Library. Binding allows you to send and receive messages via xmpp using new Actions interface.
For example:
rule "Leak detected"
when
Item Xi_Leak changed
then
if(Xi_Leak.state == ON) {
val actions = getActions("xmpp","xmppclient:xmppBridge:xmpp")
actions.publishXMPP("pavel@example.com","Warning! Leak detected!")
}
end
And process received messages like this:
rule "Turn off all lights with separator and reply"
when
Channel "xmppclient:xmppBridge:xmpp:xmpp_command" triggered
then
var actionName = receivedEvent.getEvent().split("#")
if(actionName.get(1).toLowerCase() == "turn off lights") {
Group_Light_Home_All.sendCommand(OFF)
val actions = getActions("xmpp","xmppclient:xmppBridge:xmpp")
actions.publishXMPP(actionName.get(0),"All lights was turned off")
}
end
Thanks for your work.
I suggest you create a .jar and a docs page please to explain settings so anyone can test it.
Then check out Contribution | openHAB and simply create the PR (openhab2-addons should be the right repo).
Please be aware though that maintainers are currently very busy with ESH reintegration so it might take some weeks to get answered, meanwhile you can still optimize it based on feedback from here.
If you go to the original addons2 repository page on github, there should be a yellow pull request note. If you click that github will create a PR for you.
You can then continue to push commits to your own repository and they are reflected in the created PR.
You will probably have to fix a few findings of the reviewers.
A requirement for accepting a new extension is indeed the new build system usage.
I’m just not sure if it makes sense to migrate if still changes are to expected. Because we have no working guide for eclipse IDE development with the new build system.
I did not see information about the transition to a new build system, I used the current documentation for the developer.
I think, it makes sense to wait for a new release with tested and ready-to-use development tools and documentation. While it is possible to use XMPP binding from my fork.
If someone needs it, I can put the .jar file for easy installation into the system.
I tried to use old OH1 XMPP binding first, but it didn’t work for me. And yes, my version is deprecating an old binding, except for support of sending attachments. I can add this feature later if interesting for anyone.
I want to use your XMPPClient in my OH2.4 installation.
But from the openhabian installation for my Raspberry Pi your binding is not included.
How can I install it?
I realize this is a bit stale, but I will leave this anyway in case anyone else is searching around.
I do not think xmppclient (this binding) is available in 2.4, only 2.5 and later. It is now the default XMPP binding. I am still on 2.4 because reasons. So I have to use the old XMPP Action (action-xmpp) which can only send but not receive.
You can see this if you go to https://www.openhab.org/addons/bindings/xmppclient/ and click on the drop-down for Version at the upper right. Only version 2.5 shows any information, 2.4 and earlier just give a 404.
There is not much information out there about this, so I thought I would contribute my $0.02.
Soon I will upgrade, because it will be nice to be able to send XMPP messages to openHAB in addition to other control options.
Jabber xmpp action/binding and OMEMO encoding possibel?
I use the XMPP action binding on OH2, but with the old binding from OH1 (snapshot 1.14). All works as expected and descripted in the doc: https://www.openhab.org/addons/actions/xmpp/
I ask mself, if it is possible to use the encoding OMEMO in addition. I cannot find any documention about this for this “old” binding, or the new version https://www.openhab.org/addons/bindings/xmppclient/
It would depend if whatever underlying library openHAB is using for XMPP supports it or not. I would venture a guess probably not, but I did exactly zero research to come up with that answer.
OMEMO I think is somewhat over-recommended anyway. If your server is using TLS, then there is already some level of encryption. But the way some of these apps (Conversations on Android being one I generally recommend but comes to mind in this context) make it sound is that if you are not using OMEMO then your traffic is totally unencrypted which is simply not true.
The other thing I realized is that you only really need to consider OMEMO when you don’t know or necessarily trust the server. When I first started using XMPP I went through someone else’s server and I was really keen to use OMEMO and so I did. Eventually I set up my own server (Prosody is great and not that hard actually) and I don’t worry about OMEMO any more now.