Astro problems

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 ]


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")

Wow… in The rule i wrote “set” and Not “rise”.might be the mistake

That’s what would have said , although I would switch a ligth on with Sunset :wink:

The problem is … that it is still not working :frowning:

rule "hue light on"
when
    Channel 'astro:sun:home:rise#event' triggered START
then
sendCommand(Ankleidezimmer, ON)
logInfo("astro channel triggered")
end

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.

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 :grinning:

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?

PaperUI -> Configuration -> Things -> select your astro thing -> edit the range event:

1

1 Like