Problem with DateTime format and map (transform) in OH2

Problem 1, I can’t get map (transform) to work in openhab2

I use notepad++ on windows to edit the file with “UTF8 without BOM” since I cant get OpenHAB_designer to work with OH2.
I have even tried another text editor (EditPlus) with the same result.
Can anybody give a hint or, even better, a solution to this problem that is driving me nuts.

String Sun_Sign “Tecken: [MAP(]” (gWeather) { channel=“astro:sun:home:zodiac#sign” }


debug output:
2015-10-29 19:31:19 [INFO ] [smarthome.event.ItemStateEvent:43 ] - Sun_Sign updated to SCORPIO

Result in PaperUI:

Problem 2, I can’t set the format for time in PaperUI
DateTime Sun_Rise “Soluppgång [%1$tH:%1$tM]” (gWeather) { channel=“astro:sun:home:rise#start” }

Result in PaperUI:

From what I see it is currently not easy to display a datetime in paperUI

See here an open issue for the same with some background


Has anyone got the MAP-function to work in OH2 with a String?

hi ,

i am not sure if astro binding defines the channel as editable.

i am currently looking for a solution entering a time information on a datetime item.
same issue for me on the datetime item-type.
have you found a way to enter a time in a datetime item?

I would like to enter hh:mm format , not sure if in the item definition of the thingtype such pattern can be set


Never tried it with PaperUI, but you can set the time format either in your sitemap with a label definition or in your items file (in this case you have to unlink the channel bond to your item first via PaperUI).

Example: DateTime Dawn_Time "Morgendämmerung [%1$tH:%1$tM]" <sunrise> { channel="astro:sun:home:civilDawn#start" }

unfortunately not work.

let me try to explain what problem i have.
I am currently developing a binding for the stiebel heatpump in which you have a changeable setting representing hh:mm.

in the thingtype definition i was trying to define a channeltype with item-type Datetime without a good result in the UI for the user.

does anybody knows what is the best solution?
Is it better to work with a string and implement a specific parser in the handleCommand method?
If so how to inform user about wrong entries?

thx peter

That’s a whole different story then :slight_smile: