Shelly Binding

use openhabian-config it has a menu entry to set permissions
why are you asking? usually there is no need to adjust permissions once you copied the jar to the addons folder

Did you ever get any news about this feature?

nope

just try copying the jar
you could run “openhab-cli reset-ownership”

Thanks for the updated instructions. I followed them and seem to have the new binding installed but when I go to add new things in the UI there seem to be duplicate thing types to choose from, as if the binding is installed twice (I definitely uninstalled the original binding from the UI - were there any files I should also have deleted?):

Is there any way to get rid of the duplicates? If not, how do I know which of the two entries relates to the new binding?

Thanks.

go to OH console and run
bundlr:list | grep Shelly
I suppose you‘ll see 2 entries

  • remove the shelly har from the addons folder
  • re-run the command to get the id of the trmaining one
  • use „hundle:uninstall id“ to get rid of the 2nd one
  • stop OH
  • run openhab-cli clean-cache
  • start OH, wait a minute
  • copy shelly jar to addons folder
  • noe you should only have 1 instance in bundle:list and no duplicate thing types
  • use auto discovery/Scan - no need to add things manually

UNICAST
I updated to OH 3.1M3
Shelly set to unicast, CoIot Peer: 192.168.178.61:8080
get error message:
[y.internal.handler.ShellyBaseHandler] - shellydimmer-d0e053: CoIoT peer in device settings does not point this to this host, disabling CoIoT

just wanted to check the obvious: do I need to provide a different port

EDIT: grrr…
after some more searching I found port 5683

I am not deleting this question here anyway if someone has the same stupid question :wink:

just use Shelly Manager :wink:
or default (no port)

DAMN. If I only would have seen that earlier that shelly manager has a command for that. I already did it an hour ago… and thought how great it would be if shelly manger would provide this feature :slight_smile:

anyway, Your shelly manager is really great. I have been using before some other tools provided by shelly-support.eu but your tool is by far better (and working :wink: )
one question though: does shelly manager check itself for existing updates or does it just read shelly’s json file?
the question behind is, if the answer is yes, that shelly manager just reads shelly’s json file, is it possible to switch to check directly on the internet?
In many environment shelly devices do not have direct access to internet. So in my case. Only OH server is allowed to communicate outside

what do you mean with “check itself”? Shelly Manager is build into the Shelly Binding.

So you mean “Shelly could do the update check instead of the device and then the update could be installed using the existing proxy mode”? In general this is possible. However, there was a lot of hick-up around format of version strings. I could make an assumption “update = yes means: there is a different version in the official repo”. I never saw that Allterco posted an older version as the official release version. In this case: if device version = repo version - all good, no update; otherwise signal update available (any case you see, which version was found in the drop down list)

I wanted to suggest that shelly manager should check for updates and not read shelly’s status json file.
allterco provides this file containing all current firmware versions:
http://api.shelly.cloud/files/firmware

no. Shelly Manager should do the update check. In environments where Shellys devices have no access to internet, Shelly device will never know if there are updates available

Related to Shelly binding sometimes does not switch item states via CoIoT - Add-ons / Bindings - openHAB Community.

pm2.5 sometimes does not feed OH3 item via channel. Tried both multicast and unicast mode.

NOT OK
2021-03-31 19:17:04.944 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel relay1#output updated with ON (type class org.openhab.core.library.types.OnOffType).
2021-03-31 19:17:04.944 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: 2 channels updated from CoIoT status, serial=4611

OK
2021-03-31 19:17:08.023 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel relay1#output updated with OFF (type class org.openhab.core.library.types.OnOffType).
2021-03-31 19:17:08.023 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: 5 channels updated from CoIoT status, serial=4867
2021-03-31 19:17:08.029 [DEBUG] [.internal.handler.ShellyRelayHandler] - shelly25-relay-8caab54cd25e: Set relay output to OFF

again, please provide a proper description and enough log. When does the problem happens? only specific device? which firmware? which binding version?

FW: 20210323-104714/v1.10.1-gf276b51
OH 3.0.1
binding 3.1.0.202103090756, but same was on 3.0.1

Thing shelly:shelly25-relay:8caab54cd25e "Shelly 2.5relay 8CAAB54CD25E" @ "Shelly" [deviceIp="192.168.10.123", eventsCoIoT="true"]
Switch Shelly_25R_8CAAB54CD25E_1Output  {channel="shelly:shelly25-relay:8caab54cd25e:relay1#output"}

log where latest OFF (2021-04-02 21:03:49.836) output does not change item

2021-04-02 21:03:47.897 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: 18 CoAP sensor updates received
2021-04-02 21:03:47.898 [DEBUG] [ly.internal.coap.ShellyCoIoTVersion2] - shelly25-relay-8caab54cd25e: Updating meter1:currentWatts with 0.0
2021-04-02 21:03:47.898 [DEBUG] [ly.internal.coap.ShellyCoIoTVersion2] - shelly25-relay-8caab54cd25e: Updating meter2:currentWatts with 0.0
2021-04-02 21:03:47.898 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter2#currentWatts updated with 0.00 W (type class org.openhab.core.library.types.QuantityType).
2021-04-02 21:03:47.899 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel relay2#output updated with OFF (type class org.openhab.core.library.types.OnOffType).
2021-04-02 21:03:47.899 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: 2 channels updated from CoIoT status, serial=9999
2021-04-02 21:03:48.743 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: CoIoT Message from /192.168.10.123:5683 (MID=13945): {"G":[[0,9103,0],[0,1101,1],[0,1201,0],[0,2101,1],[0,2102,""],[0,2103,0],[0,2201,0],[0,2202,""],[0,2203,0],[0,4101,8.93],[0,4103,4725],[0,6102,0],[0,4201,0.00],[0,4203,6866],[0,6202,0],[0,3104,78.26],[0,6101,0],[0,9101,"relay"]]}
2021-04-02 21:03:48.743 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel device#heartBeat updated with 2021-04-02T21:03:48.000+0300 (type class org.openhab.core.library.types.DateTimeType).
2021-04-02 21:03:48.743 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: CoIoT Sensor data {"G":[[0,9103,0],[0,1101,1],[0,1201,0],[0,2101,1],[0,2102,""],[0,2103,0],[0,2201,0],[0,2202,""],[0,2203,0],[0,4101,8.93],[0,4103,4725],[0,6102,0],[0,4201,0.00],[0,4203,6866],[0,6202,0],[0,3104,78.26],[0,6101,0],[0,9101,"relay"]]} (serial=10255)
2021-04-02 21:03:48.743 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: 18 CoAP sensor updates received
2021-04-02 21:03:48.744 [DEBUG] [ly.internal.coap.ShellyCoIoTVersion2] - shelly25-relay-8caab54cd25e: Updating meter1:currentWatts with 8.93
2021-04-02 21:03:48.744 [DEBUG] [ly.internal.coap.ShellyCoIoTVersion2] - shelly25-relay-8caab54cd25e: Updating meter2:currentWatts with 0.0
2021-04-02 21:03:48.744 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter1#currentWatts updated with 8.93 W (type class org.openhab.core.library.types.QuantityType).
2021-04-02 21:03:48.745 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter1#lastUpdate updated with 2021-04-02T21:03:48.000+0300 (type class org.openhab.core.library.types.DateTimeType).
2021-04-02 21:03:48.745 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter2#lastUpdate updated with 2021-04-02T21:03:48.000+0300 (type class org.openhab.core.library.types.DateTimeType).
2021-04-02 21:03:48.746 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel relay1#output updated with ON (type class org.openhab.core.library.types.OnOffType).
2021-04-02 21:03:48.746 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: 4 channels updated from CoIoT status, serial=10255
2021-04-02 21:03:48.752 [DEBUG] [.internal.handler.ShellyRelayHandler] - shelly25-relay-8caab54cd25e: Set relay output to ON
2021-04-02 21:03:49.002 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: CoIoT Message from /192.168.10.123:5683 (MID=13946): {"G":[[0,9103,0],[0,1101,1],[0,1201,1],[0,2101,1],[0,2102,""],[0,2103,0],[0,2201,0],[0,2202,""],[0,2203,0],[0,4101,9.01],[0,4103,4725],[0,6102,0],[0,4201,9.99],[0,4203,6866],[0,6202,0],[0,3104,78.26],[0,6101,0],[0,9101,"relay"]]}
2021-04-02 21:03:49.003 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel device#heartBeat updated with 2021-04-02T21:03:49.000+0300 (type class org.openhab.core.library.types.DateTimeType).
2021-04-02 21:03:49.003 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: CoIoT Sensor data {"G":[[0,9103,0],[0,1101,1],[0,1201,1],[0,2101,1],[0,2102,""],[0,2103,0],[0,2201,0],[0,2202,""],[0,2203,0],[0,4101,9.01],[0,4103,4725],[0,6102,0],[0,4201,9.99],[0,4203,6866],[0,6202,0],[0,3104,78.26],[0,6101,0],[0,9101,"relay"]]} (serial=10511)
2021-04-02 21:03:49.003 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: 18 CoAP sensor updates received
2021-04-02 21:03:49.003 [DEBUG] [ly.internal.coap.ShellyCoIoTVersion2] - shelly25-relay-8caab54cd25e: Updating meter1:currentWatts with 9.01
2021-04-02 21:03:49.004 [DEBUG] [ly.internal.coap.ShellyCoIoTVersion2] - shelly25-relay-8caab54cd25e: Updating meter2:currentWatts with 9.99
2021-04-02 21:03:49.004 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter1#currentWatts updated with 9.01 W (type class org.openhab.core.library.types.QuantityType).
2021-04-02 21:03:49.004 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter1#lastUpdate updated with 2021-04-02T21:03:49.000+0300 (type class org.openhab.core.library.types.DateTimeType).
2021-04-02 21:03:49.005 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter2#currentWatts updated with 9.99 W (type class org.openhab.core.library.types.QuantityType).
2021-04-02 21:03:49.005 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter2#lastUpdate updated with 2021-04-02T21:03:49.000+0300 (type class org.openhab.core.library.types.DateTimeType).
2021-04-02 21:03:49.006 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel relay2#output updated with ON (type class org.openhab.core.library.types.OnOffType).
2021-04-02 21:03:49.006 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: 5 channels updated from CoIoT status, serial=10511
2021-04-02 21:03:49.333 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel device#uptime updated with 171989 s (type class org.openhab.core.library.types.QuantityType).
2021-04-02 21:03:49.334 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel device#accumulatedWatts updated with 19.00 W (type class org.openhab.core.library.types.QuantityType).
2021-04-02 21:03:49.833 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: CoIoT Message from /192.168.10.123:5683 (MID=13947): {"G":[[0,9103,0],[0,1101,0],[0,1201,1],[0,2101,1],[0,2102,""],[0,2103,0],[0,2201,0],[0,2202,""],[0,2203,0],[0,4101,0.00],[0,4103,4725],[0,6102,0],[0,4201,9.88],[0,4203,6866],[0,6202,0],[0,3104,78.26],[0,6101,0],[0,9101,"relay"]]}
2021-04-02 21:03:49.833 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: CoIoT Sensor data {"G":[[0,9103,0],[0,1101,0],[0,1201,1],[0,2101,1],[0,2102,""],[0,2103,0],[0,2201,0],[0,2202,""],[0,2203,0],[0,4101,0.00],[0,4103,4725],[0,6102,0],[0,4201,9.88],[0,4203,6866],[0,6202,0],[0,3104,78.26],[0,6101,0],[0,9101,"relay"]]} (serial=10767)
2021-04-02 21:03:49.834 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: 18 CoAP sensor updates received
2021-04-02 21:03:49.834 [DEBUG] [ly.internal.coap.ShellyCoIoTVersion2] - shelly25-relay-8caab54cd25e: Updating meter1:currentWatts with 0.0
2021-04-02 21:03:49.834 [DEBUG] [ly.internal.coap.ShellyCoIoTVersion2] - shelly25-relay-8caab54cd25e: Updating meter2:currentWatts with 9.88
2021-04-02 21:03:49.834 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter1#currentWatts updated with 0.00 W (type class org.openhab.core.library.types.QuantityType).
2021-04-02 21:03:49.835 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter2#currentWatts updated with 9.88 W (type class org.openhab.core.library.types.QuantityType).
2021-04-02 21:03:49.836 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel relay1#output updated with OFF (type class org.openhab.core.library.types.OnOffType).
2021-04-02 21:03:49.836 [DEBUG] [elly.internal.coap.ShellyCoapHandler] - shelly25-relay-8caab54cd25e: 3 channels updated from CoIoT status, serial=10767
2021-04-02 21:03:52.369 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel device#heartBeat updated with 2021-04-02T21:03:52.000+0300 (type class org.openhab.core.library.types.DateTimeType).
2021-04-02 21:03:52.412 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel device#uptime updated with 171992 s (type class org.openhab.core.library.types.QuantityType).
2021-04-02 21:03:52.413 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter1#lastUpdate updated with 2021-04-02T21:03:52.000+0300 (type class org.openhab.core.library.types.DateTimeType).
2021-04-02 21:03:52.413 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter2#currentWatts updated with 9.89 W (type class org.openhab.core.library.types.QuantityType).
2021-04-02 21:03:52.414 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel meter2#lastUpdate updated with 2021-04-02T21:03:52.000+0300 (type class org.openhab.core.library.types.DateTimeType).
2021-04-02 21:03:52.414 [DEBUG] [lly.internal.util.ShellyChannelCache] - shelly25-relay-8caab54cd25e: Channel device#accumulatedWatts updated with 9.89 W (type class org.openhab.core.library.types.QuantityType).

If I turn|off switch continuosly this happend for 10% cases or around.
Pro4 looks like working ok

UPD I’m not sure for 100% BUT looks like item does not switched when next log record is
‘Channel device#heartBeat’. Not sure what that means but looks like a hook

Markus
Installed my first Shelly1 yesterday and happy to report your binding works terrific!!! :+1:
stupid question… are you considering getting this binding merged into OH as an ‘official’ binding?
Anyhow… thanks for your work!

It is an official Binding, just latest additions are waiting to get merged, therefore the dev version exists…

1 Like

3.1M3 is very close to the current feature set except Shelly Manager. PR is created, but sits since 4 weeks

1 Like

Markus, what additional info should I provide?

just linking this post here if some of the shelly cracks here have a good solution for channel-based triggers