Skip to content

Show raw openHAB Image Type in HABpanel

In our Home Automation system, I read weather data from OpenWeatherMap. I blogged about the implementation before. The weather data provides an icon which can be used to show the current weather:

Image	homeCurrentIcon		"Icon"		{ channel="openweathermap:weather-and-forecast:home:current#icon" }
Image	homef03Icon		"Icon"		{ channel="openweathermap:weather-and-forecast:home:forecastHours03#icon" }
Image	homef06Icon		"Icon"		{ channel="openweathermap:weather-and-forecast:home:forecastHours06#icon" }
Image	homef09Icon		"Icon"		{ channel="openweathermap:weather-and-forecast:home:forecastHours09#icon" }
Image	homef12Icon		"Icon"		{ channel="openweathermap:weather-and-forecast:home:forecastHours12#icon" }
Image	homef15Icon		"Icon"		{ channel="openweathermap:weather-and-forecast:home:forecastHours15#icon" }
Image	homef18Icon		"Icon"		{ channel="openweathermap:weather-and-forecast:home:forecastHours18#icon" }
Image	homef21Icon		"Icon"		{ channel="openweathermap:weather-and-forecast:home:forecastHours21#icon" }
Image	homef24Icon		"Icon"		{ channel="openweathermap:weather-and-forecast:home:forecastHours24#icon" }

On the openHAB server side, this reads the picture data into the Item itself:

2020-02-20 00:39:38.476 [vent.ItemStateChangedEvent] - homeCurrentIcon changed from raw type (image/png): 3801 bytes to raw type (image/png): 2773 bytes
2020-02-20 03:59:47.156 [vent.ItemStateChangedEvent] - homeCurrentIcon changed from raw type (image/png): 2773 bytes to raw type (image/png): 2565 bytes
2020-02-20 04:19:48.006 [vent.ItemStateChangedEvent] - homeCurrentIcon changed from raw type (image/png): 2565 bytes to raw type (image/png): 2922 bytes

The really interesting question is: how can I display this icon directly in HABpanel. The available documentation is sparse to non-existent.


Continue reading "Show raw openHAB Image Type in HABpanel"