HABPanel in german using Map Transformation

Hmmm. The transformedState is there but not shown in habpanel , if I use itemState instead of itemValue (which is shown correctly with its raw state.

{"link":"http://192.168.178.50:8080/rest/items/BerlingState","state":"IDLE","transformedState":"Bereit","stateDescription":{"pattern":"","readOnly":false,"options":[]},"type":"String","name":"BerlingState","label":"Status","tags":[],"groupNames":["G_jdbc"]}

If I replace the itemValue with itemState, the state just disappears in the template tile.
With itemValue it is showing the correct original state.

I donā€™t get the point.

itemState and itemValue are really supposed to be the sameā€¦
Morever, thereā€™s a second parameter to ignore the transformation which is disabled by default.
itemState('BerlingState', false) or itemState('BerlingState') should apply the transformation and itemState('BerlingState', true) return the raw value without applying the transformation.

Which browser/bundle version are you using?

Thanks @ysc
Thatā€™s really strange. Your definition above I understood (I guess).
So true as the second argument would return the raw state (not transformed)

Is there anything else which might be wrong in my syntax above?
I am using Habpanel on my iPhone with safari (iOS 10.3.2) and the Habpanel bundle which comes with the OH 2.1 release.

I guess I would blame iOS Safari since there have been several problems with it already.
Can you try the same dashboard in Chrome or Firefox on a computer to definitely blame the browser? It would help pinpointing a potential problem.

Thanks, I did not even think about this option, because I never had problems with Habpanel and safari so far.
I tried it on my computer (Firefox) and it worked right away as you suggested.
Thanks
Now I am going to find a better full screen browser for my phone! :wink:
Again, thanks a lot!

I tried another thing.

Usually I use Habpanel by safari as a link on my homescreen (I assume safari works in the background)

However, this link (as mentioned above) has problems displaying the itemState correctly, but shows my custom icons perfectly (copied into smartphone-set folder in assets and changed the smartphone-set file accordingly)

Running HABpanel directy in safari shows the itemState correctly but not the icons.

Do you have any idea why safari is not able to localize the icons?

Never mind - I figured it out

I checked some posts and found out that I have done this (pretty long ago):
Clone all from the habpanel web folder from github into html/habpanel (youā€™ll have app, assets, fonts etc. then in the html/habpanel directory)

You wonā€™t see the new icons until you use the static-URL: http://your-openhab-server:8080/static/habpanel/index.html

I did not remember, that my (old) habpanel placed on my homescreen hadhardcoded the static html liked.
Thatā€™s why it did not show the right itemState because I was actually running the old habpanel, not the one coming with OH 2.1.

After cloning the web folder from habpanel into my /etc/openhab2/html/habpanel including the icons I have added to my previous (old) habpanel, everything works as expected.

Thank you!

1 Like