Value-Format gets lost after a few seconds

Hi,

i have some dummy-widgets on my panel and have checked the “use server provided format if available”.

If the panel is loaded for the first time, the values gets transformed correctly. But after a few seconds, the values change to the native-item-values.

E.g.:

Number Heizung_Programm	"Heizung Programm: [MAP(Heizung.map):%s]"	(Heizung) {ebus="id:auto_stroker.status_heater_program"}

Heizung.map:

0=Aus
85=Heizung
187=Brauchwasser
OFF=Aus
ON=An

If the panel is initially loaded, the dummy-widget shows “Heizung”. A few seconds later (backgound-refresh) it shows “85”.

Any hints for me?

thx,
ben

It seems the items API (called initially) returns the state after performing the transformation but the SSE event (for real-time updates) sends the raw state.
Most likely an ESH bug, you should check at http://github.com/eclipse/smarthome if there’s any issue related to this and open one if necessary.

Hi,

thanks, then this one may apply:

https://github.com/eclipse/smarthome/issues/640

cu,
Ben

As you see, that ticket was closed with code merged in. As it was fixed and you still seem to be having the problem, what version of openHAB are you running? You might need to upgrade to receive the fix.

Hi,

im running Snapshot #603. So the fix should be included, but the problem still exists.
It makes no difference if i use JS or Map-Transformation.

I checked the values in the chrome-debugger. On initial loading the item.state includes the transformed value.

Then the registerEventSource()-Function is called and the payload.value includes the non-transformed value. The item.state is then set to item.payload.

So, if further investigated:

It’s definitely not a HABPanel-Issue. The values are received via REST.

If an item ist called with:

http://…/rest/items/item_name

The state-property is correctly transformed.

When the state-property is called either via:

http://…/rest/items/item_name/state

or via long-poll:

http://…/rest/events

the state-values are NOT transformed.

Not sure if this is a bug or “by design” ?!