fiedl Posted September 29, 2024 Posted September 29, 2024 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) French German Italian Polish Portuguese (European) Spanish
dewaldo Posted September 30, 2024 Posted September 30, 2024 Why did you connect the shelly N terminal to its output terminal in your wiring ? Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
Members thgoebel Posted September 30, 2024 Members Posted September 30, 2024 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) French German Italian Polish Portuguese (European) Spanish
fiedl Posted September 30, 2024 Author Posted September 30, 2024 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) French German Italian Polish Portuguese (European) Spanish
Members thgoebel Posted September 30, 2024 Members Posted September 30, 2024 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) French German Italian Polish Portuguese (European) Spanish
fiedl Posted September 30, 2024 Author Posted September 30, 2024 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) French German Italian Polish Portuguese (European) Spanish
Members thgoebel Posted September 30, 2024 Members Posted September 30, 2024 (edited) Most likely, the unknown device will rest unknown… The glow lamp is the crucial element. Edited September 30, 2024 by thgoebel Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
fiedl Posted September 30, 2024 Author Posted September 30, 2024 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) French German Italian Polish Portuguese (European) Spanish
Members thgoebel Posted September 30, 2024 Members Posted September 30, 2024 Diagram with glow lamp plus ELTAKO relay (NO contact, 230V AC coil): 2 Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
dewaldo Posted October 1, 2024 Posted October 1, 2024 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) French German Italian Polish Portuguese (European) Spanish
Members thgoebel Posted October 1, 2024 Members Posted October 1, 2024 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) French German Italian Polish Portuguese (European) Spanish
fiedl Posted October 1, 2024 Author Posted October 1, 2024 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) French German Italian Polish Portuguese (European) Spanish
Members thgoebel Posted October 1, 2024 Members Posted October 1, 2024 (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 October 1, 2024 by thgoebel 1 Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
fiedl Posted October 1, 2024 Author Posted October 1, 2024 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) French German Italian Polish Portuguese (European) Spanish
fiedl Posted October 11, 2024 Author Posted October 11, 2024 On 30.9.2024 at 16:21, thgoebel said: Diagram with glow lamp plus ELTAKO relay (NO contact, 230V AC coil): The Eltako R12-100-230V has arrived. I've wired it as shown in the above wiring diagram suggested by @thgoebel. Unfortunately, the result is not quite as expected. Here are my observations with this configuration: The glow lamps of the switches do not light up at all despite the phase tester is lighting up at A1 and at A2 The Eltako's connection between (1) and (2) is always closed, i.e. there is always current at (1) and at (2), no matter what the state of the switch is, and no matter whether one presses the manual switch on the Eltako How can I increase the current output at (3) in order to supply enough current for the glow lamps? And how can I adjust the Eltako such that it won't interpret the glow-lamp current as signal, but only if the switch is really pressed? Also, are we sure that this is the right type of relay? From the product description I think it might be a bistable relay. So, if I release the physical switch, this wouldn't disconnect (1) and (2) from what I understand. So, we couldn't have long-press and short-press events in the Shelly anymore, right? So, I guess we are looking for a relay with these properties: The connection between (1) and (2) should only be closed as long as there is a signal between A1 and A2. A release of the switch should also open the connection between (1) and (2). The output at (3) should provide enough current for the glow lamps at the switches to light up Despite the glow lamps in parallel to the switches, the relay should only interpret the switch being pressed as "signal" Does this make sense to you? Any help would be highly appreciated. Thanks! Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
Members thgoebel Posted October 11, 2024 Members Posted October 11, 2024 (edited) According to this datasheet https://www.eltako.com/fileadmin/downloads/de/Technische_Daten/Technische_Daten_elektromechanische_Schaltrelais_und_Installationsschuetze Kapitel_19.pdf the ELTAKO R12-100-230 is a standard monostable relay with a NO contact. Coil resistance (not specified in the datasheet) should be in the range of 6,8 to 12kΩ. This would ensure the proper function of the glow lamp. Obviously, you‘ve got another relay with an electronic activation. Could you post a picture of your relay, please? Edited October 11, 2024 by thgoebel Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
fiedl Posted October 11, 2024 Author Posted October 11, 2024 18 minutes ago, thgoebel said: Could you post a picture of your relay, please? Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
Members thgoebel Posted October 11, 2024 Members Posted October 11, 2024 Mysterious, indeed. Relay is as suggested, wiring is fine. Do you have a chance to measure the resistance of the coil between A1/A2 without wires? And the resistance between contacts 1/2 (also without wiring)? Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
fiedl Posted October 11, 2024 Author Posted October 11, 2024 Between A1 and A2, I have 7.96 kΩ. Between 1 and 2, I have infinite resistance when the relay button is released. Between 1 and 2, I have 0.1Ω when the relay button is pressed. Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
fiedl Posted October 11, 2024 Author Posted October 11, 2024 How do we know whether we need to connect L to 1 or 2 of the relay? How do we know whether we need to connect L to +A1 or -A2 of the relay? Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
Members thgoebel Posted October 11, 2024 Members Posted October 11, 2024 (edited) Pins A1/A2 and 1/2 are not polarised. Thus, it doesn’t matter how they are wired. Relay is fine - values of the resistance measurement are as expected. The issue must be either in the wiring or in the Shelly. Edited October 11, 2024 by thgoebel Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
fiedl Posted October 11, 2024 Author Posted October 11, 2024 (edited) 8 minutes ago, thgoebel said: Pins A1/A2 and 1/2 are not polarised. Thus, it doesn’t matter how they are wired. For the switch glow lamps to work, we need to connect them to L coming from the Eltako device because the far end of the glow lamps is connected to N. Does this then mean that the Eltako will emit L on both connectors, A1 and A2? 4 minutes ago, thgoebel said: The issue must be either in the wiring or in the Shelly. You have seen the wiring. And the Shelly without the Eltako works as expected. I could try to connect the Eltako to the wires without the Shelly. Then I would expect: The glow lamps should light up The lamps should light up as long as the relay button is held down The lamps should light up as long as the switch is held down Right? Edited October 11, 2024 by fiedl Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
Members thgoebel Posted October 11, 2024 Members Posted October 11, 2024 The coil of the ELTAKO relay has a resistance of 8kΩ, which is low compared with the resistance of a glow lamp (approximately 120kΩ or more). Hence, if L is connected to A1, live potential is present at A2 too. This should induce the lamp to glow. Swapping A1 and A2 has no effect at all. 1 Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
Members thgoebel Posted October 11, 2024 Members Posted October 11, 2024 Please check: ELTAKO relay coil wired according to the above diagram with wire to the buttons/glow lamps, but pin 1 and 2 NOT connected. Measure the resistance between pin 1 and 2 of the ELTAKO. No button pressed, please! Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
fiedl Posted October 24, 2024 Author Posted October 24, 2024 As it turns out, the shelly dimmer 2 has been defective. Today, my replacement shelly dimmer 2 has arrived and the setup works fine now. Thanks, again, for suggesting the Eltako R12-100-230V, and thank you very much @thgoebel for your continuous help and patience! On 30.9.2024 at 16:21, thgoebel said: Diagram with glow lamp plus ELTAKO relay (NO contact, 230V AC coil): Quote Translate Revert translation? English (American) French German Italian Polish Portuguese (European) Spanish
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.