I am in the process of upgrading to openhab 3.0, and I enjoy a lot of improvements.
Today I found something which must be a bug in the REST API.
When searching for a group in openhab2 with:
http://openhab2:8080/rest/items/gTempZone_H_FF_Kitchen
i get the following result - as expected (Link to member points to the member):
{
“members”: [
{
“link”: “http://openhab2:8080/rest/items/Thermostat_Kitchen_Room”,
“state”: “22”,
“stateDescription”: {
“pattern”: “%.1f °C”,
“readOnly”: false,
“options”: []
},
“type”: “Number”,
“name”: “Thermostat_Kitchen_Room”,
“label”: “Set room temp”,
“category”: “heating”,
“tags”: [],
“groupNames”: [“gThermostats”, “gTempZone_H_FF_Kitchen”]
}
],
“link”: “http://openhab2:8080/rest/items/gTempZone_H_FF_Kitchen”,
“state”: “NULL”,
“editable”: false,
“type”: “Group”,
“name”: “gTempZone_H_FF_Kitchen”,
“label”: “Temp zone Kitchen”,
“category”: “colorwheel”,
“tags”: [],
“groupNames”: [“gTempZones”]
}
When doing a similar search in openhab3 with:
http://openhab3:8080/rest/items/gTempZone_H_FF_Kitchen
I get this result - which is not as expectet (Member link points to group - not to the member )
{
“members”: [
{
“link”: “http://openhab3:8080/rest/items/gTempZone_H_FF_Kitchen”,
“state”: “16.0 °C”,
“type”: “Number:Temperature”,
“name”: “KitchenThermostate”,
“label”: “Thermostat Kitchen”,
“category”: “”,
“tags”: [],
“groupNames”: [“gTempZone_H_FF_Kitchen”, “gThermostats”]
}
],
“link”: “http://openhab3:8080/rest/items/gTempZone_H_FF_Kitchen”,
“state”: “NULL”,
“editable”: false,
“type”: “Group”,
“name”: “gTempZone_H_FF_Kitchen”,
“label”: “Temp zone Kitchen”,
“category”: “colorwheel”,
“tags”: [],
“groupNames”: [“gTempZones”]
}