Integrate landscape lighting

Hi -
Our house has pre-existing landscape lighting that relys on a 2-wire photo sensor to come on at dusk. I am trying to understand how I could go about integrating this system with openhab2, I am currently most familiar with the zwave.

Is there something I could replace the light sensor with to simulate the ā€œitā€™s dark nowā€ signal that the sensor is sending?

Thanks!
Dave

What do you want to achieve? is there something wrong?
Why you need the lighting within openHAB?

you could replace the sensor with a whole variety of things - hence we need to know your requirements.

Heh, I should have been more clear. The light sensor doesnā€™t work well, partially because itā€™s in the shade a lot.

So Iā€™d like to just integrate the landscape lights in with the rest of the lighting I already have controlled via openhab2.

All right then!
Do you have zwave already in place? Then it would be the goto technology I think. You could then turn it on, when the zwave light sensor tells.

ā€¦ Or you could just use the astro binding sun:civilDawn, sun:civilDusk so it would just go on and off at your locationsā€™ data.

Hello -

I too grew very frustrated with the photo sensors and mechanical timers that typically control outdoor landscape lighting.

@binderth pointed you in the exact direction of what I choose to move forward with and has been rock solid ever since I deployed it.

I changed the electrical outlets where my landscape lighting transformers are plugged into AC power to Zwave outlets - this is the model that I used but any will do:

Once the outlets were included into my Z-Wave network I removed the analog timers and photo cells and created the following rules.

The rule utilizes the ASTRO BINDING to get SUNSET and SUNRISE times which I use to turn the lights on and off.


rule "turn landscape lighting on"
when
    Channel 'astro:sun:home:set#event' triggered START 
then
    FntLandscapeLights.sendCommand(ON)
    BckLandscapeLights.sendCommand(ON)


rule "turn landscape lighting off"
when
    Channel 'astro:sun:home:rise#event' triggered START 
then
    FntLandscapeLights.sendCommand(OFF)
    BckLandscapeLights.sendCommand(OFF)
end

end

I also have used an alternate version of this rule utilizing CRON to turn the lights on and off at specific times rather than at SUNSET and SUNRISE.

Let me know if you have any questions.

Squid

Thanks everyone for the suggestions. Ordered an outdoor zwave power adapter and will be adding that to control the lights.

Been wanting to look into the astro binding to control some of my other lights, thanks for the examples

Dave

Hi @KidSquid

Your ā€œruleā€ is quite straightforward, and works fineā€¦
But what if my raspberry goes down for whatever reason (power outage, etc.) and comes up again past SUNSET, is there any way we can turn the lights automatically although weā€™ve ā€œmissedā€ the trigger?

PD: Sorry @dbadia for hijacking the thread, but I think this might be useful for you too! :smile:
Cheers!
Marc

Hello -

I really havenā€™t had issues with stability so your suggested scenario had not been considered.

I guess you look at implementing a timer that lasts for X number of hours after the light has been turned on and then save that information into one of the persistence databases. You could then have another rule check to see if those timers had expired upon restart and turn off whatā€™s needed.

Iā€™m sure some of the great maintainers and experts could help you out with some code suggestions if needed. If you come up with a solution please post it here for others to use.

Squid

At first I encountered also no severe stabiltiy problems with OH2 yet! :wink:
But: to be on the safe side you could use persistance and some intelligent rules as KidSquid pointed out.

You can tell OH2 in rules what to do at systemstart. So just to be sure, your light is on even OH2 was out at the sunset-event, you can just adjust your rules as described here:

But then again: I always like to think of openHAB2 of a means to automate things and actions Iā€™d otherwise have to do manually. That means two Things:

  1. always have the ā€œoriginalā€ way handy (in your case a physical switch for your lighting)
  2. donā€™t rely only on openHAB2 (or any other home automation), so if you see your lighting not ON, you could just as easily turn it ON with your physical switchā€¦ :wink:

Thanks @binderth

I guess this weekend Iā€™ll be diving into Rich Koshakā€™s

Looks like a good investment in the long run.

TGIF!