Development: Send Command to another Binding

Hi, this is a cross-post to https://www.eclipse.org/forums/index.php/t/1085686/ because I hope it is just a simple answer and I fear that the question might go unread/unanswered at eclipse, I hope that this is OK?

What is the correct Java method call for sending a command to another binding’s Channel, such that is is handled exactly as if someone had clicked in the UI?

I tried handleCommand() and postCommand() but they are not working as expected.
More detail is over at the ESH forum’s Thread.

Thanks in advance!

Wouldn’t you want to do this in a Rule, so the user has control of what happens? Trying to understand the use case.

Well, the use case sounds similar to a rule, but then it’s different:
I kind of want to substitute the “original binding’s” panel in PaperUI by my own binding’s panel, which should “mirror” specific other channels. And I got it completely working already with receiving values (numeric, boolean) but not with sending. The user should be spared with setting up logic, but instead only configures the channels to be mirrored.

For future reference: I was able to do it with postCommand, with an additional ItemChannelLink.
The details can be found here: https://www.eclipse.org/forums/index.php/m/1760050/#msg_1760050 and the code here:
https://github.com/pokerazor/openhab-binding-jade/blob/master/src/de.unidue.stud.sehawagn.openhab.binding.jade/src/main/java/de/unidue/stud/sehawagn/openhab/binding/jade/handler/SmartHomeAgentHandler.java#L105 (because it is WIP and there are copyrighted parts used and not checked in, it won’t work out of the box, if anyone is trying)

So this is solved :slight_smile: