Shelly Input channel


I have aproblem with the Shelly-Binding. I try to read when the button is pressed. I would like to get a state OFF and if I press it again the state should change to ON.

As mentioned on the shelly-binding side, I have to add the #input channel. I added the item with a switch like that:


The output channel is working perfectly. But the state of the input item is no changing if i press the button.

Does anyone have a idea what’s wrong with my configuration?

Best regards

Do you see anything in the logs regarding the input?

You may need to define both input and output channels.
Doc’s example:

Switch Shelly_XXXXX3_Relay        "Garage Light"                  {channel="shelly:shelly1:XXXXX3:relay#output"}
Switch Shelly_XXXXX3_Input        "Garage Switch (Input)"         {channel="shelly:shelly1:XXXXX3:relay#input"}

The input is not changing in the log. And I added both input and output.

In the things file, I added the normal configuration and additionlly the parameter “eventsButton”. This one is set on “true”.

Thing shelly:shelly25-relay:XXXXX3 "Shelly 25 Relay XXXXX3" @ "Hall Way" [deviceIp="x.x.x.x", eventsButton="true"]

Sounds like the channel is not linking with OH (no brainer right, :laughing:). Have a look at github and see if there is an issue similar to yours. If not you may want to open one.

I have this issue too. Items update, but sometimes it takes up to a minute - so it appears openHAB is polling each device perhaps, but push updates are not being received.

I used the Shelly app to look at the Actions settings for each of my devices, and found that the IP address configured there ( was NOT the IP of my openHAB installation (192.168.x.x). Presumably the Shelly binding sets those URLs, I sure didn’t do it. Changing that IP address to my openHAB IP address fixed the issue, and the updates happen right away.

Unfortunately, when I delete and re-add the Thing (I’m using .thing files), the binding sets the Action URLs all back to that weird IP address - which isn’t even my ISP-assigned IP. I get this in my logs (I think one Shelly has a bad connection):

2020-06-29 06:15:53.650 [hingStatusInfoChangedEvent] - 'shelly:shelly1pm:68c63afb6420' changed from ONLINE to UNKNOWN

2020-06-29 06:15:53.661 [me.event.ThingUpdatedEvent] - Thing 'shelly:shelly1pm:68c63afb6420' has been updated.

2020-06-29 06:15:53.671 [hingStatusInfoChangedEvent] - 'shelly:shelly1pm:500291f01acf' changed from UNINITIALIZED to INITIALIZING

2020-06-29 06:15:53.690 [hingStatusInfoChangedEvent] - 'shelly:shelly1pm:500291f01acf' changed from INITIALIZING to UNKNOWN

2020-06-29 06:15:55.963 [me.event.ThingUpdatedEvent] - Thing 'shelly:shelly1pm:68c63afb6420' has been updated.

2020-06-29 06:15:55.976 [me.event.ThingUpdatedEvent] - Thing 'shelly:shelly1pm:500291f01acf' has been updated.

==> /var/log/openhab2/openhab.log <==

2020-06-29 06:15:57.737 [ERROR] [.eclipse.californium.core.CoapClient] - could not set and start client endpoint Cannot assign requested address (Error setting socket option)

	at Method) ~[?:1.8.0_152]

	at ~[?:1.8.0_152]

	at ~[?:1.8.0_152]

	at ~[?:1.8.0_152]

	at org.eclipse.californium.elements.UdpMulticastConnector.start( ~[?:?]

	at ~[?:?]

	at org.eclipse.californium.core.CoapClient.setEndpoint( ~[?:?]

	at org.openhab.binding.shelly.internal.coap.ShellyCoapHandler.start( ~[?:?]

	at org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.initializeThing( ~[?:?]

	at org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.lambda$0( ~[?:?]

	at java.util.concurrent.Executors$ [?:1.8.0_152]

	at [?:1.8.0_152]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201( [?:1.8.0_152]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ [?:1.8.0_152]

	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_152]

	at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_152]

	at [?:1.8.0_152]

==> /var/log/openhab2/events.log <==

2020-06-29 06:15:57.756 [hingStatusInfoChangedEvent] - 'shelly:shelly1pm:500291f01acf' changed from UNKNOWN to ONLINE

2020-06-29 06:15:57.764 [me.event.ThingUpdatedEvent] - Thing 'shelly:shelly1pm:500291f01acf' has been updated.

PS Thank you for the link @H102 but I don’t think it’s feasible to look through the 321 pages of results the link sends me to to resolve this problem. I can’t see any Shelly binding issues there.

Any ideas why the binding is applying this strange IP address?

Ah, I can see how to get only Shelly issues now - the link by @H102 may have been incorrectly URL encoded - hopefully this works and only has 3 pages of issues:

Looks like I should probably do an update, since I’m on 2.5.0 and now there is 2.5.6. I will try this as there seems to be a lot of active development of this pretty wonderful binding.