fiedl Posted September 29 Share Posted September 29 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: I've set the button to detached For the short-pressed action, I've set the url to http://localhost/light/0?turn=on&timer=180 For the long-pressed action, I've set the url to http://localhost/light/0?turn=toggle&timer=1800 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. 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! Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
dewaldo Posted September 30 Share Posted September 30 Why did you connect the shelly N terminal to its output terminal in your wiring ? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Members thgoebel Posted September 30 Members Share Posted September 30 A Shelly Dimmer2 SW input can be activated reliably with switching between SW to L or SW to O. Switching between SW and N is working „half“: IIRC, only „on“ is possible, but no „off“ state. Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
fiedl Posted September 30 Author Share Posted September 30 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? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Members thgoebel Posted September 30 Members Share Posted September 30 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: Either A or B has to be implemented. 1 Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
fiedl Posted September 30 Author Share Posted September 30 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. 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. Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Members thgoebel Posted September 30 Members Share Posted September 30 (edited) Most likely, the unknown device will rest unknown… The glow lamp is the crucial element. Edited September 30 by thgoebel Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
fiedl Posted September 30 Author Share Posted September 30 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. Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Members thgoebel Posted September 30 Members Share Posted September 30 Diagram with glow lamp plus ELTAKO relay (NO contact, 230V AC coil): 2 Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
dewaldo Posted Tuesday at 10:37 AM Share Posted Tuesday at 10:37 AM Is this safe for the neon lamp (glow lamp). I'm thinking about induction voltages at the moment the wall switch is released and Eltaco relais is switched off ? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Members thgoebel Posted Tuesday at 10:52 AM Members Share Posted Tuesday at 10:52 AM Not harmful for the neon lamp! These devices were formerly used as voltage stabilisers or overvoltage protectors. And every glow lamp has a series resistor, which limits the current through the lamp. 1 Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
fiedl Posted Tuesday at 11:12 AM Author Share Posted Tuesday at 11:12 AM 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? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Members thgoebel Posted Tuesday at 01:46 PM Members Share Posted Tuesday at 01:46 PM (edited) 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 Tuesday at 04:58 PM by thgoebel 1 Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
fiedl Posted Tuesday at 03:42 PM Author Share Posted Tuesday at 03:42 PM 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? Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.