Looking for an alternative to hard-wiring 2 ceiling lights to the same switch


#1

Lights only work when both light switches on the wall is switched on

There are 2 ceiling lights in my living room, both operate indiviually with 2 seperate light switches. Linking the lights with a wire would be difficult so i was trying to do it with Smart lights instead so that when i switch 1 light on, it then turns the other on.

The piston is working how it should if i turn the light on and off with my phone but not when i turn them on and off at the wall switch (leaving the front light on permanently).


#2

Can you activate with your phone once and manually once, then post the logs from each event?


#3

I usually use the command:
IF Switch “changes to” instead of IF Switch “is”.

Also keep in mind that with your current piston, changing Bulb 4 will NOT make any changes to Bulb 3.
(you only coded in one direction)


#4

This is also where I would use else rather than 2 triggers. i.e

IF white bulb 3 changes to ON
THEN with light 4 turn on
Else turn OFF

You can also use the community app trendsetter which will probably do exactly what you’re after. It’s made by @kriskit on the ST forum.


#5

Here is the log from turning the light on and off from my phone. Nothing is logging when i turn the light off and on from the switch.

04/09/2018, 10:10:19 +941ms
+1ms ╔Received event [Living Room - Back Hue ambiance lamp 1].switch = on with a delay of 1055ms
+54ms ║RunTime Analysis CS > 11ms > PS > 28ms > PE > 15ms > CE
+56ms ║Runtime (37382 bytes) successfully initialized in 28ms (v0.3.107.20180806) (55ms)
+57ms ║╔Execution stage started
+65ms ║║Comparison (enum) on is (string) on = true (1ms)
+67ms ║║Cancelling condition #9’s schedules…
+67ms ║║Condition #9 evaluated true (5ms)
+68ms ║║Cancelling condition #1’s schedules…
+69ms ║║Condition group #1 evaluated true (state changed) (8ms)
+71ms ║║Cancelling statement #2’s schedules…
+85ms ║║Executed physical command [Living Room - Front Hue ambiance lamp 2].on() (12ms)
+86ms ║║Executed [Living Room - Front Hue ambiance lamp 2].on (13ms)
+92ms ║║Comparison (enum) on is (string) off = false (1ms)
+93ms ║║Cancelling condition #8’s schedules…
+94ms ║║Condition #8 evaluated false (5ms)
+95ms ║║Cancelling condition #5’s schedules…
+96ms ║║Condition group #5 evaluated false (state changed) (7ms)
+98ms ║╚Execution stage complete. (40ms)
+99ms ╚Event processed successfully (98ms)
04/09/2018, 10:10:16 +201ms
+1ms ╔Received event [Living Room - Back Hue ambiance lamp 1].switch = off with a delay of 1066ms
+57ms ║RunTime Analysis CS > 20ms > PS > 26ms > PE > 11ms > CE
+59ms ║Runtime (37385 bytes) successfully initialized in 26ms (v0.3.107.20180806) (57ms)
+60ms ║╔Execution stage started
+68ms ║║Comparison (enum) off is (string) on = false (1ms)
+70ms ║║Cancelling condition #9’s schedules…
+70ms ║║Condition #9 evaluated false (5ms)
+71ms ║║Cancelling condition #1’s schedules…
+72ms ║║Condition group #1 evaluated false (state changed) (8ms)
+78ms ║║Comparison (enum) off is (string) off = true (2ms)
+79ms ║║Cancelling condition #8’s schedules…
+80ms ║║Condition #8 evaluated true (5ms)
+80ms ║║Cancelling condition #5’s schedules…
+81ms ║║Condition group #5 evaluated true (state changed) (7ms)
+83ms ║║Cancelling statement #6’s schedules…
+88ms ║║Skipped execution of physical command [Living Room - Front Hue ambiance lamp 2].off([]) because it would make no change to the device. (2ms)
+89ms ║║Executed [Living Room - Front Hue ambiance lamp 2].off (4ms)
+91ms ║╚Execution stage complete. (31ms)
+92ms ╚Event processed successfully (92ms)


#6

I think this is what you mean

Still no difference though. Here are the log files for this

04/09/2018, 10:15:03 +683ms
+1ms ╔Received event [Living Room - Back Hue ambiance lamp 1].switch = on with a delay of 1088ms
+66ms ║RunTime Analysis CS > 13ms > PS > 33ms > PE > 20ms > CE
+69ms ║Runtime (37484 bytes) successfully initialized in 33ms (v0.3.107.20180806) (66ms)
+70ms ║╔Execution stage started
+77ms ║║Comparison (enum) on changes_to (string) on = true (0ms)
+79ms ║║Cancelling condition #9’s schedules…
+79ms ║║Condition #9 evaluated true (5ms)
+80ms ║║Cancelling condition #1’s schedules…
+81ms ║║Condition group #1 evaluated true (state changed) (7ms)
+83ms ║║Cancelling statement #2’s schedules…
+149ms ║║Executed physical command [Living Room - Front Hue ambiance lamp 2].on() (63ms)
+149ms ║║Executed [Living Room - Front Hue ambiance lamp 2].on (64ms)
+152ms ║╚Execution stage complete. (83ms)
+153ms ╚Event processed successfully (153ms)
04/09/2018, 10:15:01 +215ms
+1ms ╔Received event [Living Room - Back Hue ambiance lamp 1].switch = off with a delay of 1157ms
+71ms ║RunTime Analysis CS > 14ms > PS > 34ms > PE > 23ms > CE
+74ms ║Runtime (37486 bytes) successfully initialized in 34ms (v0.3.107.20180806) (72ms)
+75ms ║╔Execution stage started
+82ms ║║Comparison (enum) off changes_to (string) on = false (1ms)
+83ms ║║Condition #9 evaluated false (4ms)
+84ms ║║Condition group #1 evaluated false (state did not change) (5ms)
+89ms ║║Comparison (enum) off changes_to (string) off = true (1ms)
+90ms ║║Cancelling condition #13’s schedules…
+91ms ║║Condition #13 evaluated true (4ms)
+92ms ║║Cancelling condition #10’s schedules…
+92ms ║║Condition group #10 evaluated true (state changed) (6ms)
+94ms ║║Cancelling statement #11’s schedules…
+111ms ║║Executed physical command [Living Room - Front Hue ambiance lamp 2].off() (14ms)
+112ms ║║Executed [Living Room - Front Hue ambiance lamp 2].off (16ms)
+115ms ║╚Execution stage complete. (40ms)
+116ms ╚Event processed successfully (116ms)
04/09/2018, 10:14:19 +540ms
+1ms ╔Starting piston… (v0.3.107.20180806)
+189ms ║╔Subscribing to devices…
+217ms ║║Subscribing to Living Room - Back Hue ambiance lamp 1.switch…
+273ms ║║Subscribing to Living Room - Front Hue ambiance lamp 2…
+274ms ║╚Finished subscribing (93ms)
+300ms ║Cancelling condition #9’s schedules…
+301ms ║Cancelling condition #1’s schedules…
+323ms ╚Piston successfully started (323ms)


#7

no, you don’t need the 2nd IF just put turn off


#8

If you’re not seeing events for manual switching, it must be in the Device Type Handler. Which one are you using?


#9

I don’t have a device handler for the switch - it’s just a normal light switch.

When i turn the switch off at the wall, the light obviously becomes deactivated as there is no-longer power going to the bulb. Would the solution be to code it so that when it becomes active, the other bulb turns on, when it becomes deactivated, the other bulb turns off? If so, how would i code this?


#10

Ah, so you have smart bulbs and dumb switches. That wasn’t clear.

What does the status (the status with a little symbol in front of it) parameter show for your bulbs when you turn off power? If it toggles ONLINE and OFFLINE you would be able to use that.


#11

You won’t be helping your mesh by turning on and off the lights as your be chopping parts of your network off. It’s best to turn them off through the software.


#12

Smart bulbs plugged into dumb switches is not a bad setup, but I agree with @borristhecat:
The physical wall switches should be left ON 24/7.

Any time that the switches are in the off position, then no commands can be sent in either direction.
(since the power is effectively cut to the device)


Smart bulbs work best when toggled by the following methods:

  • Timers (such as sunset)
  • Events (such as arrive home)
  • Motion (enter a room)
  • Voice (Alexa/Google Home)
  • Pistons
  • Routines
  • Phone App

(pretty much every method except the wall switch)


#13

In the SmartThings app and on webCoRE, the status doesn’t change when i turn the light switch off at the wall oddly and it still shows as on (i have refreshed and there still isn’t a change). On the Philips Hue app, it shows as unavailable.


#14

Yes, i understand this but until i buy another motion sensor for the room, i was hoping to link them together this way


#15

Yes, this is correct, and will happen if you kill power to a smart bulb.

This may be a dumb analogy, but:

  • If you turn off your cell phone, how could your wife give you a message?
  • If you turn off your wall switch, how could the bulb give the hub a message?

You can link two bulbs together, but only if they both have power running to them.


#16

yes and best way IMO is to use trendsetter for simple stuff like this. It creates as many devices as you want to one device so you can then turn them ON/OFF through the app or google if you wish.


#17

Yes, i understand this but why can’t i configure the second light, which is permanently turned on, to turn on when the first light is active/available/on and turn off when the first light is inactive/unavailable/off?


#18

When the power is cut to the 1st bulb, it is unable to report a status change to the ST hub…
(and if the hub is unaware, then so is webCoRE)

Using my earlier analogy:
If your cell phone is turned off, how can you be expected to know that your wife wants you to buy ketchup while you are at the store?


At the risk of stating the obvious:
‘Smart’ bulbs become ‘dumb’ bulbs when there is no power going to them.

It is likely time to bite the bullet and buy a motion sensor or a voice activator such as Alexa.


#19

Okay, that makes sense. Thanks