Shelly Binding

Hi Markus

Another small issue for the Shelly Manager when you get a chance. Aftre upgrading Firmware to 11.2, the version is not displayed correctly in Shelly Manager:

I know, because 1.12 is missing the .0, I‘ll look into this

You are free to update the README and create a
PR to my repo - contributions drive open source projects :slight_smile:

The binding has nothing to do with the Web Hook configuration, it uses Web Socket to communication with the device. It does an auto-configuration for the Plus HT, other devices don’t need a special callback URL.

Hi Markus
Could you confirm that this fix is still active in your latest build - post the UNI Temperature fix?
It looks like it has gone back to what it was before.
Thanks
Mark

Definition still looks good:

	<channel-type id="sensorADC">
		<item-type>Number:ElectricPotential</item-type>
		<label>@text/channel-type.shelly.sensorADC.label</label>
		<description>@text/channel-type.shelly.sensorADC.description</description>
		<state readOnly="true" pattern="%.3f %unit%">
		</state>
	</channel-type>

Pattern is defined as “%.3f %unit%”

Thank you. Will try investigate why chart has gone back to being so full of fluctuations?

check events.log, you shouldn’t see updates with more than 3 digits

Not seeing any updates with more than 3 decimals.
But still nit sure why my charts have gome back to showing si many fluctuations.

Do yiu know what the setting was in the previous binding?

before it was “%.f %unit%”, which explained the long values with full precision

Hi, with OpenHab 3.4.M1 i try to add an Shelly 2.5 as Relay. Adding the Device work, however i not see the second Relay Output as an channel:


I try multiple Devices …

Is there a bug in the last verion?

Hi again, short info: I rollback to the 3.3 Release Version and everything is fine when i add new Shelly 2.5 Relay Devices. Looks like a Bug in the 3.4.M1 Binding.

please try latest gen2 build

Hey,

is there a way to recognize the physical Button on a Shelly Plug-S being pushed?

Background - I have a rule setup to switch on/off the plug. But I want to trun on/off the plug manually w/o the rule interfering. How do I do that?

I’m using the release version OH3.3. The Plug-S is connected using the CoIoT protocol.

Thanks!

I didn’t find a trigger for the button too.
Maybe you can change your rule to detect manual or automatic trigger for the switch…

Hi, i try to install the gen2 (org.openhab.binding.shelly-3.4.0-gen2.jar) binding manualy, however openhab dos not load the binding … ather bindings i can install using the addon folder. :thinking:

Hi @markus7017, as a very late follow-up to this. Removing all Shelly items from the rg.openhab.core.thing.Thing.json file solved the issue. The gen2 binding adopted and I was able to successfully add all of my devices back on. It also solved the issue of ghost things. Cannot thank you enough!

I have just tried to add a Pro2 (I already have a fully-functioning Plus 1 switch, the Gen2 binding is working). OpenHAB discovered the device and I was able to add it but it is not functioning. It’s status is ERROR:CONFIG.
If I reboot the device the following appears in the logs:

`2022-09-05
11:26:34.081 [INFO ] [openhab.event.ThingStatusInfoEvent  ] - Thing
'shelly:shellyunknown:30c6f78c0458' updated: UNKNOWN
(CONFIGURATION_PENDING): Initializing or device in sleep mode.`

`2022-09-05
11:26:34.081 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing
'shelly:shellyunknown:30c6f78c0458' changed from INITIALIZING to
UNKNOWN (CONFIGURATION_PENDING): Initializing or device in sleep
mode.`

`2022-09-05
11:26:34.081 [INFO ] [openhab.event.ThingStatusInfoEvent  ] - Thing
'shelly:shellyunknown:30c6f78c0458' updated: OFFLINE
(CONFIGURATION_ERROR): IP address of the Shelly device is missing.`

`2022-09-05
11:26:34.082 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing
'shelly:shellyunknown:30c6f78c0458' changed from UNKNOWN
(CONFIGURATION_PENDING): Initializing or device in sleep mode. to
OFFLINE (CONFIGURATION_ERROR): IP address of the Shelly device is
missing.`

DEBUG reveals the following:

2022-09-05 11:11:19.497 [DEBUG] [lly.internal.api1.Shelly1CoapHandler] - shelly1-e8db84d3e84d: CoIoT Message from /192.168.30.100:5683 (MID=3921): {"G":[[0,112,0],[0,118,0]]}
2022-09-05 11:11:19.498 [DEBUG] [lly.internal.api1.Shelly1CoapHandler] - shelly1-e8db84d3e84d: Serial 13825 was already processed, ignore update
2022-09-05 11:11:20.002 [DEBUG] [lly.internal.api1.Shelly1CoapHandler] - shelly1-8caab56e3964: CoIoT Message from /192.168.30.90:5683 (MID=24464): {"G":[[0,9103,2],[0,1101,1],[0,2101,1],[0,2102,""],[0,2103,0]]}
2022-09-05 11:11:20.003 [DEBUG] [lly.internal.api1.Shelly1CoapHandler] - shelly1-8caab56e3964: Serial 26371 was already processed, ignore update

Within the Thing definition it suggests it is an unknown Shelly device. A number of properties do show but there are of course no channels. I am not the first with this device?

read the READMEbeta

good job :slight_smile:

You show trace log of CoAP messages. This can’t be the correct IP, because Gen2 devices do not have CoAP, they use http-based WebSockets

“IP address of the Shelly device is missing”: Did you added the device manually? This indicates that the IP is not set in the thing config.

I updated the gen2 build - this is important, recommended for everyone using this gen2 build

  • Fix memory leak - memory grows over time
  • Fix resource leak - http connection to the device was not disconnected when thing is suspended or device connection is lost (COMMUNICATION_ERROR)
  • Things gets into COMMUNICATION_ERROR status if initial connect fails
  • some status messages fixed (parameters)

Gen1:

  • Firmware version 0.12 is now processed correctly so it shows up in Shelly Manager

Gen2:

  • Pro 1PM with 2nd hardware gen will be discovered correctly
  • Roller profiles, provide selection list with defined profiles, support the UP/DOWN profile id
  • Device reboot and firmware upgrades will be detected, thing recovers during the next status cycle (as usual). This also improves general recovery
  • ShellyManager: Update protocol message and error counts (statistics)
  • OTA events are forwarded to the channel (begin/progress/finish).
  • ShellyManager: Actions adjusted (not all available/deprecated for Gen2)
  • ShellyManager: Enable/Disable Cloud, Ethernet, Bluetooth
  • Shelly Manager: Protect Device, Firmware Upgrade to stable or beta version (no fw archive)

3.4.0-Gen2 build for Plus/Pro+Gen1 | 3.4.0-DEV Gen1 stable build
README | READMEbeta for more info on first installation
Avdanced Users - Shelly Manager - Bugs/Features - API Doc
Gen1: Firmware Index - Firmware Archive


Note: The DEV build is always newer than the version in the official Distro or the Milestone builds

2 Likes