Remote openHAB binding not sending updates to OH2

I still habe a instance of OH2 running.

So I have configured the remote binding on OH3 to get Items from the older server.
This works for the few items I have setup currentlx.

Now I would like to send some Items from OH3 to OH2.

But it does not seem to work.

I habe the Home Connect binding for my new washer configured on OH3.

Number:Time            Waschmaschine_K_RemainingProgramTimeState   "Remaining program time [JS(clockfmt.js):%s]"           {channel="homeconnect:washer:api_bridge_k:waschmaschine_k:remaining_program_time_state", channel="remoteopenhab:server:oh2:Waschmaschine_K_RemainingProgramTimeState"}

On OH2 I have created a dummy Item.

Number:Time           Waschmaschine_K_RemainingProgramTimeState  "Remaining program time [JS(clockfmt.js):%s]"

When I set values via the OH3 console it works.

But then the washer is active, the new values from OH3 do not get send to OH2.

OH3 log:

2023-04-30 22:30:22.328 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Waschmaschine_K_RemainingProgramTimeState' changed from 120 s to 60 s

My guess is that the valued are not set by a commandby the Home Connect binding.
But the remote binding only sends updates when the Item receives a command. Right?

It transfers any item command from the local server to the remote server

I tried to workaround this by using a proxy Item in OH3 and send a command for every update.

Number:Time             remoteWaschmaschine_K_RemainingProgramTimeState    "Remaining program time [JS(clockfmt.js):%s]"    {channel="remoteopenhab:server:oh2:Waschmaschine_K_RemainingProgramTimeState"}
rule "Waschmaschine_K_RemainingProgramTimeState Update"
when
    Item Waschmaschine_K_RemainingProgramTimeState changed
then
    remoteWaschmaschine_K_RemainingProgramTimeState.sendCommand(Waschmaschine_K_RemainingProgramTimeState)
end

But now I got another problem:

2023-04-30 22:31:07.146 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'remoteopenhab-1' failed: An error occurred during the script execution: Could not invoke method: org.openhab.core.model.script.ac
tions.BusEvent.sendCommand(org.openhab.core.items.Item,java.lang.String) on instance: null in remoteopenhab

What am I doing wrong?

What you try to do is not possible with the remote openHAB binding.
Or you would need to also install the binding in your OH2 server. Take care what you setup in that case because you could easily enter in an infinite loop scene when the binding is installed on both servers.

Thanks for the conformation, that it not working this way.

I thought about installing the binding on OH2, too.

But according to Add-ons | openHAB it is not available for OH2.

EDIT: I “solved” it now by migrating the the corresponding rules to OH3, so I do not need the items in OH2.
This would be the prefered way, anyway. :wink:

In those rare cases where you would need to do this because there is no other way, you could use the MQTT Event Bus approach. But the same dangers exist of infinite loops. The Remote openHAB user will always be easier to use, but sometimes there are weird little edge cases where you need more control.

But as you note, moving the rules to OH 3 would be preferred so the OH 2 instance is just sending updates and receiving commands.

You’re right, I believe I created the binding for OH3.