German translation of groups/channels/UI messages (binding config doesn’t work yet)
Fix for LOW_BATTERY alarm
Fix input channels for Dimmer + RGBW2
Fix timing issue for protected devices changing thing type after setting the credentials
Change: Full meter for Plug (like Plug-S)
New option brightnessAutoOn in thing config to suppress Auto-ON for lights (e.g. dimmer)
Enhanced channel cache to keep switch state and value of the brightness channel as separate states to avoid log entries like OFF (state) followed by 0 (value)
Update lastUpdate channel only if some other meter/sensor data has changed → reduce logging
README updated, READMEbeta included in DEV repo (myfiles)
I have successfully used the shelly binding with openhab 2.5 (Shelly HT and Shelly4pro). But I have a small problem with the Shelly HT. After I restart openhab, the Shelly HT things remain in the “UNKNOWN” state. Even if the sensor sends an update, the state of the things remains “UNKNOWN” and the sensor values are not displayed/updated. The only way I can fix the problem is to manually activate the Shelly HT and manually “reactivate” the Shelly Things.
Does anyone know if there is another way to fix the problem?
openhab.log shows the following, although I do not know if they are relevant. Otherwise, events.log and openhab.log show nothing regarding the Shelly HTs:
2019-12-25 17:35:17.389 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /rest/events
javax.servlet.ServletException: javax.servlet.ServletException: A MultiException has 1 exceptions. They are:
java.lang.IllegalStateException: ServiceLocatorImpl(__HK2_Generated_2,3,19320965) has been shut down
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:88) ~[bundleFile:?]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.Server.handle(Server.java:494) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:135) ~[bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
Caused by: javax.servlet.ServletException: A MultiException has 1 exceptions. They are:
For testing I have created a new Shelly HT Thing. The status goes instantly to “UNKNOWN”. I can’t see anything in the log. When removing it there is the following message:
2019-12-25 19:20:49.809 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:d73573b0’ changed from UNKNOWN to REMOVING
2019-12-25 19:20:49.818 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:d73573b0’ changed from REMOVING to REMOVED
2019-12-25 19:20:49.859 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:d73573b0’ changed from REMOVED to UNINITIALIZED
2019-12-25 19:20:49.899 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:d73573b0’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
It shows the same behaviour. But I found log entries now (they appeared earlier too). Interesting is that the status of Shelly4Pro also shows “UNKNOWN” first, but then goes to the status “ONLINE”:
2019-12-25 21:36:31.278 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:97247717’ changed from UNINITIALIZED to INITIALIZING
2019-12-25 21:36:31.312 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:97247717’ changed from INITIALIZING to UNKNOWN
2019-12-25 21:36:31.321 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:b4fa05dd’ changed from UNINITIALIZED to INITIALIZING
2019-12-25 21:36:31.338 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:b4fa05dd’ changed from INITIALIZING to UNKNOWN
2019-12-25 21:36:31.346 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:8f096f99’ changed from UNINITIALIZED to INITIALIZING
2019-12-25 21:36:31.368 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:8f096f99’ changed from INITIALIZING to UNKNOWN
2019-12-25 21:36:31.377 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:6d9f9601’ changed from UNINITIALIZED to INITIALIZING
2019-12-25 21:36:31.396 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:6d9f9601’ changed from INITIALIZING to UNKNOWN
2019-12-25 21:36:31.431 [hingStatusInfoChangedEvent] - ‘shelly:shelly4pro:1128feb0’ changed from UNINITIALIZED to INITIALIZING
2019-12-25 21:36:31.454 [hingStatusInfoChangedEvent] - ‘shelly:shelly4pro:1128feb0’ changed from INITIALIZING to UNKNOWN
2019-12-25 21:36:31.467 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:af54f3ba’ changed from UNINITIALIZED to INITIALIZING
2019-12-25 21:36:31.489 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:af54f3ba’ changed from INITIALIZING to UNKNOWN
2019-12-25 21:36:31.506 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:4906561d’ changed from UNINITIALIZED to INITIALIZING
2019-12-25 21:36:31.528 [hingStatusInfoChangedEvent] - ‘shelly:shellyht:4906561d’ changed from INITIALIZING to UNKNOWN
2019-12-25 21:36:34.781 [hingStatusInfoChangedEvent] - ‘shelly:shelly4pro:1128feb0’ changed from UNKNOWN to ONLINE
I try it now on a new openhab2 installation. No bindings activated. I have the following error log entries:
2019-12-25 22:45:53.541 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.shelly-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.shelly [203]
Unresolved requirement: Import-Package: org.eclipse.californium.core; version="[2.0.0,3.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]
Hi,
I have quite a few shelly devices and the binding works perfectly.
I have one suggestion, is it possible to reduce the number of updates by defining a minimum value change ?
right now my log is full with item state change messages like this one :
Shelly1PMBedroom_Meter_Watt changed from 1.9 to 1.93
but in reality there is no real change in the value.
This is your event.log file and an absolut normal behavior. Why is there a need for reducing the entries, as this file is not to be looked at regulary?
I was able to reproduce the problem you reported and fixed it.
Expected behaviour:
HT has been discovered and was added as a thing then OH was restarted
Binding tries to initialize the thing, which fails, because the device is in suspend mode
The things stays in state INITIALIZING
waking up the device will trigger a sensor event
which is processed by the binding and triggers thing initialization
the binding initializes the thing, updates values and thing goes ONLINE
verified that with a HT.
When I see " changed from INITIALIZING to REMOVING" in you log it indicates that you deleted the thing, which is a different use case.
To make the recovery working you need to successfully discover add the thing at least once so the binding was able to set the callback URLs / Coap destination being able to received an event on the next wakeup.
Please provide a TRACE log if you still have issues
open OH console, run “log:set TRACE org.openhab.binding.shelly”
wake-up device, discovery thing, add thing, wait until ONLINE
the motion detector reports a long impulse. this is always transmitted after approx. 3s as event “LONG_PRESSED”. however, i would like to switch on the light immediately after switching the motion detector. how can this be implemented so that “LONG_PRESSED” is not waited for, but the triggering of the motion detector is immediately detected?