Hi,
is it possible to use two separate switches (in other places) for one lamp? I want to make a so-called virtual stair/crossing switch. When the main switch is on then the other should have the same status
No need for same status.
WHEN switch1 changes state THEN toggle light.
WHEN switch2 changes state THEN toggle light.
in flow I can only see âwhen onâ or âwhen offâ (Tuya buttons)
I want to have the same status due to the fact that the buttons are illuminated. Without access to the phone, I can know when the light is on and when it is not by looking at the switch
Something like:
WHEN switch1 is switched on THEN
switch on light
switch on switch 2
And similar for switch 2 and when switching off. So in total 4 flows.
By the way: which type of switch are you using and which app?
Tuya Zigbee, 1 Gang Wall Switch
Nice that control light on the switch.
Hmm, just one little thing to watch
On such way the system may go into never-ending loop. Change of first switch causes authomatic change in second, which causes change in first, whichâŚ
Yes, i hope, Homey is so lazzy (smart), that the âswitch on/offâ for already switched device does not cause cascade of additional switchings and events - but just in case, itâs smart to use in logic additional check âAND switchX is not already in stateâ.
I did not think of loops yet. In this case I think it goes well. When both switches are off and the first one is switched to on the first flow will run and switch on switch2 as intended. That will cause the second flow to run. The second flow will switch on switch 1 that is already on. So no state change and (theoretically) no more start of flows. Of course you should check al kind of combinations (theory), and still check the actual behavior (implementation) of Homey. And add additional logic if possible like your check.
Why make it so hard on yourself? You could also just add a sensor on the top of the stairs and one on the bottom of the stairs. Add them both to the same room called staircase and set the activity timer of each sensor to 30s.
Then you create a flow with the following logic:
When the staircase became active => Turn on the staircase lights
When the staircase became inactive => Turn off the staircase lights
Then youâre all set. the lights on the staircase will go on as soon as either the top or the bottom sensor is triggered and will stay on for 30s after the sensor on the other side is triggered. The maximum time the lights will stay on is 1 min assuming it wil take you 30s to reach the trigger point of the second sensor. This is plenty enough for anyone to climb regular stairs.
If you find that 30s is too short, just extend it a bit. If you think that 30s is too long and a waste of energy lower the timeout.
He wants the status lights to be on tooâŚâŚ.
Yeah, there is a proper way to implement a smart home and bad way. The proper way is to always connect smart devices in such a way that the device will keep operating as intended even when the smart hub is down. The bad way is to solely rely on your hub for the proper functioning of your device. Think of it like adding the smart layer on top of existing dumb devices rather than replacing them.
With this in mind, I would always opt for regular lights hard wired to a smart enabled dimmer or switch. As the switch is hardwired to the lamp it will always work as a regular light switch even when the smart hub is down. It will only try to send its status back to the hub and listen to requests coming from the hub. I would not rely on the status of the switch in my hub to virtually control a light. You donât want to wake up in the middle of the night to find out that you cannot switch on the lights because your internet is down.
If I want to build a hotel switch, I would build just that but with either two regular switches and a Fibaro Switch module, or two pulse switches and a Fibaro Dimmer module. In any hotel switch the on/off state of the switch would also change depending on which switch was used the last time, so a status light on the switch itself would not make any sense. I would just add 2 motion sensors to toggle the Fibaro Dimmer module and therefore turning on the lamp. The virtual status of the lamp exists only in homey. When homey is down, your hotel switch will continue to operate normally and will still allow you to turn on the lights manually.
I agree, but now you are discussing/advising the principle solution of the topic starter. He uses 2 smart switches with a control light, which he wants to be on or of at the same time. And he wants to switch the light of manually. Even that control light is superfluous as you most likely can see that the light is on .
But maybe the switches are far apart and no wiring is possible at both sites.
In development, if a solution to a problem is too complex to solve, it usually means that your architecture or your design pattern is wrong. And how annoying it might be, a big refactor might give you a better/more satisfying result.
In my opinion the solution is simpleđ
It might seem simple at first glance, but in reality creating a solution in which toggling one switch automatically causes the other switch to toggle as well and then build a scheme where both switches have to be on for the light to switch on, and both switches have to be off for the light to switch off is virtually impossible.
You might be able to program something like that in Homey taking in account all the exceptions and conditions. What would happen when homey is down? Would you still be able to control the lights? What would happen if Homey recovers, would the state still be correct? Do you need to run a reset script when Homey restarts?
I just donât think that itâs conceptually a good idea.
I agree with your architectural design, but one should allow other users to experiment and learn too.
FYI: it is not impossible, as you are wrong presuming both switches to be on or off at the same time. See the given flow above. You even donât have to connect the second switch to the lamp.
First switch is connected to the lamp (by wires) and turns the light on and off. The second switch is connected only to electricity and changes the on/off state
I agree. Itâs is a lot easier to program it like that indeed. Then each switch just also toggles the other with a pattern that is called a debounce. The only downside would be that it will only work while homey is up. That is ok for trivial situations like a garden light or something. But I wouldnât design something like that for something more important like an actual staircase. Especially not for the main staircase that is used many times a day/night by all people of the household including te kids.
Then, if You want the always on system - and have possibility to do some additional cablesâŚ
Why not use just one push button relay with the actual lamp and bring from relay two ( or more ) push buttons with cables to âstrategic placesâ?
Only difference from âgood old electricalâ system is that there must be push buttons to use ( not toggle switches) and electrical connectivity is done as star, not as chain.