Shelly Binding

  • arpwatch on system level can detect if there is a NIC that gets an IP assigned ( again )
  • the network binding should be able to detect if a device is missing from the LAN
  • the log binding should be able ( it is configurable ) to detect if a thing goes online/offline

Hi markus,

I found out, that also my sendHttpGetRequest are affected of not working after some hours of using openhabe.

I today changed some of my rules and instead of using the binding, I tried to trigger the shellys with a http request. That was working well until some minutes ago.

Triggering the http requests with my webbrowser works like a charm.

So I think the issue isnā€™t caused by your binding.

Nevertheless, any next thing I can try?

thanks a lot, best regards,

Christian

EDIT:
My logs started getting a lot of warnings roughly one our ago.
Any hint what could cause this? (15:47 and ongoinā€¦)

2022-11-26 09:42:55.895 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 82ā€¦55, base URL = http://localhost:8080)
2022-11-26 15:47:17.259 [WARN ] [apache.cxf.jaxrs.utils.ResourceUtils] - No resource methods have been found for resource class javax.ws.rs.core.Response
2022-11-26 15:47:17.263 [WARN ] [apache.cxf.jaxrs.utils.ResourceUtils] - No resource methods have been found for resource class javax.ws.rs.core.Response
2022-11-26 15:47:19.540 [WARN ] [apache.cxf.jaxrs.utils.ResourceUtils] - No resource methods have been found for resource class javax.ws.rs.core.Response
2022-11-26 15:47:19.545 [WARN ] [apache.cxf.jaxrs.utils.ResourceUtils] - No resource methods have been found for resource class javax.ws.rs.core.Response
2022-11-26 16:17:21.589 [WARN ] [io.openhabcloud.internal.CloudClient] - Socket.IO disconnected: ping timeout
2022-11-26 16:17:21.591 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = 82ā€¦55, base URL = http://localhost:8080)
2022-11-26 16:18:05.219 [INFO ] [control.internal.WebSocketConnection] - Web Socket close 1006. Reason: Disconnected
2022-11-26 16:18:10.072 [WARN ] [mazonechocontrol.internal.Connection] - Request to url ā€˜Amazon Anmeldenā€™ fails with unknown error
java.net.UnknownHostException: alexa.amazon.de
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:220) ~[?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
at java.net.Socket.connect(Socket.java:609) ~[?:?]
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:289) ~[?:?]
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173) ~[?:?]
at sun.net.NetworkClient.doConnect(NetworkClient.java:182) ~[?:?]
at sun.net.www.http.HttpClient.openServer(HttpClient.java:474) ~[?:?]
at sun.net.www.http.HttpClient.openServer(HttpClient.java:569) ~[?:?]
at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:265) ~[?:?]
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:372) ~[?:?]
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:203) ~[?:?]
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187) ~[?:?]
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081) ~[?:?]
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:189) ~[?:?]

The Plus models are higher quality, more certifications (which is indicator for correct electrical design), have more features (like WLAN repeater, Bluetooth-based inclusion) and an interesting Add-On (coming soon), which allows to connect a variety of sensors. I would expect longer lifetimes (e.g. 2.5 makes it 3 years depending on usage). They are defiantly the better Shellys compared to Gen1.

If the device lost power the thing will go OFFLINE within 70sec. Once power is restored and the device is accessible the thing gies ONLINE. This can be detected in a rule, so in fact there is no need to extra functions (like other bindings).

ShellyEM provides power in W and voltage, so ampere could be calculated in a run: A = currentWatts/voltage. Only the Shelly 3EM returns the current in A.

1 Like

It seems that also other bindings have networks issues. So not related to the binding nor the Shelly device.

`
[io.openhabcloud.internal.CloudClient] - Socket.IO disconnected

[control.internal.WebSocketConnection] - Web Socket close 1006

ava.net.UnknownHostException: alexa.amazon.de
`

Check your network setup. If itā€™s W-LAN may the signal strength is too low.
Check network statistics (e.g. netstat -I and netstat -s ʔn Debian/PiOS): packet loss and TCP retransmits/connection resets
Maybe run perf for a longer time to check for constant bandwidth

Interesting that you mention the wifi repeater feature. I never read about that in any official Shelly documentation/shop/ad whateverā€¦ up to now I didnā€™t see any advantage compared to the 1st gen models. Iā€™ll keep an eye on the future developments, maybe there is a good reason to switch to the next gen (apart from 1st gen being no longer available at some point).

On my systems, the binding changes the IP for outbound websockets on the device to something like 172.xx . With this IP address, the outbound websocket communication does not get to the openhab serverā€¦ When I change the outbound IP on the UI of the device to the ā€œrealā€ IP, i.e. 192.xx, the communication works.

You should be able to configure which IP will be set on the devices in the Binding-Settings.
Openhab Settings, Bindings, Shelly

Hi,
I am running OH and and shelly-binding for a long time successfull (currently OH3.3).
I tried updating to OH3.4M4 and today OH3.4M5 - but shelly binding is flodding my log with errors after installing M5 (running in docker containers).
Is there a secret how to get shelly binding running on OH3.4M5?
I also tried org.openhab.binding.shelly-3.4.0M3-SNAPSHOT.jar and shelly_org.openhab.binding.shelly-3.4.0M3-SNAPSHOT.kar - but shelly binding does not work anymore.
Any hint is appreciated.
best, Kai
(I hope shelly binding will work in OH3.4-final out of the box :slight_smile: )

1 Like

Iā€™m seeing similar issues with OH3.4M3-M5 using the org.openhab.binding.shelly-3.4.0M3-SNAPSHOT.jar. I am able to get my Shelly 2.5 to go ONLINE and work with COAP, but none of my Shelly 1 will go ONLINE. Hopefully it is remedied before OH3.4 is released, otherwise I will just stay with OH3.3 which works fine.

I yesterday installed a complete new system on a fresh SD card. Having backup functionality of openhab and deconz, that was much easier than I thought and with the old SD card in backup, I can switch them, should I have forgotten something.

Iā€™ll see if the errors come up again.

Many thanks for your help!

With the latest snapshots the energy channels of some devices, e. g. PlugS, got the unit J instead of kWh. Also new items linked to energy channel get J.

Is this M5? if yes, please run ā€žbundle:list | grep Californiumā€œ on OH console and report the output. I suppose that M5 brings 2.7.4 (M3 was 2.7.3)

OH3.4M5:

 openhab> bundle:list | grep Californium                                                                                     
 253 ā”‚ Active   ā”‚  80 ā”‚ 2.7.3                  ā”‚ Californium (Cf) Core                                                       
 254 ā”‚ Active   ā”‚  80 ā”‚ 2.7.3                  ā”‚ Californium (Cf) Element Connector                                          
 255 ā”‚ Active   ā”‚  80 ā”‚ 2.7.3                  ā”‚ Californium (Cf) OSGi                                                       
 openhab>

Here comes my configuration on a raspi:
3.4.0-SNAPSHOT - Build #3189

openhab> bundle:list | grep Californium
243 x Active x 80 x 2.7.3 x Californium (Cf) Core
244 x Active x 80 x 2.7.3 x Californium (Cf) Element Connector
245 x Active x 80 x 2.7.3 x Californium (Cf) OSGi

Hi everyone,

I have a problem with 7 of my 8 Shelly D/W2 sensors - they just stopped working in openHAB :frowning:

openHAB version is 3.3.0 on a Raspi 3B+, Shelly binding is also 3.3.0. The D/W2 sensors use firmware v1.12.1-ga9117d3. I made the whole configuration through UI (e.g. no .item files or anything)

The problematic D/W2 sensors suddenly showed up with ā€œError: Commā€ in the Things listing. I was able to get them back online with pushing the pin on the sensor, then disabling and enabling the Thing in openHAB. But they donā€™t seem to send any updates now, for example when I open a window.

Next thing I tried was unlinking all Items (not deleting them), delete the Thing and creating it again. The thing is in ā€œConf pendingā€ status. After waking up the sensor, the status is changed to ā€œOnlineā€ and I link the existing Items to the channels again. Feels totally as it should. Butā€¦ no changes in function, still no updates.

Rebooting openHAB or the sensor has also no effect.

When I wake up the sensor through the pin, I can access the web interface without any problems, and it also shows the current state (Open/Closed, Tilt, Temperature, ā€¦) and changes it when I open or close the window.

One of the 8 sensors is working like nothing has happened. I have also 8 Shelly TRVs which are working just fine with openHAB.

Since Iā€™m running out of ideas, any help to solve the problem is very much appreciated. Thanks.

Did you upgraded the firmware before?

enable DEBUG log for the binding, you should see the sensor updates in the log. If not something is wrong with the devices/firmware

guys enable DEBUG logging for proper analysis, without we are just talking about symptoms

Is there currently an issue with shelly 1 plus and authentication? I run such a device w/o password and it works well, but as soon as I configure a password on the shelly device and at the thing properties openhab gets an error ā€œunknown username or passwordā€. Iā€™m able to configure a password only on both sites.

Do I need to set more config parameters for the shelly 1 plus device beside the password regarding authentication? I cannot find a value to configure for ā€œuser idā€ in the thing properties. where do I found this config paramter?

Many thanks
Chris

Tried new batteries? :wink: