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?
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.
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.
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!
Cheers!
Marc
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.
At first I encountered also no severe stabiltiy problems with OH2 yet!
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:
always have the āoriginalā way handy (in your case a physical switch for your lighting)
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ā¦