Skip to content
Chris Jackson edited this page Sep 21, 2013 · 1 revision

The item item RESTful interface used in HABmin is defined below. It is used to get a list of icons that are available for the system, and displayed in HABmin when configuring items and sitemaps etc.

  • GET to /rest/config/icons will list all the icons

Below is the format of the data returned.

{
{
    "name": "Standard",
    "description": "Standard openHAB icons",
    "author": "",
    "license": "",
    "icon": [
        {
            "name": "bath",
            "menuicon": "bath.png",
            "label": "Bath",
            "description": ""
        },
        {
            "name": "bedroom",
            "menuicon": "bedroom.png",
            "label": "Bedroom",
            "description": ""
        },

The REST bundle in openHAB uses an XML configuration file to specify the icons. Note that icons with multiple states (eg. on/off) are only specified once. The actual display of the states is not considered in HABmin since this is a UI issue. Maybe something should be added to the file to support this for other uses?

<!-- Icon set configuration for openHAB  -->
<iconset>
    <!-- Short name of this icon set -->
    <name>Standard</name>
	<!-- Full label presented to the user -->
	<description>Standard openHAB icons</description>
	<!-- Size -->
    <height></height>
    <width></width>
    <!-- Author -->
	<author></author>
	<!-- License information -->
	<license></license>

    <!-- Icon list-->
    <icons>
        <icon>
            <menuicon>bath.png</menuicon>
            <name>bath</name>
            <label>Bath</label>
            <description></description>
        </icon>
        <icon>
            <menuicon>bedroom.png</menuicon>
            <name>bedroom</name>
            <label>Bedroom</label>
            <description></description>
        </icon>