Jump to content
NOTICE / HINWEIS: iOS 18 Update and Today Widgets ×

Staircase timer with Shelly Dimmer 2


fiedl

Recommended Posts

I'm trying to implement a staircase timer with a Shelly Dimmer 2 device:

  • A short press of the connected button should activate the light when the light is off
  • After 3 minutes, the light should be turned off again
  • A short press of the connected button should reset the timer to 3 minutes when the light is already on
  • A long press of the connected button should activate the light for a longer duration, e.g. 30 minutes
  • A long press of the connected button should deactivate the light if the light is already on

## Attempt 1: Using local actions

I've tried to implement this with local webhooks first:

My firmware version is 20230913-114008/v1.14.0-gcb84623, which is shown as the most up-to-date version.

However, I'm observing some behaviour unexpected to me:

  • When both the short- and long-pressed actions being enabled, a short press will trigger both actions, i.e. turn the light on and turn it off immediately, again.
  • When only the short-pressed action is enabled, a short press will turn on the light and start the timer. However, a second short press won't reset the timer, while visiting the url in the browser will reset the timer. I.e. the action is not executed again while the light is on.
  • When only the long-pressed action is enabled, a long press will turn on the light. However, a second long press won't turn the light off. When visiting the url in the browser, the toggle works as expected. I.e. the action is not executed again when the light is on.

## Attempt 2: Using a cloud scene

I've also tried to implement this with control.shelly.cloud.

  • I've set the button to detached
  • I've removed the actions
  • I've created a scene to turn on the light: When the button is short pressed, activate the light; after 3 minutes, deactivate the light.
  • I've created a scene to toggle the light: When the button is long pressed, toggle the light.

However, I'm observing some behaviour unexpected to me:

  • The scenes are never triggered when the local actions are disabled
  • When triggering the scenes from control.shelly.cloud, the execution is fine; so the button trigger does not work
  • Switching off eco mode does not help
  • When having a local action being enabled, the scene is triggered
  • When having a local action being enabled, and the light being already on, the scene is not triggered

## Debug Log

I've enabled the debug log to see whether the press of the button is actually recognised.

Even though pressing the button several times, I see only one log entry of the type

dimmer_buttons.c:281 BUTTON0: state[1]

## Adjust baseline-gauge interval?

At this point, I'm suspecting an issue caused by the wiring.

image.thumb.png.dd64e1637efb4237e9c05ed73d67ea3d.png

 

As, in this situation, the opposite side of the switch is connected to N rather than L, and the Shelly Dimmer 2 has no independent connection to N, is suspect that the state of the switch cannot be determined when the light is on. However, a similar device, the Eltako TLZ12D-plus, has no trouble determining the state of the switch when wired like this.

How does the Shelly Dimmer 2 determine whether the switch is in a pressed state when the Shelly is connected to N? Does it evaluate the potential against N, or does it observe changes in the potential at SW1? Can I somehow adjust the gauge interval or reset the gauge after the light has been turned on so that "light on" determines the new baseline on which button presses can be detected again?

Any help or ideas would be highly appreciated. Thanks!

Link to comment
Share on other sites

3 hours ago, dewaldo said:

Why did you connect the shelly N terminal to its output terminal in your wiring ? 

In order for the Shelly device to operate, I thought, it would need L and N to be connected. However, at the location of the Shelly device, there is no wire to N available. So, I've bridged N to O such that the current can take the route over the lamps. The operational current is so small that the lamps won't light up, but the Shelly device can operate. This works fine with the Eltako TLZ12D-plus device.

3 hours ago, thgoebel said:

A Shelly Dimmer2 SW input can be activated reliably with switching between SW to L or  SW to O.

Great! Does this mean that I can just remove the bridge between N and O and leave the rest as it is?

Link to comment
Share on other sites

  • Members
54 minutes ago, fiedl said:

Does this mean that I can just remove the bridge between N and O and leave the rest as it is?

Nearly perfect. But you‘ll have to change the wiring of the manual switch:

IMG_1566.thumb.jpeg.c1cf94836e672fd7db16ba83eeb34dd7.jpeg

 

Either A or B has to be implemented.

Link to comment
Share on other sites

1 hour ago, thgoebel said:

you‘ll have to change the wiring of the manual switch

Thank you! Unfortunately, this can't be done with reasonable effort.

Maybe, let's try another approach: Fig. 2 from the Shelly Dimmer 2 manual suggests that one can use the Shelly Dimmer 2 without connecting N if the far end of the switch is connected to L. 

image.png.314fd786338e5b4b6850e0ad893952bd.png

 

Does anyone know a device I can put between the Shelly Dimmer 2 and the switch that would serve two purposes:

  • Output (3) of the unknown device should provide enough current such that the glow lamps in the light switches light up.
  • The device should detect changes in the current from (1) to (3), which would correspond to closing or opening the switch. Then, the device would activate or deactivate the current from (1) to (2) such that the Shelly Dimmer 2 would detect a press like suggested in above figure 2 of the manual.

image.thumb.jpeg.81426f520cbb0c6a60e7cd76952d2248.jpeg

 

Link to comment
Share on other sites

16 minutes ago, thgoebel said:

Most likely, the unknown device will rest unknown…

Could you elaborate on that? Conceptionally, I could use the Eltako TLZ12D-plus device. Unfortunately, I can't reduce its hold time to zero.

20 minutes ago, thgoebel said:

The glow lamp is the crucial element.

Could you also elaborate on that? If it would solve the issue I could, of course, remove the glow lamps from the switches.

Link to comment
Share on other sites

20 hours ago, thgoebel said:

Diagram with glow lamp plus ELTAKO relay

Thank you so much! Your effort is highly appreciated. I’ve ordered the Eltako R12-100-230V and will let you know how it goes. 

 

21 hours ago, thgoebel said:

The glow lamp is the crucial element.

Could you give me some hint why the glow lamps would make a difference to the Shelly Dimmer 2 without the Eltako?

Link to comment
Share on other sites

  • Members

A glow lamp in parallel to a switch or pushbutton inhibits the proper function of the SW input of any Shelly device. Hence, I made this remark to prevent frustration.

Edited by thgoebel
Link to comment
Share on other sites

On 30.9.2024 at 00:27, fiedl said:

How does the Shelly Dimmer 2 determine whether the switch is in a pressed state

 

1 hour ago, thgoebel said:

 

A glow lamp in parallel to a switch or pushbutton inhibits the prover function of the SW input of any Shelly device.

 

Thank you so much! Do you know of any resource you can point me to where I can learn about how the shelly determines the button state?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...