Prevent light from turning on

Hi,

I need some help figuring this out. Looked at the forum a bit but could not find it.

This is my setup:
switch 1 downstairs controls → light 1
switch 2 upstairs controls → light 2

When either switch 1 or 2 is turned a scenario should trigger.
The scenario is as follows:
between 7.00 and 22.00 the lights turn on normally
outside that range only light 1 should turn on. Light one will provide enough light to see upstairs when everything is dark
and I want to prevent to hallway light to shine into the rooms.

I am using the following script:

local currentHour = os.date('*t').hour if (7 <= currentHour) and (currentHour < 22) then -- turn on lights normally luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "100"}, 1) luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "100"}, 2) else -- turn on dimmed lighting downstairs only luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "40"}, 1) end

The problem is that light 2 turns on when I am triggering the scene via switch 2 (using switch 1 is fine btw)
So basically I want to prevent the light 2 from turning on?

Any help is much appreciated.

Try this :

local currentHour = os.date('*t').hour if (7 <= currentHour) and (currentHour < 22) then -- turn on lights normally luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "100"}, 1) luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "100"}, 2) else -- turn on dimmed lighting downstairs only luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "40"}, 1) luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "0"}, 2) end

Thanks for the response.
Actually I tried this scheme already.
Aswell as sending the off command.

What happens is you see the light turn on and off again really quickly.

I think the switch itself turns the light on and than the vera command comes in and turns it off again.

Thats why I want to prevent the switch from turning it on in the first place.
If that is even possible.

[quote=“Bart, post:1, topic:177903”]The problem is that light 2 turns on when I am triggering the scene via switch 2 (using switch 1 is fine btw)
So basically I want to prevent the light 2 from turning on?[/quote]

If your switch2 is actually a physical switch, I believe there isn’t much you can do, but if you are referring to a switch from UI, there are some things that you could try.

  • Andrei -

Yes I installed these in the wall mounts: Fibaro Dimmer FGD221

So basically this means that that the dimmer module will always turn on the light when toggled?
I thought that the zwave controller “controlled” the devices?
So in theory it should be possible to just toggle the switch without it turning on the light?

You are right, but in the same time, the switch form your wall can control the device too. In this case, Fibaro Dimmer module can receives command from Vera and from your wall switch in the same time. That is why your light was on and off.

As far as i know is not possible to overwrite the commands received from the physical switch.

  • Andrei -

I was afraid of that. :frowning:

Thanks for the help anyways.