I am a new user to openHAB and really like it. I have openHAB 2.2 installed with the Astro binding installed via the paperUI.
I would like a simple rule to turn on some lights at sunset so I started reading how to do it but there seems to be a lot of confusion whether the astro binding has the same functionality it used to have and what work arounds one should use.
Can someone clear this up for me and maybe post a link to an article on how to do this or just explain how to do this with an example?
DateTime Sunrise_Time "Sun Up [%1$tH:%1$tM]" { channel="astro:sun:3d94b7e0:rise#start" }
DateTime Sunset_Time "Sun Down [%1$tH:%1$tM]" { channel="astro:sun:3d94b7e0:set#start" }
rule "Sunrise"
when
Channel 'astro:sun:3d94b7e0:rise#event' triggered START
then
DayLight.postUpdate(ON)
sendCommand(GarageUteP, OFF)
end
rule "Sunset"
when
Channel 'astro:sun:3d94b7e0:set#event' triggered START
then
DayLight.postUpdate(OFF)
sendCommand(GarageUteP, ON)
end
I have found at sunset times it can sometimes be difficult to see in certain parts of the house (and curtains being closed) and have an offset of -60 mins on my sunset; this also helps in avoiding random toys being left on floors and stepping/kicking them with bare feet.
You need to change sendCommand(GarageUteP, OFF) to GarageUteP.sendCommand(OFF)
The action sendCommand has a few reserved use cases whereas the item method is recommended when the item is know as is your case here.