Astro-Binding Items - not initialized -

Hi,
i use Openhab1 and the Astro-Binding. With this binding i can see some astro related things on my sitemap.

Date of next fullmoon, seasons, sunrise and so on.

I often get displayed “-not initialized-” on some of this items. This problem only occurs on the astro items. All other items work.

azimuth and elevation is always showing right, but rest of the items sometimes completly get the status “not initialised”.

What is going wrong here? Which events of openhab cause this items to lose the state?

Right now i get this on my sitemap:

did you change the *.items file bevor theese “errors” occure? I have the behavior that, when the astro calculate job is recreated, the items loose their state sometimes

This may be. But all astro items are in a separate items-file and this wasn´t changed since long time.

I only changed another items file.

Can you provide your astro items, please?

I’ve the same issue since… don’t know. For weeks/months. But I didn’t change anything - didn’t noticed any change :smiley:

Group		Astro		<sun>		(All)

// displays the start of the sunrise
DateTime	Sonnenaufgang_Start		"Sonnenaufgang [%1$tH:%1$tM]"						<sun>			(Astro)		{ astro="planet=sun, type=rise, property=start" }
// displays the end of the sunset
DateTime	Sonnenuntergang_End	"Sonnenuntergang [%1$tH:%1$tM]"						<sun>			(Astro)		{ astro="planet=sun, type=set, property=end" }
// displays the start and end of the civil dawn
DateTime	Civil_Dawn_Start		"bürgerliche Morgendämmerung Beginn [%1$tH:%1$tM]"	<sun>			(Astro)		{ astro="planet=sun, type=civilDawn, property=start" }
DateTime	Civil_Dawn_End			"bürgerliche Morgendämmerung Ende [%1$tH:%1$tM]"	<sun>			(Astro)		{ astro="planet=sun, type=civilDawn, property=end" }
// displays the start and end of the civil dusk
DateTime	Civil_Dusk_Start		"bürgerliche Abenddämmerung Beginn [%1$tH:%1$tM]"	<sun>			(Astro)		{ astro="planet=sun, type=civilDusk, property=start" }
DateTime	Civil_Dusk_End			"bürgerliche Abenddämmerung Ende [%1$tH:%1$tM]"		<sun>			(Astro)		{ astro="planet=sun, type=civilDusk, property=end" }
// Mond, Jahreszeiten, usw
String		Sternzeichen			"Sternzeichen [MAP(Tierkreiszeichen.map):%s]"		<colorwheel>	(Astro)		{ astro="planet=sun, type=zodiac, property=sign" }
String		Jahreszeit				"Jahreszeit [MAP(Jahreszeit.map):%s]"				<sun_clouds>	(Astro)		{ astro="planet=sun, type=season, property=name" }
String		Mondphase				"Mondphase [MAP(Mond.map):%s]"						<moon>			(Astro)		{ astro="planet=moon, type=phase, property=name" }
String		Vollmond				"nächster Vollmond [%1$td.%1$tm.%1$tY]"				<moon>			(Astro)		{ astro="planet=moon, type=phase, property=full" }
String		Neumond					"nächster Neumond [%1$td.%1$tm.%1$tY]"				<moon>			(Astro)		{ astro="planet=moon, type=phase, property=new" }
// Azimuth und Elevation
Number  	Azimuth        "Azimuth [%.2f]"     <sun>	{astro="planet=sun, type=position, property=azimuth"}
Number   	Elevation      "Elevation [%.2f]"   <sun>	{astro="planet=sun, type=position, property=elevation"}
//
// virtuelle Schalter für "Rollos auf" mit Astro, aber nicht vor xx Uhr
Group gPersist
Switch SunriseLimit "virtueller Sonnenaufgang - Rollos hoch frühestens um xx Uhr" (gPersist)
Switch Rollos_is_day "virtueller Schalter Tag für Rollosteuerung" (gPersist)
// Setzt den Switch zur Zeit auf ON, gefolgt von OFF
//
// Rollos hoch
Switch		Rollos_astro_up								{ astro="planet=sun, type=rise, property=start, offset=-10" }
// Rollos runter
Switch		Rollos_astro_down							{ astro="planet=sun, type=civilDusk, property=end, offset=-5" }
// Rollos zentral hoch
Switch		Rollos_all_up	"Rollos zentral hoch"	<rollershutter-0>
// Rollos tentral runter
Switch		Rollos_all_down	"Rollos zentral runter"	<rollershutter-100>
// Zeit für Rollos up down
DateTime	Rollos_up_time			"Rollos hoch aber nicht vor 6:45 Uhr [%1$tH:%1$tM]"	<sun>			(Astro)		{ astro="planet=sun, type=rise, property=start, offset=-10" }
DateTime	Rollos_down_time		"Rollos runter [%1$tH:%1$tM]"						<sun>			(Astro)		{ astro="planet=sun, type=civilDusk, property=end, offset=-5" }
// Licht zentral aus
Switch		Licht_zentral_aus	"Licht zentral aus"

Sometimes the sitemap is like the screenshot above, sometimes only items i can see is azimuth and elevation. This two items seems to word correctly all the time - including changing the values every few minutes. But all other items sometimes get uninitialised. After restart of openhab, all is showing correctly again.

When you change one Items file, all Items get reset regardless of which files they are in. This is because it is the only way to support creation and use of one Group that can be used across multiple files.

However, when you change these files you should see in the log a line from Astro saying it has rescheduled the calculation for midnight. If you don’t see this there might be an error somewhere.

I’m not sure what is going on but a simple fix would be to add your astro Items to a MapDB with restoreOnStartup. Alternatively, you can touch the astro binding jar file which will cause OH to relaod and restart it; it is a kind of soft restart without needing to restart all of OH.

I installed MapDB. Now all lights, Astro-Items and some more are stored inside MapDB and empty/uninitialised states are gone.

It´s working!

Thanks!