Shelly + roller mode + double click - what are the options? Asking for your opinion

Hi,

What are your recommended way to support double-click (and triple-click and long-click) with shelly 2.5 roller mode on a momentary switches?

the options I see now are:

  • ShellyForHass V0.2.0 (but it doesn’t work for me at all, hence this question…)

  • HA ‘as is’ doesn’t support it, or am I wrong?

  • ESPHome - AFAIK, it supports double-click, but I have never used it before

  • Tasmota - I have some SONOFF Basic devices burned with tasmota. I think it suppose to support it

  • implementation through a script using MQTT (see next point, will it work better than CoAP based solution?)

  • Today (using FW 1.7 on the devices and ShellyForHass 0.1.9, I have an AppDaemon code counting the time between two switch events to identify double-click, but it only works ~95% of the times.

  • Any other way?

Thanks in advanced for any cooperation.

1 Like

I would be interested in the same. Now that the Shelly Integration listens to the switch positions I hope something is possible within home assistant to trigger different actions on single, double, long press.
i.e. single press should open/close the cover as usual.
double click could move the cover to a predefined position, or trigger all covers in the room to open/close.

As a matter of fact I have found this very helpful Blueprint. I will try out and let you know if this is a possible solution.

Hi @T1ppes,

  1. AFAIK, the Shelly switch events work only on relay mode and not for rollers which in my opinion miss a major point - one of the biggest advantages of automated rollers is that one can use short/long/double/etc to set the roller to different positions.

  2. I ended up setting the following:
    a) HA shelly integration (not Shelly4Hasss)
    b) identifying double click through AD app
    c) Using MQTT for getting info about wifi and FW version. This part is still WIP - I get the info but not yet act upon it (i.e. update new FW by command from HA)

All the above is still in tests. I assume once I will be happy with it, I will publish it here.

One thing I noticed meanwhile is that the HA DB grows really really fast (almost 1GB/day), so I set a very selective ‘include’ on the Recorder (none of Shelly). This is a big minus if will not be solved…

I am using Shelly 2.5 in Rollershutter mode. I activated the detached mode to not directly trigger the relays on button press. With the new December version of HA and the HA Shelly Integration I am able to detect the button presses in Home Assistant. The Shelly Integration creates a Binary Sensor for each of the Shelly attached switches. I am using the linked Blueprint in a test environment and for now managed to send a notification to my phone to see if a single, double, or long press was detected. Will now need to exchange that action in the automation to again trigger the cover.close_cover, if it is open, or cover.stop_cover, if it is closing on short press to get the previous functionality back.

Mine are set as “Toggle”. Does “Detached” mean the button on the wall does not operate the roller without a command from HA?

I have tested the blueprint now on one Shelly 2.5 Roller Shutter and it turns out to work fine with the updated Shelly integration from Home Assistant.

- alias: Test - Office Cover Down Pressed
  id: 'test_office_cover_down_pressed'
  description: ''
  use_blueprint:
    path: >-
      slashback/trigger-different-actions-on-a-single-double-or-double-click-on-a-binary-sensor.yaml
    input:
      delay: '0.5'
      switch_id: binary_sensor.office_shutter_button_down
      long_click_action:
        - service: >
            {% if is_state('cover.upstairs', 'open') %}
              cover.close_cover
            {% else %}
              cover.stop_cover
            {% endif %}
          entity_id: cover.upstairs
      short_click_action:
        - service: >
            {% if is_state('cover.office', 'open') %}
              cover.close_cover
            {% else %}
              cover.stop_cover
            {% endif %}
          entity_id: cover.office

With it I can trigger the roller shutter just as before using the short click, whilst overloading the button with a different action for long click. First attempt was to use it to trigger other roller shutters at the same time, which works great. I did not use the double click yet, but it is detected just fine. Only drawback on the double click is, that it will delay the action on a single short click, as the automation needs to wait and see if a second click follows before triggering the action.

1 Like

For me it is not an option if I want to keep my marriage…:wink:
All switches must work 100% of the time not related to network/internet/server or any other of my toys.
BTW, before moving to Shelly, I used Fibaro rollers which supported double click in toggle mode. It’s a disappointment about Shellies in roller-toggle mode not supporting it out-of-the-box, but my AD script seems to do the work for now.
BTW, I noticed now that with latest HA, wifi and new FW info of shellies are available through the integration so no need for listening to MQTT announce messages…