Detecting staircase switch which side was triggered - Page 1
Forum section: electronics / beginners

author: symbianas
author_rank: Regular Contributor
timestamp: May 10, 2025, 11:28:51 am
content: Hi, I have Shelly i4 and would like to detect which staircase switch was triggered. I have found such schematics:Was wondering will it work and is it safe to use regular "500k-1M ohm 1/2W resistors" and "X2 capacitor" in such wiring?

author: ledtester
author_rank: Super Contributor
timestamp: May 10, 2025, 04:59:57 pm
content: Here's a two-way switch implemented with a Shelly device - note that the phone app can tell when the light is on or off:https://www.youtube.com/shorts/-a5RED9O9i4And here is a demo of the i4:https://youtu.be/wpSVLwFVIqMNote that the switches don't carry any electrical power - they are programmed to turn on/off a light via an http command.The demo shows some of the http commands you can associate with a switch: turn on, turn off, toggle and set brightness.If you program each switch to toggle the light they will act as a two-way switch.What do you want to use the cap and resistors for?

author: symbianas
author_rank: Regular Contributor
timestamp: May 10, 2025, 06:04:47 pm
content: The idea is just use Shelly i4 as AC power detector, to see if light are on/off without having a relay. I don't want to control the lights I want to know the status and trigger automations if lights are on/off.All works fine, but it would be nice to know which side of staircase switch was toggled, is it at entrance or at exit and apply different automations.

author: themadhippy
author_rank: Super Contributor
timestamp: May 10, 2025, 06:34:32 pm
content: Quoteif thats all thats required you only need the r1 going to sw1 bit of your diagram,that will only be live if the light is on

author: Analog Kid
author_rank: Super Contributor
timestamp: May 10, 2025, 07:06:24 pm
content: Quote from: themadhippy on May 10, 2025, 06:34:32 pmYou seem to have missedQuote

author: ledtester
author_rank: Super Contributor
timestamp: May 10, 2025, 10:09:32 pm
content: Based on this video:https://youtu.be/HEcYKEbaAAAand this thread in the Shelly forums:https://shelly-forum.com/thread/10630-detect-if-light-is-turned-on/I don't think you can do what you want with the i4.Also, it appears the i4 requires a neutral wire. Will you have a neutral wire in your two-way switch box?

author: ledtester
author_rank: Super Contributor
timestamp: May 10, 2025, 10:54:01 pm
content: In the Americas we call the "2-way" switch a "3-way" switch (and we also have "4-way" switches when you want to control lights from more than two locations.)Here are some posts on implementing 3-way switching with Shelly devices:3-Way with Shelly: Because One Switch Just Isn't Enoughhttps://youtu.be/EliCUBtSWJ4https://www.reddit.com/r/homeautomation/comments/rj86i1/shelly_relay_three_way_us_switch_wiring_power/

author: symbianas
author_rank: Regular Contributor
timestamp: May 11, 2025, 08:09:24 am
content: Quote from: ledtester on May 10, 2025, 10:09:32 pmYes, I have both Live and Neutral wires available at second switch location.Basically this is the idea that I found in shelly forum, but it seems it was not tested by the author, so would like your optinion is that safe and works before implementing it.https://community.shelly.cloud/topic/8349-detect-which-staircase-switch-was-switched/#comment-26267

author: ledtester
author_rank: Super Contributor
timestamp: May 11, 2025, 01:35:57 pm
content: Quote from: symbianas on May 11, 2025, 08:09:24 amOk, here's the deal.The image in your first post was so large that I only saw the left half of it and that's why I asked what the purpose of the cap and resistor was.The Shelly forum discussion clears everything up - it would have been useful to include it in in your initial post.This discussion on how the resistor is being used is also useful:https://community.shelly.cloud/topic/1716-i4-gen3-use-for-input-detection/As for whether it will work and is it safe? I don't know.I would be inclined to go with the cross-stairway switch (or "4-way" switch as we call them) idea. You could use a generic DPDT switch - the only downside is that might not look like the switch you have.Found this DPDT switch:https://www.amazon.com/Leviton-1288-I-30-Amp-277-Volt-Double-Pole/dp/B003AUIRNY/It has a center-off position. Also kinda expensive.