RemoteOpenHAB-Binding and Enocean-Rocker

Left: Raspi3 with OH3 and Enocean-Stick.
Switch is set by rule - listening to rocker-events.

Right: Docker with OH3 and Remote-OH-Binding. Switch-Item is assigned to Switch-Item on the left.

If I press the Enocean-Button, both switches are toggled correctly.
But the physical light (philips hue) doesn’t switch.

If I switch the item on the right then it works.
If I switch the item on the left, it doesn’t.

Do I need another profile? Or what’s my problem?

If I correctly understand, everything is ok with Enocean binding and remote openHAB binding, your problem is with your hue light.
On which instance is installed the hue binding ?
I imagine your hue light is switched on/off by a rule. On which instance is run this rule ?
Can you show this rule ?
Can you show your definition of the hue item ?

And look at logs to see what events are published on the openHAB bus.

PI:
Enocean-Stick
Thing 1
Item Switch1
Item is switched by rule with sendCommand depending on event

QNAP:
Remote-OH-Binding
Hue-Binding
Item HueSwitch is linked to Switch1
Item HueSwitch is connected with channel of Hue

Switching physical enocean switch:
Log on pi:
2020-12-22 14:13:42.669 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EnoceanRockerSwitchSarah_RSSI' changed from -88 to -71

2020-12-22 14:13:42.675 [INFO ] [openhab.event.ChannelTriggeredEvent ] - enocean:rockerSwitch:FTXGRYP0:sarah:rockerswitchA triggered DIR1_PRESSED

2020-12-22 14:13:42.679 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EnoceanRockerSwitchSarah_LastReceived' changed from 2020-12-22T14:13:00.125621+0100 to 2020-12-22T14:13:42.664881+0100

2020-12-22 14:13:42.961 [INFO ] [openhab.event.ChannelTriggeredEvent ] - enocean:rockerSwitch:FTXGRYP0:sarah:rockerswitchA triggered DIR1_RELEASED

2020-12-22 14:13:42.965 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EnoceanRockerSwitchSarah_LastReceived' changed from 2020-12-22T14:13:42.664881+0100 to 2020-12-22T14:13:42.953199+0100

2020-12-22 14:13:43.957 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Licht_OG_Sarah_Decke_Schalter' received command ON

2020-12-22 14:13:43.968 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Licht_OG_Sarah_Decke_Schalter' changed from OFF to ON

Log on qnap:

2020-12-22 14:14:10.710 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Licht_OG_Sarah_Decke_Schalter' changed from OFF to ON

So it seems there’s no command event on the qnap - only a change-event and that does not switch the physical item…

Michael

I assume you failed to tell us the 2 openHAB versions running?

OK, everything is normal there.
One point to understand is that commands sent from a remote server will not be handled by the main server. The main server will only handled state updates from the remote server, it is what you noticed.
At the reverse, any command sent from the main server to an item linked to a remote item will result to a command on the remote server.

To come back to your case, I see a clean option to achieve what you want. It will consist in moving your rule to your main server (QNAP) and remove it from your remote server (PI). You don’t need “Switch1”. This rule will have as trigger the ChannelTriggeredEvent from your Enocean binding and as command a command to switch ON your hue light. Of course, you will have to “link” your remote trigger channel to a local trigger channel. For that, just use the remote thing created by the remote openHAB binding for your Enocean thing. You will find the needed trigger channel on this thing.

I’m using OpenHAB3 on both computers.
Linking the thing instead of the items did not work:

That’s why I was trying it with the proxy-item…

With a remote OH3 server, you need to create an API token in your remote server using MainUI and then provide this token as setting to your remote server thing in your main server. It will allow running actions rrequiring authentication like getting your remote things.
Here is the setting to set in the binding:

In MainUI (on your remote server), click on your profile at left bottom in WEB browser. You will then see that you can create API token.

Thank you! Now it works.
Now I could share the Enocean-Stick-Thing or the Enocean-Switch-Thing (or the Enocean-Switch-Thing-Items which was not the best solution).
I have to find out in which situation what is the best-practice…

Hmm, it’s still no working solution…
The enocean-rocker-switch-thing is shared and seems online in both machines.
But the trigger events are only available on the machine where the physical stick is installed:

2021-01-03 12:59:39.207 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EnoceanRockerSwitchSarah_RSSI' changed from -70 to -71

2021-01-03 12:59:39.212 [INFO ] [openhab.event.ChannelTriggeredEvent ] - enocean:rockerSwitch:FTXGRYP0:sarah:rockerswitchA triggered DIR1_PRESSED

2021-01-03 12:59:39.216 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EnoceanRockerSwitchSarah_LastReceived' changed from 2021-01-03T12:59:17.901524+0100 to 2021-01-03T12:59:39.200756+0100

2021-01-03 12:59:39.456 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EnoceanRockerSwitchSarah_RSSI' changed from -71 to -70

2021-01-03 12:59:39.462 [INFO ] [openhab.event.ChannelTriggeredEvent ] - enocean:rockerSwitch:FTXGRYP0:sarah:rockerswitchA triggered DIR1_RELEASED

2021-01-03 12:59:39.468 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EnoceanRockerSwitchSarah_LastReceived' changed from 2021-01-03T12:59:39.200756+0100 to 2021-01-03T12:59:39.450788+0100

I can’t get any signal on the other machine…

Did you add the corresponding remote thing on your main server ? Do you see the trigger channel on this thing in MainUI on your main server ? Did you create a rule based on the local trigger channel in your main server ?
If the answers are true to these three questions, please show:

  • your thing with its trigger channel in your main server
  • your rule with the trigger in your main server
  • enable the TRACE logs of the binding and show how they look when your remote trigger channel enocean:rockerSwitch:FTXGRYP0:sarah:rockerswitchA is triggered.

I have installed the Remote-OpenHAB-Binding only on the main-server.


It looks online and correct to me:

This looks maybe wrong?

remoteopenhab:thing:192_168_10_119:enocean_rockerSwitch_FTXGRYP0_sarah:enocean_rockerSwitch_FTXGRYP0_sarah_rockerswitchA

UID: remoteopenhab:thing:192_168_10_119:enocean_rockerSwitch_FTXGRYP0_sarah
label: Enocean Rocker Switch Sarah
thingTypeUID: remoteopenhab:thing
configuration:
  thingUID: enocean:rockerSwitch:FTXGRYP0:sarah
  buildTriggerChannels: true
bridgeUID: remoteopenhab:server:192_168_10_119

That looks apparently good.

And you used remoteopenhab:thing:192_168_10_119:enocean_rockerSwitch_FTXGRYP0_sarah:enocean_rockerSwitch_FTXGRYP0_sarah_rockerswitchA as channel trigger for your rule ?

Show the TRACE logs of the the remote openHAB binding to check that the trigger event is received by the binding and what is its content.

I just cleaned the OH-Cache and installed the latest update - and suddenly it works?!?
Thank you for your help!

Maybe you had lost the connection with your remote server and events were no more received. This can happen if you restarted your remote openHAB server.
In case of doubt, restart the binding (or the main server).