Hi,
as @rlkoshak explained, you have to define the several usage-forms. Here an example of my setup, with normal usings and with offset:
// Astro - Binding Geo-Position geolocation="xx.xxxxxx,y.yyyyy,zzz"
Thing astro:sun:local "Sonnen Daten" [geolocation="xx.xxxxxx,y.yyyyyyy,zzz", interval=300]
Thing astro:moon:local "Mond Daten" [geolocation="xx.xxxxxx,y.yyyyyyy,zzz", interval=300]
Thing astro:sun:stowing "Offset -180" [geolocation="xx.xxxxxx,y.yyyyyyy,zzz", interval=300]{
Channels:
Type rangeEvent : set#event [
offset=-180,
earliest="19:40"
]
}
and a complete Rule-Set:
/*===============================================================================
| Begin Astro Rules |
=================================================================================*/
//===============================================================================
//*
rule "Moonrise Start"
when
Channel 'astro:moon:local:rise#event' triggered START
then
logInfo("astro-rules" + '_01'," Der Mond geht auf. START ")
//Sonoff_Basic_03.sendCommand(ON)
end
//===============================================================================
rule "Moonset Ende"
when
Channel 'astro:moon:local:set#event' triggered END
then
logInfo("astro-rules" + '_02'," Der Mond geht unter. END")
//Sonoff_Basic_03.sendCommand(ON)
end
//===============================================================================
rule "Sunset_180 Start"
when
Channel 'astro:sun:stowing:set#event' triggered START
then
logInfo("astro-rules" + '_03', " Sunset_180 Start. START")
//EG_EG_Kind2_Licht.sendCommand(ON)
end
//===============================================================================
rule "Sunset_180 Ende"
when
Channel 'astro:sun:stowing:set#event' triggered END
then
logInfo("astro-rules" + '_04', " Sunset_180 Ende. END")
//EG_EG_Kind2_Licht.sendCommand(ON)
end
//===============================================================================
rule "Sunrise Start"
when
Channel 'astro:sun:local:rise#event' triggered START
then
logInfo("astro-rules" + '_05', " Sunrise START ")
//EG_EG_Kind2_Licht.sendCommand(ON)
end
//===============================================================================
rule "Mittag Start"
when
Channel 'astro:sun:local:noon#event' triggered START
then
logInfo("astro-rules" + '_06', " Mittag - noon. START")
//Sonoff_Basic_03.sendCommand(ON)
end
//===============================================================================
rule "Civil Dusk Start"
when
Channel 'astro:sun:local:civilDusk#event' triggered START
then
logInfo("astro-rules" + '_07', " Civil Dusk START")
//EG_EG_Kind2_Licht.sendCommand(ON)
end
//===============================================================================
rule "Civil Dusk Ende"
when
Channel 'astro:sun:local:civilDusk#event' triggered END
then
logInfo("astro-rules" + '_08'," Civil Dusk END")
//Sonoff_Basic_03.sendCommand(ON)
end
//===============================================================================
rule "Nautik Dusk Start"
when
Channel 'astro:sun:local:nauticDusk#event' triggered START
then
logInfo("astro-rules" + '_09'," Nautik Dusk Start. START")
//Sonoff_Basic_03.sendCommand(ON)
end
//===============================================================================
rule "Nautik Dusk Ende"
when
Channel 'astro:sun:local:nauticDusk#event' triggered END
then
logInfo("astro-rules" + '_10'," Nautik Dusk Ende. END")
//Sonoff_Basic_03.sendCommand(ON)
end
//===============================================================================
rule "Morning Night Start"
when
Channel 'astro:sun:local:morningNight#event' triggered START
then
logInfo("astro-rules" + '_11'," Morning Night Start. START")
//Sonoff_Basic_03.sendCommand(ON)
end
//===============================================================================
rule "Morning Night Ende"
when
Channel 'astro:sun:local:morningNight#event' triggered END
then
logInfo("astro-rules" + '_12'," MorningNight END")
//EG_EG_Kind2_Licht.sendCommand(ON)
end
//===============================================================================
rule "Sunset Start"
when
Channel 'astro:sun:local:set#event' triggered START
then
logInfo("astro-rules" + '_13'," Sunset Start. START")
//Sonoff_Basic_03.sendCommand(ON)
end
//===============================================================================
rule "Sunset Ende"
when
Channel 'astro:sun:local:set#event' triggered END
then
logInfo("astro-rules" + '_14'," Sunset Ende. END")
//Sonoff_Basic_03.sendCommand(ON)
end
//===============================================================================
rule "Tagesphase"
when
Item Day_Phase changed
then
logInfo("astro-rules" + '_30'," Tagesphase " + Day_Phase)
//logInfo("astro-rules" + '_30',"Tagesphase " + Day_Phase)
//Sonoff_Basic_03.sendCommand(ON)
end
//*/
/*===============================================================================
| End Astro Rules |
=================================================================================*/
Have fun with testing, and you don’t need to define extra items for, just use it with your normal items, as in my Rule-Examples