toto
(toto lino)
October 28, 2017, 11:20am
1
I would like to turn on a HUE light with sunrise + X minutes but it does not work
astro.items
DateTime Sunrise_Time "Sunrise [%1$tH:%1$tM]" { channel="astro:sun:home:rise#start" }
DateTime Sunset_Time "Sunset [%1$tH:%1$tM]" { channel="astro:sun:home:set#start" }
Number Azimuth "Azimuth" { channel="astro:sun:home:position#azimuth" }
Number Elevation "Elevation" { channel="astro:sun:home:position#elevation" }
String MoonPhase "MoonPhase" { channel="astro:moon:home:phase#name" }
Number Total_Radiation "Radiation" { channel="astro:sun:home:radiation#total" }
Number Diffuse_Radiation "Diffuse Radiation" { channel="astro:sun:home:radiation#diffuse" }
hue.items
Switch Ankleidezimmer { channel="hue:0100:0017882a2ca4:1:brightness" }
.rules
rule "hue light on"
when
Channel 'astro:sun:home:set#event' triggered START
then
sendCommand(Ankleidezimmer, ON)
logInfo("hue light on")
end
astro.things
astro:sun:home [ geolocation="50.914393,7.196869,100", interval=60 ]
{
Channels:
Type start : rise#start [
offset=295
]
Type end : rise#end [
offset=5
]
}
astro:moon:home [ geolocation="50.914393,7.196869", interval=60 ]
sihui
(SiHui)
October 28, 2017, 11:35am
2
toto:
but it does not work
What does not work? The trigger does not get triggered or the light does not come on?
Put another logInfo above your sendCommand(Ankleidezimmer, ON)
: logInfo("astro channel triggered")
toto
(toto lino)
October 28, 2017, 11:39am
3
Wow… in The rule i wrote “set” and Not “rise”.might be the mistake
opus
(JĂĽrgen Baginski)
October 28, 2017, 11:57am
4
That’s what would have said , although I would switch a ligth on with Sunset
toto
(toto lino)
October 28, 2017, 2:08pm
5
The problem is … that it is still not working
rule "hue light on"
when
Channel 'astro:sun:home:rise#event' triggered START
then
sendCommand(Ankleidezimmer, ON)
logInfo("astro channel triggered")
end
toto
(toto lino)
October 28, 2017, 2:59pm
6
Seems like the astro thing is not getting triggered because there is nothing in the openhab.log and nothing in the events.log.
I could solve the problem.
The Code had to look like this in the things file:
astro:sun:home [ geolocation="50.914393,7.196869,100", interval=60 ]
{
Channels:
Type rangeEvent : set#event [
offset=10
]
}
Now I have another problem:
astro:sun:home [ geolocation=“50.914393,7.196869,100”, interval=60 ]
{
Channels:
Type rangeEvent : set#event [
offset=18
earliest=“18:30”
]
}
earliest does not work.
sihui
(SiHui)
October 28, 2017, 8:33pm
7
I gave up with the manual config files a while ago because I could not get it to work.
GUI config through Paper UI works always as expected
toto
(toto lino)
October 28, 2017, 9:52pm
8
Okay. I Could fix it i forgot the , behind offset=18.
I did not know that it is working through paperUI. How does it work?
sihui
(SiHui)
October 29, 2017, 6:19am
9
PaperUI -> Configuration -> Things -> select your astro thing -> edit the range event:
1 Like