Exec binding in OH2

Hi, with the new approach in OH2 i can’t deal with Exec binding and Network binding.
I want to use them to reboot my RPi screens. So far I’ve set up things like this:

Thing exec:command:piAntre_reboot [ command="ssh pi@ sudo reboot", interval=0, timeout=5, autorun=false]


Thing network:device:piAntre [ hostname="", port="0", retry="1", timeout="5000", refresh_interval="60000", use_system_ping="false", dhcplisten="true" ]

These however generates warning for exec:
[WARN ] [home.core.thing.binding.ThingFactory] - Could not create channel ‘run’ for thing type ‘exec:command:piAntre_reboot’, because channel type ‘exec:running’ could not be found.

and ERROR for network:
[ERROR] [nding.network.service.NetworkService] - Cannot use DHCP listen: Permission denied (Bind failed)

I’d like to have switch showing status of remote Pi screen as online (ON) and when by switchnig it OFF Pi will reboot.

Could anybody help?

For the Network binding, see the following for giving openHAB permission to listen on low numbered ports.


Unfortunately I can’t help with the exec binding problem. But I wonder what your Item definition is. Per the documents there isn’t a “running” channel. Did you mean to use the “run” channel?

According to the docs the channel ID is called “run”. But in the example section it’s called “running”:

Switch APCRunning { channel="exec:command:apc:running"}

So maybe that’s the reason for misunderstanding.

In terms of NETWORK binding, I’ve set up permissions following Rich guideline and now I get:
[ERROR] [rvice.dhcp.ReceiveDHCPRequestPackets] - DHCPREQUEST field is missing
but the thing itself seems to work fine so the switch is ‘ON’ when the thing is online.
Switch is configured as follows:

Switch Network_piAntre_status "piAntre | status" (Network, gStatus) { channel="network:device:piAntre:online" }

In terms of EXEC binding my item is as follows:

Switch Network_piAntre_reboot "piAntre | reboot" (Network, gStatus)   { channel="exec:command:piAntre_reboot:run"}

But I get this when turn the switch:
[INFO ] [ome.core.thing.internal.ThingManager] - Not delegating update ‘ON’ for item ‘Network_piAntre_reboot’ to handler for channel ‘exec:command:piAntre_reboot:run’, because thing is not initialized (must be in status ONLINE or OFFLINE).

Now I need to run Network_piAntre_reboot by turning switch ‘OFF’ and have the switch as ‘ON’ based on the network:device:piAntre status.

Something to deal with the channels i guess but how to link these 2 things?

Also I’m getting:
[WARN ] [org.openhab.io.net.http.HttpUtil ] - Method failed: HTTP/1.1 503 Service Not Available

and HABpanel stopped working :-/