openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.9k stars 3.59k forks source link

[shelly] Shelly 2 PM isn't receiving button events #16048

Open Novanic opened 11 months ago

Novanic commented 11 months ago

I have a Shelly 2.5 PM configured as Relais and Momentary. The thing is discovered correctly and I can use the relais1#output and relais2#output channels to switch the connected devices/lights. But the following channels aren't working / aren't updated when I press the connected physical switch buttons of the Shelly 2 PM:

I know the the relais1#button and relais2#button was working with old OpenHAB versions but it is broken at least since OpenHAB 4.

Used OpenHAB version: 4.0.4 (latest stable)

Novanic commented 11 months ago

I tried it with activated and deactivated ColoT / CoAP, it doesn't change anything. Really annoying, I will now stop testing.

I have also set a debug breakpoint within the method org.openhab.binding.shelly.internal.api2.Shelly2RpcSocket#onText(...). This method isn't called when a press the physical button (it is only called when my shelly mini pm has new data). Maybe something has to get activated within the Shelly app to enable the button events via the API?

markus7017 commented 11 months ago

I tried it with activated and deactivated ColoT / CoAP, it doesn't change anything. Really annoying, I will now stop testing.

I have also set a debug breakpoint within the method org.openhab.binding.shelly.internal.api2.Shelly2RpcSocket#onText(...). This method isn't called when a press the physical button (it is only called when my shelly mini pm has new data). Maybe something has to get activated within the Shelly app to enable the button events via the API?

This is Shelly Gen 2 code, whereas the 2.5 is Gen1 device / API turn DEBUG output on, you should see incoming CoAP/CoIOT messages when pressing the button are you running in a Docker container? Try setting device to CoIOT peer mode using Shelly Manager

markus7017 commented 6 months ago

@Novanic Any feedback

please verify with the latest DEV build, follow READMEbeta for installation

4.2-DEV | 4.1-DEV | 4.0.-DEV | 3.4.5-DEV | README | READMEbeta Avdanced Users - Shelly Manager - Bugs/Features - API Doc | Firmware Index - Firmware Archive


Note: The DEV build is always newer than the version in the official Distro or Milestone builds. Current development is based on 4.2-SNAPSHOT, 4.0.x and 3.4.x are outdated.

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.