[SOLVED] Sitemap bug, not displaying values - how can I debug it?

Hi,
Before I begin, I want to say that I had this whole setup was working just fine for several months. I had some validation errors in my temp sensor .items file and I have finally corrected them yesterday. Now I don’t have validation errors, but my sitemap is not reading values.
How can I debug this? Kitchen temp is being shown correctly, rest is not. Important note - all these items show correct values in habpanel, they are also correctly logging values to influxdb.

EDIT: This is definitely a defect in OH2. I have just copy-pasted Bedroom temp. item, just changed it name, and this newly copied item is showing proper value in sitemap. Something, somewhere, must be cached, but now how can I debug it find what happened… Also, restarting RPI does not help.

.sitmap:

Frame label="Temperature" {
    Text item=Bedroom_HTP_Temperature
    Text item=Kitchen_HTP_Temperature
    Text item=Bathroom_HTP_Temperature
    Switch item=HeatingActive
    Slider item=Bedroom_thermostat sendFrequency=10000 switchSupport minValue=500 maxValue=3000 step=50
    Slider item=Bathroom_thermostat sendFrequency=10000 switchSupport minValue=500 maxValue=3000 step=50
}

.items:

Number:Temperature Bedroom_HTP_Temperature “Bedroom Temperature” (gTempSensors) { channel=“mihome:sensor_weather_v1:04cf8cb0a398:158d00036b52ba:temperature” }

Number:Temperature Kitchen_HTP_Temperature “Kitchen Temperature” (gTempSensors) { channel=“mihome:sensor_weather_v1:04cf8cb0a398:158d00036b46cd:temperature” }

Number:Temperature Bathroom_HTP_Temperature “Bathroom Temperature” (gTempSensors) { channel=“mihome:sensor_weather_v1:04cf8cb0a398:158d00036bd31a:temperature” }

Result:

Can you provide openHAB.log from a time when this happens? (doc-logging)?

Unfortunately there is nothing there. Neither openhab.log nor events.log contain anything useful. I’m only getting below INFO messages when I tried fiddling (thus reloading) with these items’ definitions, and the sitemap file. For temperature item, openhab.log does not have any entried, events.log only has logged temp changes.

Openhab.log:

2020-02-13 09:35:57.989 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘mi.items’
2020-02-13 09:36:17.215 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘main.sitemap’
Nothing else is down below that is related to items or sitemap.

events.log:

2020-02-13 09:37:13.596 [vent.ItemStateChangedEvent] - Bathroom_HTP_Temperature changed from 22 °C to 22.25 °C

Do you use any form of transformation for the values to be displayed?

No, nothing besides codes that I am showing in original post. Also I just edited this post, as I confirm it is a defect in OH2. It’s now a matter of finding what’s wrong with it.

image

According to the items-doc you defined groups, is this intended?

You havn´t specified any value syntac in your items labels…
Try with:

Number:Temperature Bedroom_HTP_Temperature “Bedroom Temperature [%s]” (gTempSensors) { channel=“mihome:sensor_weather_v1:04cf8cb0a398:158d00036b52ba:temperature” }

Or mayb use %unit (I think) since you use Number:Temperature type.
Look at the items definition in the docs.

Yes, this is intended.

%s doesn’t matter here - because it does not answer why Kitchen sensor shows value, but Bedroom and Bathroom do not. And they are all the same as we can see.

Edit, as I think I have easier way out - simply comment out the item in your .items file. Save. Refresh sitemap. Uncomment item from .items, save, reload sitemap.

I managed to fix it. If you have this issue, you need to create a mirror copy of your item, just rename it a bit (I created BedroomA_HTP_Temperature item). Save .items. Replace old item with newly created one in sitemap file. Save .sitemap. Next, remove old (original) item from .items, save. Next rename new item so that it has original name (I removed A from new item), save. Correct sitemap file to point to originally named .item, save. If you did all the steps, it should be corrected now.

Would be better just to clear cache & tmp and reboote

I did that. Does not help.

Strange… clear cache & tmp would force the jsondb to update, which is the same as creating a new item.

But if your solution works for you, its fine.

What the…?
If it works okay, but a real solution? Nah, this is a workaround.

Please report this issue on GitHub.
Pretty please :slight_smile:

Cheers,
Elias