Astro Items+Sitemap+Map+♈ Binding Example

Hey @dikahab,

you are totally right. My Sitemap is showing AQUARIUS just fine:

Please check your date, geolocation and transformation. You didn’t give much info to work with.
Another thing you can do to track down the problem is look at the log files for updates and errors. As you said you are new to openHAB(ian), here is what you might want to do (Zodiac is the item name I’m using, which is by all means not a good choice btw :slight_smile:):

[15:23:18] pi@openHABianPi:~$ grep "Zodiac" /var/log/openhab2/*
/var/log/openhab2/events.log.2:2017-01-19 02:13:59.494 [temChannelLinkRemovedEvent] - Link 'Zodiac => astro:sun:home:zodiac#sign' has been removed.
/var/log/openhab2/events.log.2:2017-01-19 02:14:00.486 [ItemRemovedEvent          ] - Item 'Zodiac' has been removed.
/var/log/openhab2/events.log.2:2017-01-19 02:26:54.498 [ItemChannelLinkAddedEvent ] - Link 'Zodiac-astro:sun:home:zodiac#sign' has been added.
/var/log/openhab2/events.log.2:2017-01-19 02:29:51.522 [ItemStateChangedEvent     ] - Zodiac changed from NULL to CAPRICORN
/var/log/openhab2/events.log.2:2017-01-20 00:00:00.212 [ItemStateChangedEvent     ] - Zodiac changed from CAPRICORN to AQUARIUS

Side note: Looking at your sceenshot, I might want to upload my icons here…

well, I made a mistake as assumed: I tried { channel=“astro:moon:home:zodiac#sign” }, but obviously { channel=“astro:sun:home:zodiac#sign” } is the right syntax!
I know to less about the signs of zodiac (if based on ‘sun’ or ‘moon’…) Sorry for my inconvenience!

So, finally I’m happy and will go straigth forward with this marvelous project! I’m sure, it wasn’t the last time to request guidance. And I learned to provide code, etc. while asking for help - nobody knows the crystal ball :wink: Many thanks!

No problem! I didn’t even know there is a moon zodiac. Smarter every day. http://www.lunarium.co.uk/moonsign/calculator.jsp

Glad you got it fixed. Check out the rest of the first posting. you will find a few sitemap visibility decisions you might want.

Could you upload your map file somewhere? I tried copy&paste but the moon icons are missing from the sitemap :frowning:

@ThomDietrich
I am working in the Astro binding with this example from you. Unfortunately i get errors on the astro.map file.
I think it is because of the icons in the file.
I tried to copy and past the contents of the astro.map direct from the webpage, and i also tried it with an other editor (Sc228.exe). Then i see some Java code included. But the icons remain question marks.

<code class="lang-java hljs"><span class="hljs-comment">//</span>
ARIES=? Ram
TAURUS=? Stier
GEMINI=? Tweeling
CANCER=? Kreeft
LEO=? Leeuw
VIRGO=? Maagd
LIBRA=? Weegschaal
SCORPIO=? Schorpioen
SAGITTARIUS=? Boogschutter
CAPRICORN=? Steenbok
AQUARIUS=? Waterman
PISCES=? Vissen

<span class="hljs-comment">//</span>
SPRING=Voorjaat
SUMMER=Zomer
AUTUMN=Herfst
WINTER=Winter

<span class="hljs-comment">//</span>
NEW=?? Nieuwe maand
WAXING_CRESCENT=????? wassende Halve maan
FIRST_QUARTER=?? eerste Kwartier
WAXING_GIBBOUS=????? wassende maan
FULL=?? Volle maan
WANING_GIBBOUS=????? abnehmender Mond
THIRD_QUARTER=?? laatste Kwartier
WANING_CRESCENT=????? afnemende Halve maan

<span class="hljs-comment">//</span>
NULL=unbekannt ?</code>

Can you advice me how to get the astro.map file correctly?

Hey @deltabert and @hakan,
I did not expect this to be a problem. The icons are Unicode symbols. Hence your files need to be in UTF8 encoding. Yours are probably ANSI.

Download: astro.map

If you want to solve this problem yourself, you can use the excellent Notepad++ editor on Windows to check and change the encoding.

2 Likes

Actually, my files are UTF-8, I created them with Emacs on Linux.

What I have discovered in the meantime is, the icons are shown nicely on the Android App, on the 3House App and the Paper UI. It’s just the Basic UI which fails to show the icons.

I will investigate this further and maybe open an issue on github,

I didn’t get that. As you can see in the screen above it’s working just fine with Basic UI

Sorry, I was not fully clear on my message. The “AQUARIUS” icons are nice on my display too, but the “Mondphase” ones are broken. They show correctly on the Android App and Paper UI though. I have just verified with the “file” commando that all my files are correctly encoded as “UTF-8 Unicode text”.

If you look at your screenshots, you will notice that they show four <?> characters right next to “Mondphase” as well. Interestingly, your astro.map file displays them correctly.

Aaaah! That’s not a problem with the files. The font used by Basic UI just doesn’t support them :smiley: Only very few modern fonts seem to…

Btw. it says so in the first paragraph of my initial posting :see_no_evil:

Just an idea: We could work around that by providing a corresponding icon on the left rather than in the value text… https://www.google.de/search?q=moon+phases+icons Wdyt?

Now that you point me to it, it is obvious. Yet another case of seeing only what I was looking for, but not the full text you have written :blush:

Would be nice as an experiment. Could you also add a pointer to where you got the “Moon” and Zodiac icons from? I only have broken images for those on my sitemap :smile:

Why experiment? :slight_smile: We could just add dynamic icons to all Astro elements.
The problem is that I’m not sure where I got (or potentially stole) the icons from. So I’m a bit careful to post them publicly. But Hey, why don’t you check the URL of the map file I’ve posted above, maybe you’ll be lucky ;D

Aaaaah, nice :smile:

1 Like

So, which moon phases icons do we want to use?

So, how about the ones below? They seem to be free as in free-to-use, and do not look overly busy on mobile displays.

2 Likes

Did you by any chance already implement these? I didn’t have the time yet.

Sorry, no. Also about 150% swamped by work :sweat:

Hi !!
As @ThomDietrich asked me, here is my astro.map translated to spanish.
I’ll try to add the icons as soon as possible.

//
ARIES=♈ Aries (21 marzo - 20 abril)
TAURUS=♉ Tauro (21 abril - 21 mayo)
GEMINI=♊ Geminis (22 mayo - 21 junio)
CANCER=♋ Cáncer (22 junio - 22 julio)
LEO=♌ Leo (23 julio - 22 agosto)
VIRGO=♍ Virgo (23 agosto - 22 septiembre)
LIBRA=♎ Libra (23 septiembre - 22 octubre)
SCORPIO=♏ Escorpio (23 octubre - 22 noviembre)
SAGITTARIUS=♐ Sagitario (23 noviembre - 20 diciembre)
CAPRICORN=♑ Capricornio (21 diciembre - 19 enero)
AQUARIUS=♒ Acuario (20 enero - 18 febrero)
PISCES=♓ Piscis (19 febrero - 20 marzo)

//
SPRING=Primavera
SUMMER=Verano
AUTUMN=Otoño
WINTER=Invierno

//
SUN_RISE=Salida solar
ASTRO_DAWN=Amanecer astronómico
NAUTIC_DAWN=Amanecer náutico
CIVIL_DAWN=Amanecer civil
CIVIL_DUSK=Puesta civil
NAUTIC_DUSK=Puesta náutica
ASTRO_DUSK=Puesta astronómica
SUN_SET=Puesta solar
DAYLIGHT=Día
NOON=Tarde
NIGHT=Noche

//
MORNING=Mañana
DAY=Día
AFTERNOON=Tarde
EVENING=Tarde-Noche
NIGHT=Noche
BED=Sueño

//
NEW=🌑 Luna Nueva
WAXING_CRESCENT=🌑→🌓 Nueva Creciente
FIRST_QUARTER=🌓 Cuarto Creciente
WAXING_GIBBOUS=🌓→🌕 Gibosa Creciente
FULL=🌕 Luna Llena
WANING_GIBBOUS=🌕→🌗 Gibosa Menguante
THIRD_QUARTER=🌗 Cuarto menguante
WANING_CRESCENT=🌗→🌑 Menguante

//
NULL=Error de Inicio ⁉
-=Error de inicio ⁉
2 Likes

Just for those interested, the astromap in Dutch

//
ARIES=♈ Ram
TAURUS=♉ Stier
GEMINI=♊ Tweeling
CANCER=♋ Kreeft
LEO=♌ Leeuw
VIRGO=♍ Maagd
LIBRA=♎ Weegschaal
SCORPIO=♏ Schorpioen
SAGITTARIUS=♐ Boogschutter
CAPRICORN=♑ Steenbok
AQUARIUS=♒ Waterman
PISCES=♓ Vissen

//
SPRING=Lente
SUMMER=Zomer
AUTUMN=Herfst
WINTER=Winter

//
SUN_RISE=Zonsopkomst
ASTRO_DAWN=Astronomische morgenschemering
NAUTIC_DAWN=Nautische morgenschemering
CIVIL_DAWN=Burgerlijke morgenschemering
CIVIL_DUSK=Burgerlijke avondschemering
NAUTIC_DUSK=Nautische avondschemering
ASTRO_DUSK=Astronomische avondschemering
SUN_SET=Zonsondergang
DAYLIGHT=Dag
NOON=Middag
NIGHT=Nacht

//
NEW=🌑 Nieuwe maan
WAXING_CRESCENT=🌑→🌓 wassende halve maan
FIRST_QUARTER=🌓 eerste kwartier
WAXING_GIBBOUS=🌓→🌕 wassende maan
FULL=🌕 Volle maan
WANING_GIBBOUS=🌕→🌗 afnemende maan
THIRD_QUARTER=🌗 laatse kwartier
WANING_CRESCENT=🌗→🌑 afnemende halve maan

//
NULL=onbekend ⁉
-=onbekend ⁉
3 Likes

While I am at it, lets do the Norwegian (Bokmal) version as well.
One could argue about the difference between Skumring and Tussmørke

//
ARIES=♈ Væren
TAURUS=♉ Tyren
GEMINI=♊ Tvillingene
CANCER=♋ Krepsen
LEO=♌ Løven
VIRGO=♍ Jomfruen
LIBRA=♎ Vekten
SCORPIO=♏ Skorpionen
SAGITTARIUS=♐ Skytten
CAPRICORN=♑ Steinbukken
AQUARIUS=♒ Vannmannen
PISCES=♓ Fiskene

//
SPRING=Foråret 
SUMMER=Sommer
AUTUMN=Høst
WINTER=Vinter

//
SUN_RISE=Soloppgang
ASTRO_DAWN=Astronomische tussmørke
NAUTIC_DAWN=Nautisk tussmørke
CIVIL_DAWN=Borgerlig tussmørke
CIVIL_DUSK=Borgerlig skumring
NAUTIC_DUSK=Nautisk skumring
ASTRO_DUSK=Astronomisk skumring
SUN_SET=Solnedgang
DAYLIGHT=Dagslys
NOON=Middagstid
NIGHT=Natt

//
NEW=🌑 Nymåne
WAXING_CRESCENT=🌑→🌓 Voksende halvmåne
FIRST_QUARTER=🌓 Første kvarter
WAXING_GIBBOUS=🌓→🌕 Økende måne
FULL=🌕 Fullmåne
WANING_GIBBOUS=🌕→🌗 Synkende måne
THIRD_QUARTER=🌗 Siste kvarter
WANING_CRESCENT=🌗→🌑 Synkende halvmåne
//
NULL=ukjent ⁉
-=ukjent ⁉
1 Like