[SOLVED] Auto-Uninstall Bindings - WHY?


(N. Jordan) #21

Hi Rich,
what i mean is the value formatting…so its written directly to the label without any “” but with brackets []…
Like … Temperature [%.1f]

Still my issue is that i created an item with a certain name (not the label) via PaperUI. Now I use this item-name directly in the sitemap but no value shows up (it was datetime item) in classicUI. Label+Icon are shown.

Looks like this in the sitemap:
Text item=LocalTime_DateTime icon=“calendar”

However in PaperUI Control i can see the item with date/time updated frequently.

What can I have done wrong? Any ideas very welcome.


(Rich Koshak) #22

What specifically did you set the label to in PaperUI?

What happens when you set the label in the sitemap using the exact same label?


(N. Jordan) #23

Hi Rich,
not sure if i get what you mean. I should set manualle in sitemap the same LABEL as is set in PaperUI?
Not an expert, but my idea of the label is simply a text that has no real link to anything - but i did it also via label= in the Sitemap, and nothing changed…so still the label + right icon but completely empty on the right side…so no date/time.

In the sitemap there is “text” for the item of type date/time - but i’ve seen an example in the docs that did the same. So guess this is OK.

In addition, if for example I change the label in the GUI also the ClassicUI will show it updated immediately. So, somehow its updated and linked to the GUI-item, but for whatever reason it will not show date/time.

As said before, the item on the other hand seems also to work correct as in PaperUI Control you can see date/time for this item.

Very strange, so my only guess is that something in the sitemap is not set correctly…type,…?
What I tried, there is a second type for the GUI item of type STRING, did this as well, nothing changed…

Regards
Norbert


(Mark Herwege) #24

@norbert_jordan, I have a date item defined in PaperUI as follows:

Label: [%1$td/%1$tm/%1$tY %1$tR]
Category: calendar
Type: DateTime

My sitemap has:

Text item=Datum

I got to see the calendar icon on the left with date and time on the right in Basic UI.


(N. Jordan) #25

First…it was correct that in PaperUI you have the category field to add the icon you want to have…works great. Thanks!

I now did try a second item…System Info CPU Load. Did nothing different and simply worked in the sitemap, so its updated as before with OH1.9.

In terms of Date, Mark, i have literally the same setup as you do have…just to be clear, I’m using NTP2 binding already. But this should be fine I guess as in a similar way i have a setup for SystemInfo. Especially strange as it updates and shows the correct time/date in the UIcontrol. will have to digg more. Also strange as the logs do not show any warning regarding this item…


(Rich Koshak) #26

What specifically did you set the label to in PaperUI?

Please post your label. It is a lot easier to help with the actual code you are having problems with then with 1000 words description.

Yes. I want to see if the problem is PaperUI or with the label itself.

To be clear, it is truly empty, not just set to ‘-’ which means uninitialized.

Post a screenshot of your Item definition so we can see how your Item is linked to the channel on the Thing and see your exact label.

I’m expecting that either the label has a syntax problem or the Thing’s channel is not properly linked to the Item.

The Item or the Thing? Because you cannot see the state of an Item in PaperUI nor can you see Items in the Control section of PaperUI. You can only see Things there. The distinction is very important. So if you are seeing the correct Date and Time on the Thing in PaperUI but not seeing it correctly in ClassicUI the problem is with the Item, like I said above.


(N. Jordan) #27

Rich, thanks for your support - again and again. really hope to get this fixed.

What i do not get is that Control only shows Things. In my case it presents all “items” that i have created via PaperUI. Of course they are encapsulated in a Thing-Container. But I only see items which I have created myself.

Yes, its EMPTY…so not uninitialized like “-”

Here is the item definition:

Here is how it looks like in sitemap:
Text item=LocalTime_Date label=“Date and Time” icon=“calendar”

And this is the result in ClassicUI.
image

Thanks for checking.


(Mark Herwege) #28

Your label needs a formatting string in square brackets after your label ‘Date and time’. If not, nothing is shown to the right. See my example above.


(Rich Koshak) #29

OK, so when you said

i have literally the same setup as you do have…

you were not correct. If you had literally the same setup your Label field for the Items would read “[%1$td/%1$tm/%1$tY %1$tR]” not “Date and Time”.

Please read the parts of the docs that I liked to in post 18. I see you never bothered to click through and read them (those click through counts are handy).

I don’t post links to the docs and other articles because it’s fun.


(N. Jordan) #30

Hi, thanks for the fast replies.

To my defence - i tried now many variant - and what i posted was the last most simple one.
You are correct that now by only putting the formatting in the label with [] it works…

What I only do not get - at least here for NTP-binding a label without formatting does not show anything. This is different from other items where it is not required to add specific formatting rules…

Finally, thanks a lot, especially to Rich & Mark


(Rich Koshak) #31

All I can say is I would have to see how you defined these other Items because:

  • labels are processed and shown or not shown completely independently from the binding

  • the correct behavior is the same as it was in OH 1.x, if you don’t have the square brackets part of the lable the state is not shown, meaning that this NTP item is the one that is correct and the others are incorrect, though that makes no sense because, as I said, the lable is completely independent from the binding