Astro:sun how to test in startup script?

Hey all,
I am new to openhab (using 2.5.10-1).

My setup is pretty simple, a bunch of zwave dimmers and some basic rules to automate lights at a set cron time.

I don’t use paper UI much, I am trying to follow the guidelines to create .items, .sitemap and .rules files. The I understand the basics.

I want to rely on the sunrise/sunset events in astro. But aside from that I want to learn as much as I can so that I get more comfortable with power behind the rules.

So after installing the astro binding, and adding the moon and sun with my geolocation configured I wanted “some proof of life”. I mostly use my rule “System started” to check if something works.

I tried to follow some example code from openhab (https://www.openhab.org/addons/bindings/astro/#astro-binding) and pasted that in my startup script:

rule "Startup"
when
    System started
then
logInfo("Startup", "Sunrise time : {}", Sunrise_Time)

val sunActions = getActions("astro","astro:sun:local")

if(null === sunActions) 
{
    logInfo("actions", "sunActions not found, check thing ID")
    return
}
end

The logInfo doesn’t contain a time, but it indicates something is NULL instead.

Also, the example code from openhab prints that the sunActions are NULL.

After googling a bit, I found a page where it was suggested to reboot openhab due to some known bug. That sounds unlikely. Did it anyway, but of course that doesn’t solve anything either.

who can explain what I am doing wrong?

Logging:

 2020-12-11 18:43:54.932 [INFO ] [lipse.smarthome.model.script.Startup] - System started: Sunrise_Time (Type=DateTimeItem, State=NULL, Label=Sunrise, Category=null)

 2020-12-11 18:43:54.941 [INFO ] [lipse.smarthome.model.script.actions] - sunActions not found, check thing ID

Argh, nevermind. I need to replace “local” with my own thing ID…