Comfort Automation/ Security System Forums

Full Version: Hallway lights at night
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Sorry if this has been dealt with elsewhere.

I\'m in the process of programming my system. I\'ve upgraded all the components(USM Ether and Zwave, CSC, DS02, KT03x2) to latest firmwares, and have tested, done simple programming.

i am now starting on the fun stuff - Home automation. Big Grin

I would like to have the hall lights turn on (dimmed) under the following conditions:
1) PIR <> 0
2) Nighttime
3) the Zwave lights are not already on

After 30sec the lights are once again turned back off, only if the lights are not turned on in the interim.

I\'ve created a test zone response as follows:

If NightTime <> 0 Then
Zwave BasicSetCommand UCM02Zwave 10 0 30
End If

This works. However, if you have the lights on in the hallway at 100% the PIR response dims it to the 30%.

How do I create a condition on the state of a given Zwave light.

Any ideas?

Willem
The Zwave light status should be mapped to a counter, so you can check the value of that counter
eg

If NightTime <> 0 Then
    If Counter XX =0
    Zwave BasicSetCommand UCM02Zwave 10 0 30
    endif
End If

This will not do anything if the light is already on
Thank you very much. This worked.

I had the added complication that I wanted to make sure that if the lights were changed while the timer was on, it would not turn off the lights. Luckily the z-wave counter returns the % of the light not just on and off.

Just in case anyone else is looking at this trail here is is how I got around this:

I got around it as follows:
If NightTime <> 0 Then
If Counter ZWHallGroundOn = 0 Then
Zwave BasicSetCommand UCM02Zwave 10 0 30
Do GroundFlOff After 360 Seconds Using HallGround
End If
End If

Response GroundFlOff
If Counter ZWHallGroundOn = 30 Then
Zwave BasicSetCommand UCM02Zwave 10 0 0
End If
End of Response

I\'m not sure if there is an easier way of doing this but this worked for me.
Note that in the latest Zwave firmware, you can put a value into a mapped counter to set the level of the dimmable light, eg 0 for 0ff, 1 to 99 for brightness and 255 for on

This is an alternative to ending the zwave commands