Shelly Binding

Thanks @samtd,
in the meanwhile I’m using the HTTP binding to retrieve the few values I need with a HTTP GET on the rpc url.

@villaRob Same problem here with a shellypro3em

I get the returnedKWH channels, but not the totalKWH one that the documentation claims. Furthermore, I don’t want to sum meter1-meter3 manually and was looking at the device channels accumulatedReturned and accumulatedWTotal but they show mostly garbage (or maybe only the 1minute value?).

I’m also super confused by the documentation talking about kW/h which isn’t a unit that exists.

I’ve turned on MQTT on the shelly and I’m seeing this getting published:

shellypro3em/events/rpc {“src”:“shellypro3em-xxxx”,“dst”:“shellypro3em/events”,“method”:“NotifyStatus”,“params”:{“ts”:1703018520.62,“emdata:0”:{“id”:0,“a_total_act_energy”:16256.06,“a_total_act_ret_energy”:0.00,“b_total_act_energy”:14826.41,“b_total_act_ret_energy”:7.23,“c_total_act_energy”:14795.21,“c_total_act_ret_energy”:0.84,“total_act”:45877.69,“total_act_ret”:8.07}}}

Where all three phases showing about 15kWh each should be right, as this is metering a 3-phase wallbox.

I assume this is also the discrepancy @Wolfgang_Rosenauer was seeing a while ago.

For now, I’ll also try the MQTT json transform magic, thanks @samtd !

Happy to test more builds but I’m currently in a hurry to get this working properly. The annoying bit is that even in the Shelly UI I basically cannot get to the true total counter values, it insist on telling me the “Energy last minute”.

Edit: Unlike the example by @samtd the total_energy is on a different topic for me, and I need different transforms as well.

Current thing:

Thing mqtt:topic:shellypro3em "MQTT Shelly Pro3EM" (mqtt:broker:d4979348) {                                                                                                                                                          
Channels:                                                                                                                                                                                                                            
Type number : total#act_power "Total active power" [ stateTopic="shellypro3em/status/em:0", transformationPattern="JSONPATH:$.total_act_power", unit="W" ]
Type number : total#act_energy "Total active energy" [ stateTopic="shellypro3em/status/emdata:0", transformationPattern="JSONPATH:$.total_act", unit="Wh" ]                                                                      
}                                                                                                                                                                                                                                    

Works! I get 3.3W for the current idle power draw and 45880Wh for the energy delivered.

Since the upgrade to OH 4.1.0 I get the following error and I’m not sure if I’m doing something wrong. I’m running the release verion of the binding.
We seem to have a ClassNotFoundException for org.eclipse.jetty.websocket.server.WebSocketServerFactory. Any ideas?

2023-12-25 20:44:09.927 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /shelly/wsevent
javax.servlet.ServletException: javax.servlet.ServletException: java.lang.RuntimeException: Unable to load org.eclipse.jetty.websocket.server.WebSocketServerFactory
	at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:103) ~[?:?]
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:731) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.52.v20230823]
	at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: javax.servlet.ServletException: java.lang.RuntimeException: Unable to load org.eclipse.jetty.websocket.server.WebSocketServerFactory
	at org.eclipse.jetty.websocket.servlet.WebSocketServlet.init(WebSocketServlet.java:147) ~[?:?]
	at javax.servlet.GenericServlet.init(GenericServlet.java:180) ~[bundleFile:4.0.4]
	at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.init(OsgiInitializedServlet.java:68) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:486) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHolder.prepare(PaxWebServletHolder.java:295) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHandler.doHandle(PaxWebServletHandler.java:316) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:96) ~[?:?]
	... 18 more
Caused by: java.lang.RuntimeException: Unable to load org.eclipse.jetty.websocket.server.WebSocketServerFactory
	at org.eclipse.jetty.websocket.servlet.WebSocketServletFactory$Loader.load(WebSocketServletFactory.java:54) ~[?:?]
	at org.eclipse.jetty.websocket.servlet.WebSocketServlet.init(WebSocketServlet.java:140) ~[?:?]
	at javax.servlet.GenericServlet.init(GenericServlet.java:180) ~[bundleFile:4.0.4]
	at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.init(OsgiInitializedServlet.java:68) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:486) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHolder.prepare(PaxWebServletHolder.java:295) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHandler.doHandle(PaxWebServletHandler.java:316) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:96) ~[?:?]
	... 18 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.websocket.server.WebSocketServerFactory cannot be found by org.openhab.binding.shelly_4.1.0
	at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:536) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168) ~[org.eclipse.osgi-3.18.0.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName(Class.java:467) ~[?:?]
	at org.eclipse.jetty.websocket.servlet.WebSocketServletFactory$Loader.load(WebSocketServletFactory.java:48) ~[?:?]
	at org.eclipse.jetty.websocket.servlet.WebSocketServlet.init(WebSocketServlet.java:140) ~[?:?]
	at javax.servlet.GenericServlet.init(GenericServlet.java:180) ~[bundleFile:4.0.4]
	at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.init(OsgiInitializedServlet.java:68) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:486) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHolder.prepare(PaxWebServletHolder.java:295) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHandler.doHandle(PaxWebServletHandler.java:316) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:96) ~[?:?]
	... 18 more

For funsies I set up a new Docker container with a new OH instance and only the Shelly binding in it. The result is the same, and the exception appears a few minutes after the system boots.
Only configured thing in the test instance was / is a Shelly Plus HT.

I’m using openHAB 4.1.0 and a shelly:shellyplus1.

I have the problem that the temperature is Fahrenheit but it’s displayed as Celsius.
The 57°Cesius in the screenshot is 57° Fahrenheit rsp. 13.8° Celsius

My Shelly Uni is not coming online anymore, so I’m also thinking of using just mqtt. Is it possible to modify the intervals of when data is send or received? eg I only want to read my Uni every 5minutes. Can this be modified on my Shelly device or in OH?

I have a similar issue since I’m using Openhab 4.1.0 - my COAP communication seems to fail.
I’ve been succesfully using coap events for a long time, but it stopped working. I did not change anything on shelly side.
Tested telnet serverip 5683 which was not succesful.


(I would exclude that this is a firewall issue, tried local on server and with disbled firewall. port 8080 in cross check worked fine)

I realized that in shelly manager all message count is 0 - I didn’t not have attention to this number in the past, but looks suspicous to me.

To me it looks like me coap endpoint within shelly binding is not working correctly.
Any help or idea is appreciated

@wborn As you may remember we discussed removing the jetty web socket server artifact from pom.xml ([shelly] Misc changes (small fixes, log improvements, hardened leak prevention on by markus7017 · Pull Request #15922 · openhab/openhab-addons · GitHub). For me it sounds that this doesn’t work.

What do you think?

Usually the binding updates the channels with C and the framework maps this into F
What is your selection under Settings>Regional Settings>(show advanced)>Unit system? Metric or Imperial (US)?

What does that mean? Please be more specific
Which version of OH are you running? Which binding version? What the thing status?
Enable DEBUG output and check openhab.log

Yo did a major OH upgrade :wink:

Is CoAP enabled in the device UI?
Try setting CoIOT to peer mode using Shelly Manager
Enable DEBUG output and check openhab.log

There was one thing I did not try: restart OH. Because my other Shelly devices were working, I thought it was something else… The error was something like waiting for configuration.
But everything is working again.

If there is nothing in the addon that uses this package, you can force a package import for this to be added to the bundle manifest by adding it to the bnd.importpackage property in the POM @markus7017 .

Metric

Sorry for pinging you but this somehow related:
Many of us are using the dev binding which is installed by copying it to the add-on folder.
Everytime a clean cache is performed (e.g. during an openHAB update) the coap transportation bundles are deinstalled. Is there a way for us users to make them „sticky“ so that they are not deinstalled by running clean cache?

1 Like

I’m sorry- my bad. tried to use homeassistant in a docker container (only to integrate my Aqara FP2 and Cupra Born) and started it with default setting

 --net=host

which exposes all host ports to the docker container. This seemed to mess up my Coap Openhab setup. When I stop the docker container Openhab and Shelly Coap is working fine again.
Sorry again and thanks to everyone who helped me out.

@markus7017 could switch to a KAR instead of a JAR so missing Karaf feature dependencies are installed… or you could workaround it by also installing the Tradfri Binding so the coap feature gets reinstalled.

I posted this :point_down: two days ago and was asked to repost here. I hope that dropping a link is fine, too.

1 Like

Hi, I believe same problem here. After upgrade to 4.1.0 no update status on the shellyplus1 input …

1 Like

Also reposting here as this seems to be the right place (sorry, new in the game)

2023-12-29 14:43:49.304 [INFO ] [org.openhab.core.Activator          ] - Starting openHAB 4.1.0 (build Release Build)
2023-12-29 14:43:51.214 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Vienna'.
2023-12-29 14:43:51.246 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'de_AT'.
2023-12-29 14:43:57.265 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://10.10.1.20:8080/shelly/wsevent's Observer 
2023-12-29 14:44:14.971 [INFO ] [nternal.manager.ShellyManagerServlet] - Shelly Manager gestartet und erreichbar unter http(s)://10.10.1.20:8080/shelly/manager
2023-12-29 14:44:22.326 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2023-12-29 14:44:24.402 [INFO ] [ab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel
2023-12-29 14:44:32.442 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.
2023-12-29 15:18:56.799 [WARN ] [/                                   ] - unavailable
java.lang.RuntimeException: Unable to load org.eclipse.jetty.websocket.server.WebSocketServerFactory
	at org.eclipse.jetty.websocket.servlet.WebSocketServletFactory$Loader.load(WebSocketServletFactory.java:54) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.websocket.servlet.WebSocketServlet.init(WebSocketServlet.java:140) ~[bundleFile:9.4.52.v20230823]
	at javax.servlet.GenericServlet.init(GenericServlet.java:180) ~[bundleFile:4.0.4]
	at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.init(OsgiInitializedServlet.java:68) ~[bundleFile:?]
	at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:486) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759) ~[bundleFile:9.4.52.v20230823]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHolder.prepare(PaxWebServletHolder.java:295) ~[bundleFile:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHandler.doHandle(PaxWebServletHandler.java:316) ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[bundleFile:9.4.52.v20230823]
	at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:96) ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:731) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.52.v20230823]
	at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.websocket.server.WebSocketServerFactory cannot be found by org.openhab.binding.shelly_4.1.0
	at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:536) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168) ~[org.eclipse.osgi-3.18.0.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName(Class.java:467) ~[?:?]
	at org.eclipse.jetty.websocket.servlet.WebSocketServletFactory$Loader.load(WebSocketServletFactory.java:48) ~[bundleFile:9.4.52.v20230823]
	... 42 more
2023-12-29 15:18:56.823 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /shelly/wsevent
javax.servlet.ServletException: javax.servlet.ServletException: java.lang.RuntimeException: Unable to load org.eclipse.jetty.websocket.server.WebSocketServerFactory
	at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:103) ~[?:?]
	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:731) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.52.v20230823]
	at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: javax.servlet.ServletException: java.lang.RuntimeException: Unable to load org.eclipse.jetty.websocket.server.WebSocketServerFactory
	at org.eclipse.jetty.websocket.servlet.WebSocketServlet.init(WebSocketServlet.java:147) ~[?:?]
	at javax.servlet.GenericServlet.init(GenericServlet.java:180) ~[bundleFile:4.0.4]
	at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.init(OsgiInitializedServlet.java:68) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:486) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHolder.prepare(PaxWebServletHolder.java:295) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHandler.doHandle(PaxWebServletHandler.java:316) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:96) ~[?:?]
	... 18 more
Caused by: java.lang.RuntimeException: Unable to load org.eclipse.jetty.websocket.server.WebSocketServerFactory
	at org.eclipse.jetty.websocket.servlet.WebSocketServletFactory$Loader.load(WebSocketServletFactory.java:54) ~[?:?]
	at org.eclipse.jetty.websocket.servlet.WebSocketServlet.init(WebSocketServlet.java:140) ~[?:?]
	at javax.servlet.GenericServlet.init(GenericServlet.java:180) ~[bundleFile:4.0.4]
	at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.init(OsgiInitializedServlet.java:68) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:486) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHolder.prepare(PaxWebServletHolder.java:295) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHandler.doHandle(PaxWebServletHandler.java:316) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:96) ~[?:?]
	... 18 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.websocket.server.WebSocketServerFactory cannot be found by org.openhab.binding.shelly_4.1.0
	at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:536) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168) ~[org.eclipse.osgi-3.18.0.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName(Class.java:467) ~[?:?]
	at org.eclipse.jetty.websocket.servlet.WebSocketServletFactory$Loader.load(WebSocketServletFactory.java:48) ~[?:?]
	at org.eclipse.jetty.websocket.servlet.WebSocketServlet.init(WebSocketServlet.java:140) ~[?:?]
	at javax.servlet.GenericServlet.init(GenericServlet.java:180) ~[bundleFile:4.0.4]
	at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.init(OsgiInitializedServlet.java:68) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:486) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHolder.prepare(PaxWebServletHolder.java:295) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PaxWebServletHandler.doHandle(PaxWebServletHandler.java:316) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[?:?]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.52.v20230823]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[?:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[?:?]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[?:?]
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) ~[?:?]
	at org.ops4j.pax.web.service.jetty.internal.PrioritizedHandlerCollection.handle(PrioritizedHandlerCollection.java:96) ~[?:?]
	... 18 more
2023-12-29 16:43:58.321 [INFO ] [nternal.manager.ShellyManagerServlet] - Shelly Manager gestartet und erreichbar unter http(s)://10.10.1.20:8080/shelly/manager
2023-12-29 16:53:08.893 [WARN ] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplusht-08b61fcb6378: Device requires restart to activate changes
2023-12-29 16:53:11.136 [WARN ] [g.shelly.internal.api2.Shelly2ApiRpc] - shellyplusht-08b61fcb6378: Device requires restart to activate changes
2023-12-29 17:23:10.731 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - Stopped without executing or closing null

1 Like

I have proposed a fix:

sounds great, let me know as soon as it is ready to be tested.