Shelly binding OH3.1.0RC1 (error shellyplug-s-b50ad5: CoAP Exception)

With OH3.1.0RC1 the shelly binding detects the shelly devices.
All properties are correct shown but none of the devices is coming online.

Firmware version shellyplug-s: 20210429-101611/v1.10.4-g3f94cd7
I assume below is the issue but don’t know how to fix it.
shellyplug-s-b50ad5: CoAP Exception

2021-07-03 20:56:06.567 [INFO ] [elly.internal.coap.ShellyCoapHandler] - shellyplug-s-b50ad5: CoAP Exception (Unknown Host) : Name or service not known

at Method) ~[?:?]

at$PlatformNameService.lookupAllHostAddr( ~[?:?]

at ~[?:?]

at$NameServiceAddresses.get( ~[?:?]

at ~[?:?]

at ~[?:?]

at ~[?:?]

at ~[?:?]

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

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.refreshStatus( ~[?:?]

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

at java.util.concurrent.FutureTask.runAndReset( [?:?]

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

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

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

at [?:?]

event.log file
2021-07-03 20:57:06.651 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘ShellyplugSB50Ad519216810013DeviceUptime’ changed from 1097 s to 1157 s

2021-07-03 20:58:06.734 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘ShellyplugSB50Ad519216810013DeviceUptime’ changed from 1157 s to 1217 s

2021-07-03 20:59:06.893 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘ShellyplugSB50Ad519216810013DeviceUptime’ changed from 1217 s to 1277 s

is your shelly thing still available under the IP that you configured it resp. it once was detected with ?

Yes still available via GUI and PING.

Not sure what you mean with this. When not working I deleted it and added it again. Was always found automatically.

As far as I understand the error / exception message you shelly cannot be reached by it’s name:

Can you ping it in your network by using that name ( the name that is reported in the error message ) or do you use another name when you ping it ?

My initial answer was more referring to a setup by using a .thing file and configuring the thing by using the ip address which might have changed because of the DHCP lease time might have expired.

Yes I can ping it by name and ip address. IP address is fixed based on mac address. In the GUI is see also the IP address and thought that was used.



You run OH on a windows host ?

No on Synology server in a docker. This means my ping was not a good test. Is there a way to ping from karaf?. And why is the IP address not used?

Does a ping by name work in a shell on the synology ?

No only with IP address

I would suspect a DNS problem here. It would match with the error message.
But your other screenshot shows the IP address that is being used in the UI.
What are the parameters that are used to start docker esp. with regard to network ?


Openhab3.1.0RC1.json (2.9 KB)

Who has a working Shelly binding on Synology docker?

Please try to configure coap on your shelly to use unicast with openHAB IP address as target.

Thanks. I did. Default port is 5683. If that is correct than this doesn’t solve the issue. I believe the issue more the from Openhab to the shelly device. I will Friday try to make a sniffer capture. Maybe that will give some details.

Is there a way to upload a packet capture file?

In case the problem is the file’s extension - rename it to e.g. .txt before uploading. Describe that in your message. In case the problem is the file size I would suggest to use a third party file hoster and just provide the link here.

only shelly.pcap.txt (4.5 KB)
I uploaded a capture file (remove .txt) from communication between OH 3.1.0 docker installation running on the Synology nas (ip .51) and a shelly device (ip .13). I see communication between the 2 points but also a message destination unreachable.

Also on the nas I’m running OH 2.5 as a native install (has the same ip address as the docker install; using same network) and tried to adopt the same shelly device. That is working fine.
Any idea how to get this docker install working?