MAP File Help

hello again, my day question is…MAP FILE!
i’m trying to translate an output that come in english to a italian value…
i’m talking about the battery status for icloud binding: i get from binding the value “Not charging” and i want to translate it using MAP file, but i don’t know how to setup.
i’ve tried to create a MAP file (icloud.map) in this way:

Not\ charging="Non in carica"

but doesn’t work.
of course in my item file i’ve added:

String IPadBatteryStatus "Stato Batteria [[MAP(icloud.map):%s]" <batteriacarica> (iCloudGroup) {channel="icloud:device:myaccount:IPad:batteryStatus"}

but i cannot show the italian version in my sitemap. my result are nothing displayed or strange symbols.

can anyone help me to learn also how to create MAP files?
after this, i will apply the solution to translate also “day information” in Astro file :wink:

thanks!

"Stato Batteria [MAP(icloud.map):%s]"
Not\ charging=Non in carica

i though you will be the first to reply :wink:
yes sorry, the double [[ was a typo…
the way you tell me, doesn’t work…nothing displayed in sitemap for the status Not charging :frowning:

Is the Map Transformation installed?

yep

Typ [%s] to see what will be displayed.

Post the sitemap-line please.

sitemap icloud label="iCloud" {
//    Frame item=iCloudGroup {
      Frame label="iPhone" {
        Text item=IPhone6BatteryStatus label="Stato Batteria" icon="batteriacarica"
        Text item=IPhone6BatteryLevel label="Livello Batteria" icon="batteria"
        Text item=IPhone6_Home
        Text item=IPhone6LocationAccuracy label="Precisone coordinate" icon="precisione"
        Text item=IPhone6LocationLastUpdate label="Ultimo aggiornamento" icon="orologio"
        Switch item=IPhone6FindMyPhone mappings=[ ON="Trova!" ] label="Trova il mio iPhone" icon="trova"
        Switch item=IPhone6Refresh mappings=[ REFRESH='Aggiorna' ] icon="aggiornamento"
        // mapview for web UI, invisible in iOS client
        Mapview item=IPhone6Location height=10 label="Mappa" icon="mappa"
    }
}

add to sitemap

Text item=IPadBatteryStatus

it’s already there, i’ve not posted the entire sitemap file.

here you are:

sitemap icloud label="iCloud" {
//    Frame item=iCloudGroup {
      Frame label="iPhone" {
        Text item=IPhone6BatteryStatus label="Stato Batteria" icon="batteriacarica"
        Text item=IPhone6BatteryLevel label="Livello Batteria" icon="batteria"
        Text item=IPhone6_Home
        Text item=IPhone6LocationAccuracy label="Precisone coordinate" icon="precisione"
        Text item=IPhone6LocationLastUpdate label="Ultimo aggiornamento" icon="orologio"
        Switch item=IPhone6FindMyPhone mappings=[ ON="Trova!" ] label="Trova il mio iPhone" icon="trova"
        Switch item=IPhone6Refresh mappings=[ REFRESH='Aggiorna' ] icon="aggiornamento"
        // mapview for web UI, invisible in iOS client
        Mapview item=IPhone6Location height=10 label="Mappa" icon="mappa"
    }

          Frame label="Apple Watch" {
        Text item=AppleWatchBatteryStatus label="Stato Batteria" icon="batteriacarica"
        Text item=AppleWatchBatteryLevel label="Livello Batteria" icon="batteria"
        Text item=AppleWatch_Home
        Text item=AppleWatchLocationAccuracy label="Precisone coordinate" icon="precisione"
        Text item=AppleWatchLocationLastUpdate label="Ultimo aggiornamento" icon="orologio"
        Switch item=AppleWatchFindMyPhone mappings=[ ON="Trova!" ] label="Trova il mio iPhone" icon="trova"
        Switch item=AppleWatchRefresh mappings=[ REFRESH='Aggiorna' ] icon="aggiornamento"
        // mapview for web UI, invisible in iOS client
        Mapview item=AppleWatchLocation height=10 label="Mappa" icon="mappa"
    }

          Frame label="iPad" {
        Text item=IPadBatteryStatus label="Stato Batteria" icon="batteriacarica"
        Text item=IPadBatteryLevel label="Livello Batteria" icon="batteria"
        Text item=IPad_Home
        Text item=IPadLocationAccuracy label="Precisone coordinate" icon="precisione"
        Text item=IPadLocationLastUpdate label="Ultimo aggiornamento" icon="orologio"
        Switch item=IPadFindMyPhone mappings=[ ON="Trova!" ] label="Trova il mio iPad" icon="trova"
        Switch item=IPadRefresh mappings=[ REFRESH='Aggiorna' ] icon="aggiornamento"
        // mapview for web UI, invisible in iOS client
        Mapview item=IPadLocation height=10 label="Mappa" icon="mappa"
    }

}

Then remove the label-definition for this line in the sitemap.

same. nothing is shown in sitemap :frowning:

ps i’m sure the transformation map works, because it works for bticino binding…

It works

    Text     item=IPadBatteryStatus label="BS[%s]"
    Text     item=IPadBatteryStatus

hc_306

for me doesn’t. i post you the ipad section for sitemap and items and map files.

icloud.map

Not\ charging=Non in carica
//Charging=In carica

icloud.sitemap

	  Frame label="iPad" {
        Text item=IPadBatteryStatus icon="batteriacarica"
        Text item=IPadBatteryLevel label="Livello Batteria" icon="batteria"
        Text item=IPad_Home
        Text item=IPadLocationAccuracy label="Precisone coordinate" icon="precisione"
        Text item=IPadLocationLastUpdate label="Ultimo aggiornamento" icon="orologio"
        Switch item=IPadFindMyPhone mappings=[ ON="Trova!" ] label="Trova il mio iPad" icon="trova"
        Switch item=IPadRefresh mappings=[ REFRESH='Aggiorna' ] icon="aggiornamento"
        // mapview for web UI, invisible in iOS client
        Mapview item=IPadLocation height=10 label="Mappa" icon="mappa"
    }

icloud.item

String IPadBatteryStatus "Stato Batteria [MAP(icloud.map):%s]" <batteriacarica> (iCloudGroup) {channel="icloud:device:myaccount:IPad:batteryStatus"}

also tried to restart service and reboot rpi…nothing shown.

Add both lines to the sitemap and post a screenshot.
Post the log please.
What version do you use?

i use openhab 2.3.0

can you tell me where can i find the log files?

OK, to see if transformation is running please add item

Contact testC "testC[MAP(de.map):%s]"

rule

rule "System started"
when
  System started
then
  testC.postUpdate(OPEN)
end

sitemap

Default  item=testC label="tC[%s]"
Default  item=testC

Than you should see
hc_307

On which platform OH runs?
you can use frontail
http://openhabianpi:9001/
or localhost:9001
or :9001

back to you. i’ve tried your conf into another installation (vmware vm with raspberry pi desktop)
and the problem is the same:

but, as my home system, the map files work correctly, because i have astro binding installed, with map files translated in italian, as you can see in the screenshot. following also the code of map file for astro binding:

Cattura

//
ARIES=♈ Ariete (21 marzo - 20 aprile)
TAURUS=♉ Toro (21 aprile - 21 maggio)
GEMINI=♊ Gemelli (22 maggio - 21 giugno)
CANCER=♋ Cancro (22 giugno - 22 luglio)
LEO=♌ Leone (23 luglio - 22 agosto)
VIRGO=♍ Vergine (23 agosto - 22 settembre)
LIBRA=♎ Bilancia (23 settembre - 22 ottobre)
SCORPIO=♏ Scorpione (23 ottobre - 22 novembre)
SAGITTARIUS=♐ Sagittario (23 novembre - 20 dicembre)
CAPRICORN=♑ Capricorno (21 dicembre - 19 gennaio)
AQUARIUS=♒ Acquario (20 gennaio - 18 febbraio)
PISCES=♓ Pesci (19 febbraio - 20 marzo)
//
SPRING=Primavera
SUMMER=Estate
AUTUMN=Autunno
WINTER=Inverno

//
SUN_RISE=Alba
ASTRO_DAWN=Tramonto astronomico
NAUTIC_DAWN=Traonto nautico
CIVIL_DAWN=Tramonto civile
CIVIL_DUSK=Crepuscolo civile
NAUTIC_DUSK=Crepuscolo nautico
ASTRO_DUSK=Crepuscolo astronomico
SUN_SET=Tramonto
DAYLIGHT=Mattina
NOON=Mezzogiorno
NIGHT=Notte

so i can suppose the problem could be somewhere else…

OK, than to the map-file.
The name is icloud.map in the folder transform?
Is only this one line in the file?
How do you create the file? Is the authorisation ok? What editor do you use? Is the file-encoding correct?