-
Notifications
You must be signed in to change notification settings - Fork 51
REST Sitemap Config
Chris Jackson edited this page Sep 20, 2013
·
3 revisions
The following is the definition of the REST sitemap configuration interface (currently!) used in HABmin, and implemented in my modified openHAB REST bundle.
- GET to /rest/config/sitemap will get the list of sitemaps
- GET to /rest/config/sitemap/name will get the detail of the sitemap name
- POST to /rest/config/sitemap/name will create a new sitemap name. If name already exists an error will be returned.
- POST to rest/config/sitemap/name?copy=sitemap will create a new sitemap name with the same content as existing sitemap sitemap. If name already exists an error will be returned. If sitemap does not exist an error will be returned.
- PUT to /rest/config/sitemap/name will save the sitemap configuration
- DELETE to /rest/config/sitemap/name will delete the sitemap name
For the GET and PUT of the actual sitemaps, the format is shown below. It's similar (but not the same) as the sitemaps interface used for GUIs. It's cut down - it has no links, widget ids etc - the intention is that the complete sitemap is read and saved at once - not on a per page basis.
Item labels, icons etc are only provided when they are overridden from the defaults - this is consistent with the way the .sitemap files are defined.
{
"label": "Main Menu",
"widget": [
{
"type": "Group",
"label": "Heating",
"icon": "heating",
"widget": [
{
"type": "Frame",
"label": "Lounge Thermostat",
"widget": [
{
"type": "Switch",
"label": "Lounge Thermostat Enable",
"item": "LoungeThermostat_Enable"
},
{
"type": "Setpoint",
"label": "Lounge Setpoint [%.0f °C]",
"minValue": "14",
"maxValue": "25",
"step": "1",
"item": "LoungeThermostat_SetTemp"
},
{
"type": "Text",
"item": "LoungeThermostat_RoomTemp"
},
{
"type": "Text",
"item": "LoungeThermostat_HeatState"
},
{
"type": "Text",
"item": "LoungeThermostat_FloorTemp"
}
]
},
{
"type": "Frame",
"label": "Hall Thermostat",
"widget": [
{
"type": "Switch",
"label": "Hall Thermostat Enable",
"item": "HallThermostat_Enable"
},
{
"type": "Setpoint",
"label": "Hall Setpoint [MAP(xxx.yyy):%.0f °C]",
"minValue": "14",
"maxValue": "25",
"step": "1",
"item": "HallThermostat_SetTemp"
},
{
"type": "Text",
"item": "HallThermostat_RoomTemp"
},
{
"type": "Text",
"item": "HallThermostat_HeatState"
}
]
},
{
"type": "Frame",
"label": "Water Heating",
"widget": [
{
"type": "Switch",
"label": "Hot Water Enable",
"item": "HallThermostat_HWEnable"
},
{
"type": "Text",
"item": "Temperature_Boiler"
}
]
}
]
},
{
"type": "Group",
"label": "Network",
"icon": "network",
"widget": [
{
"type": "Frame",
"label": "Internet Connection",
"widget": [
{
"type": "Text",
"item": "ADSL_BytesReceived"
},
{
"type": "Text",
"item": "ADSL_BytesSent"
},
{
"type": "Text",
"item": "ADSL_DownlinkSpeed"
},
{
"type": "Text",
"item": "ADSL_LinkState"
}
]
},
{
"type": "Frame",
"label": "POE Status",
"widget": [
{
"type": "Text",
"item": "Switch_POEConsumption"
},
{
"type": "Text",
"item": "Switch_POEState2"
},
{
"type": "Text",
"item": "Switch_POEState3"
},
{
"type": "Text",
"item": "Switch_POEState4"
},
{
"type": "Switch",
"item": "Switch_POEEnable2"
}
]
}
]
}
]
}
- Home
- General Configuration
- Item Configuration
- Sitemap Configuration
- Binding Configuration
- Charting
- Persistence stores and graphing
- Rules and Automation
- Rule Designer: Overview
- Rule Designer: Building Blocks
- Rule Designer: Example 1
- Rule Designer: Example 2
- Rule Text Editor
- Technical
- Language Support
- Binding descriptor files
- Z Wave Product Database
- REST Item Config
- REST Item Icons
- REST Persistence
- REST Sitemap Config
- Rule Item Library
- Item Rule Configuration