Astro Items+Sitemap+Map+♈ Binding Example

Can you give us your icons?

I´ve found a really nice source for svg icons:
https://visualpharm.com/free-icons/set/sunset
There are a lot of variants for many topics.

1 Like

Who is this aimed at?

My standard sources are:

Besides it’s always an option to google for “sunrise svg”. In those cases where I can’t find an svg of something, I build myself pseudo-svg from bitmaps :clown_face:

We should create a thread for this topic! @halloween?

Is there a benefit to installing a binding for date/time (then having that binding pull information from an NTP server, and store that data, then pulling information from that binding to display in an item/thing) as opposed to just pulling the current date/time from the system clock?

Never thought about it any further. Adding ntp and the item was one of the first things I ever did in openHAB. Not sure if querying the system clock would be easier though. One related thought: Why would we even want the date time in an item. I’m presenting it but never actually use (read) it.
What’s your thought on this? I could certainly remove the item to improve the simplicity of the Tutorial

I think date time is one of the most used thingsd displayed on a wall panel (and maybe indoor temperature).

If you have a knx sensor with display from gira or something similar, date/time is always displayed. So i think it is good to be in the tutorial.

About the idea with a new thread for svg´s - this would be a good idea, but this would be a very big thread… Better would be to only post links to sites, which offer this for free. Everyone has other aesthetic needs.

1 Like

That’s what I was getting at. Just a thread with a few links.

Additionally I’d like a short tutorial how to create “dynamic icons”, e.g. a default, an on and an off version for one svg (I like to gray out the off version of an icon). You could also show how to convert a bitmap into an svg file.

I’d be happy to help and add chapters but it would be great if you could take the lead!

I wouldn’t remove the item, as I think (IMO) it’s a useful item to have on a panel. I think that I “read” the time on a clock more often than I realize; even just being peripherally aware of where the hands on the clock are or what date is displayed can keep me informed.

As I mentioned in the other thread, and in other places, I’m new to the openHAB universe and so I may ask questions that seem nonsensical. I apologize. To me it seemed like we are adding extra processing tasks to the openHAB server by installing the binding and then having it talk to an outside server to pull data to display, when we already have a system that knows the date and time locally. Hence my question. :slight_smile:

If the NTP binding is the only way to do this, that’s perfectly acceptable to me. However, it never hurts to ask. :slight_smile:

I am probably on the wrong thread but I wil ask anyway.
I am just moved from OH1 to OH2 (with some difficulties !!!) and what was working with OH1 does not with OH2 (I am at 1202 version of 2.3). How to add days to summer start date provided by the astro binding…
Any help would be appraciated

Why did switch to a snapshot build? You should have gone with the latest stable version.

Your question is unclear. What do you mean by add? This could mean many things and all of which are not related to the astro binding but rather just normal tasks solvable by programming. I’d recommend to open a new thread with your existing (relevant) items and rules and a clear description of the desired outcome.

Hi all,

I tried to use an astro.map, but the simbols are not being displayed correctly.
My file is saved with UTF-8 encoding.

I translated the astro.map into Portuguese-Brazil (pt-br).

//
ARIES=♈ Áries
TAURUS=♉ Touro
GEMINI=♊ Gêmeos
CANCER=♋ Câncer
LEO=♌ Leão
VIRGO=♍ Virgem
LIBRA=♎ Libra
SCORPIO=♏ Scorpião
SAGITTARIUS=♐ Sagitário
CAPRICORN=♑ Capricórnio
AQUARIUS=♒ Aquário
PISCES=♓ Peixes

//
SPRING=Primavera
SUMMER=Verão
AUTUMN=Outono
WINTER=Inverno

//
SUN_RISE=Nascer do Sol
ASTRO_DAWN=Amanhecer Astronômico
NAUTIC_DAWN=Amanhecer Náutico
CIVIL_DAWN=Amanhecer Civil
CIVIL_DUSK=Anoitecer Civil
NAUTIC_DUSK=Anoitecer Náutico
ASTRO_DUSK=Anoitecer Astronômico
SUN_SET=Pôr do Sol
DAYLIGHT=Dia
NOON=Meio-Dia
NIGHT=Noite

//
MORNING=Amanhecer
DAY=Dia
AFTERNOON=Tarde
EVENING=Anoitecer
NIGHT=Noite
BED=Hora de Dormir

//
NEW=🌑 Lua Nova
WAXING_CRESCENT=🌑→🌓 Lua Crescente
FIRST_QUARTER=🌓 Quarto Crescente
WAXING_GIBBOUS=🌓→🌕 Crescente Gibosa
FULL=🌕 Lua Cheia
WANING_GIBBOUS=🌕→🌗 Minguante Gibosa
THIRD_QUARTER=🌗 Quarto Minguante
WANING_CRESCENT=🌗→🌑 Lua Minguante

//
NULL=desconhecido ⁉
UNDEF=desconhecido ⁉
-=deconhecido ⁉

1 Like

@ThomDietrich would you be able to comment if there is a nice easy way to keep the Night_State switch up to date? There seems to be a few ways to do it but just wondering what is now the recommended way?

I was having the same issue. I am migrating from OH1 on Win to OH2 on Linux and transform maps do not work.

I made a script in subfolder which includes the original .map files. It converts them to the upper folder in Java friendly format.

LIST=`ls *.map -w 1`
for ITEM in $LIST
do
native2ascii -encoding UTF-8 $ITEM ../$ITEM
cat  ../$ITEM
echo ======================
done

Probably there is a way to specify UTF-8 as default in OpenHab2 and skip this step

@ThomDietrich

Where is the syntax such as “minus90” documented? I have looked in the Astro binding documentation and did not see a reference there.

DateTime    Evening_Time
            "Evening [%1$tH:%1$tM]"                                    (Astro)
            {channel="astro:sun:minus90:set#start"}

I’m looking to define my Evening time differently and wanted to know what syntax options there are.

Thanks.

Mike

The minus90 part here is not a syntax as such. It’s just a name for that particular Thing so that Item definition knows where to fetch the data channel from. Other valid names could be astro.sun.myHouse or astro.sun.siberia.
The magic happens in setting the geo location of the Thing(s). Offsets can be applied to the Thing’s channels definitions, which is what I think you are looking for?

@rossko57 Thanks! I missed the nuance of creating my own Astro Things… I just got started (Captain Obvious!) and had assumed only the PaperUI Things were available for use in Items and Rules. I did not realize that the Channels documentation could actually be used to define Things as well.

@ThomDietrich,

In your original post you define EveningTime using the minus90 Thing. @rossko57 just enlightened me to what the minus90 actually is. The Things definition in your post does not include minus90. I’m chasing my tail on the right Thing definition syntax. Would you mind posting that?

Thanks!

Mike

@ThomDietrich @rossko57 - I still have not successfully defined “minus90” as used for EveningTime in the original post. Can you enlighten? THanks.

astro:sun:rhubarb [ geolocation="52.5200066,13.4049540,100", interval=60 ] {
    Channels:
        Type rangeEvent : set#event [
            offset=-90
        ]
}
DateTime Early_dusk   "Sunset -90m  [%1$tH:%1$tM]" { channel="astro:sun:rhubarb:set#start" }

Untested, as per

1 Like

for a beginner with OH2, this tutorial is PERFECT. I was wondering if there is way to add constants as a item label though. I would like to use the constants just like the astro.map e.g.:

SUN_RISE=Sonnenaufgang

as

DateTime    Sunrise_Time         "Sunrise [%1$tH:%1$tM]"     <SUN_RISE>    (Astro) {channel="astro:sun:home:rise#end"}

instead of

DateTime    Sunrise_Time         "Sonnenaufgang[%1$tH:%1$tM]"       (Astro) {channel="astro:sun:home:rise#end"}

is there a way to do so?
Not sure if you mentoined it before, sorry I didn’t get it