ISO... Dry Contact Momentary Switch Inputs w/ Short and Long press (Zigbee or Zwave)

Looking for recommendation of device that can convert a dry contact momentary switch input into a short and long (hold) press. I need to convert the existing momentary switches into HA entities that have on/off and hold (for dim level) functions… no need to control any mains powered loads.

I have Zwave JS Ui or Zigbee2MQTT, so either protocol is fine with me.

I need to have 4 separate entities so ideally a single unit that HA can see as 4 separate entities is ideal but no required (my panel has 4 momentary switches).

thank you!

If you also have wifi you can solve it with any device running esphome :signal_strength:

A “esp32-c3 super mini” for ~$2 might do the job just fine if you can solder :hammer_and_wrench:

Otherwise a device like the shelly plus i4 will give you everything in a neat package :package:

Not so clear what are you trying to approach. Simple diagram from momentary switch to end point could help.

Thanks for helping guys!

@Karosm diagram…

> { Zigbee Module inputs }                  { Wall Buttons }
>      Dry Contact SW1  +----------------< Momentary button 1 
>      Dry Contact SW2  +----------------< Momentary button 2 
>      Dry Contact SW3  +----------------< Momentary button 3 
>      Dry Contact SW4  +----------------< Momentary button 4 
>             |
> Zigbee2MQTT populates Home Assistant Light Entities, one per Input SW
>             |
> Home Assistant Entities (states... On, Off, Dim Level)
>     - Light 1   
>     - Light 2
>     - Light 3
>     - Light 4

@orange-assistant If the Shelly i4 might be great option if plug-n-play like Zigbee devices and it exposes On, Off, and Dim level? Even better if I can trigger scenes using double or triple tap?

I still don’t get it… If you have HA there in the middle of the chain, why you need “device that can convert”?

HA is not “in the middle”? HA is at the end, the momentary switches are the start, HA is the end. I need hardware that “converts” dry contact inputs into something HA understands (Zigbee, zwave, etc). What @orange-assistant recommend seems to do at least some of what I need, maybe all of it… I’d just prefer zigbee if I can find one.

Sorry, I just can’t understand your description…
If you want “dry contact” input zigbee smart switch, have a look at Sonoff ZBMINIR2.

I looked at that but dont see it supporting dimming or scenes in Z2M?

Does the Shelly i4 support dimming or scenes?

There has to be device that does dimming. Where is that on your diagram? What is it dimming? Are you looking for zigbee smart dimmer?

No idea about Shelly stock FW - but it is esphome compatible hence it can be accomplished. :trophy:

Sky is the limit :parachute:

When using the native API with Home Assistant, you can perform Home Assistant actions straight from ESPHome Automations.

on_multi_click

This automation will be triggered when a button is pressed in a user-specified sequence.

I highly doubt that any Z-device gives you the freedom to achieve what you want :person_shrugging:

1 Like

I did some reading based on your input (thank you) and It looks like I’d need to create automations to deal with the dimming (holding down the dry contact button)?
Am I wrong and its built-into the entities that get created in HA?

I really want something that is plug-n-play, thinking this might work…

I would setup everything directly on the esphome node the buttons (for esphome binary Sensors) will be connected to. That way there shouldn’t be anything left to do in HA. :muscle:

Essentially you configure esphome to directly dimm/toggle the lights which are connected to HA :bulb:

Some inspiration with advanced logics can be found here and in many other (more recent?) threads :point_down:

Your scenario isn’t a common one and the ZigBee module you mentioned in the other thread is probably “locked” (Firmware limitation) to pwm/dimm the output terminals of the device - and nothing else :person_shrugging:

ESPhome is 100% new to me, thank you for the help.

I see there is a newer Shelly i4 Gen3 that has 16 built-in functions

I read the thread you linked to and looks like they got dimming mostly working.

I think you are saying that inside the code flashed to the Shelly, I’d specifically identify the Home Assistant entities I want to control? Or is that in the ESPhome Integration in HA itself?

Since I have a 4 separate dry buttons controlling 4 separate ‘HA lights’, I’ll need to have both Up & Down Dimming on a single button, do you know of any code for that?

I’ll also post in the ESPhome space to see if anyone has done this.

Yes, the esphome node can directly control all your HA entities (need to allow it ones per node).

# In some trigger
on_...:

  - homeassistant.action:
      action: notify.html5
      data:
        message: Button was pressed

Something like that would go in your esphome yaml to directly trigger ha entites…

For sure, the thread I linked contains something in that direction :point_down: