but the binding should auto-configure the setting, isn’t it?
yes, the config limits to one host device. That’s a little sad compare to the CoIoT approach with Multicast, which is also not perfect. In theory I could implement a proxy, which forwards the request to a different host if updates are reported for other destinations than the binding, but obviously there is not really a demand in the community.
Since a few days the package dependencies were updated, which breaks compatibility of a 5.1-SNAPSHOT version running on 5.1-SNAPSHOT, but also on 5.0.2. Therefore I need to provide different builds for 5.1-SNAPSHOT, 5.0.1 (5.0.2-SNAPSHOT) and 4.3.5 (4.3.6-SNAPSHOT). Make sure to use the correct build depending on your installed OH version.
org.openhab.binding.shelly-5.1.0-SNAPSHOT.jar → runs on OH 5.1.0-SNAPSHOT
org.openhab.binding.shelly-5.0.2-SNAPSHOT.jar → runs on OH 5.0.x
org.openhab.binding.shelly-4.3.6-SNAPSHOT.jar → runs on OH 4.3.x
But I think, I’m the only which have different OH installation which gets from one device the information.
BTW: I have problems here with the autoconfig. In case I shutdown the OH system for a SD CARD backup, which take 20min, and restart the system, I need to manually enter on the UI from the HT3 the Websocket information. I assume, that within the HT3 try to deliver the values meanwhile, and the OH is not listening in that moment, so the HT comes back to default session… Not sure, but it happens from time to time, that I have the reconfigure the values in the HT3. There is no different if I use FW 1.6.2, or 1.7.0
Maybe this needs to be reported to Shelly support. There is always the option that the host system is down, which requires the device to do retries, but never change the config.
I installed the new jar (this time I took the lazy approach and didn’t delete any of my things - we’ll see what happens).
At startup I noticed this entry three times:
20:48:56.436 [INFO ] [internal.manager.ShellyManagerServlet] - Shelly Manager started at http(s)://192.168.1.9:8080/shelly/manager
20:49:24.978 [INFO ] [internal.manager.ShellyManagerServlet] - Shelly Manager started at http(s)://192.168.1.9:8080/shelly/manager
20:49:25.077 [INFO ] [internal.manager.ShellyManagerServlet] - Shelly Manager started at http(s)://192.168.1.9:8080/shelly/manager
After startup was complete:
openhab> log:display | grep -i websocket
20:50:13.150 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus1pm:d4d4da7de204' changed from ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode. to OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error
20:50:13.547 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus1pm:d4d4da7de204' changed from OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error to ONLINE
20:50:14.283 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplusplug:d48afc568c88' changed from ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode. to OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error
20:50:16.685 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplusplug:fcb467269c34' changed from ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode. to OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error
20:50:16.814 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-relay:d4d4da09b2c8' changed from ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode. to OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error
20:50:16.978 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus2pm-relay:d4d4da09b2c8' changed from OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error to ONLINE
20:50:17.869 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus1pm:d4d4da7df8a8' changed from ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode. to OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error
20:51:13.365 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplusplug:d48afc568c88' changed from OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error to ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode.
20:51:13.440 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplusplug:d48afc568c88' changed from ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode. to OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error
20:51:13.625 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplusplug:d48afc568c88' changed from OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error to ONLINE
20:51:15.788 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplusplug:fcb467269c34' changed from OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error to ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode.
20:51:16.971 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'shelly:shellyplus1pm:d4d4da7df8a8' changed from OFFLINE (COMMUNICATION_ERROR): Unexpected error: WebSocket error to ONLINE (CONFIGURATION_PENDING): Device is initializing or in sleep mode.
So there were some “websocket” entries, but devices came online pretty quickly.
I’ve got a bunch of Shelly 1PM Mini Gen3’s, and they’re not playing nice with OH.
For some reason the Thing’s Event Trigger and Input/Button channels stop updating with a seemingly random interval. Allthough the Thing status is displayed as Online, I need to reinitialize the Thing to get the channels start updating again. The Last Heartbeat channel keeps being updated though and I can also see the input state change on the device’s webinterface, so there is little that points to an obvious reason for this annoying behaviour.
I first thought it might be a network/wifi issue, but the wifi signal strength is average at worst and other, older Shelly devices don’t give me any trouble (just like every other client in my network). So no real pointers for a network issue. I also checked all relevant configuration options for the device and for OH but nothing seems off.
Does anybody maybe recognize this behaviour, are there any known issues with this model or might it be a misconfiguration that coud explain what’s going on here? Could this be a binding problem?
What is the best course of action to determine the actual cause of the issue?
Thanx, Jesse
edit: Btw, OH version is 4.2.2 and Shelly fw version is 1.7.0
I have the same issue with latest & greatest SW & HW (OH 5.0.1, Shelly Mini Gen4). My current solution is to use MQTT to get the input channel change notifications.
With the binding provided for 5.0.1 in the add-store I get the error:
[helly.internal.api2.Shelly2ApiClient] - shellypro3em-34987a45786c: Unknown API value ‘triphase’ (map data={light=white, rgb=color, rgbw=color, cover=roller, switch=relay}), please create an issue on GitHub
I removed this binding by UI, confirmed in the karaf console that there was no shelly bundle.
Then I tried to install your binding with:
(I now see that that is not the latest DEV build. But using the latest DEV binding (5.1.x) throws an error, which I think you’re aware of:
12:08:17.322 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.shelly-5.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.shelly [249]
Unresolved requirement: Import-Package: com.google.gson; version="[2.13.0,3.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.18.0.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.18.0.jar:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.4]