About the Google Assistant category

(Replace this first paragraph with a brief description of your new category. This guidance will appear in the category selection area, so try to keep it below 200 characters.)

Use the following paragraphs for a longer description, or to establish category guidelines or rules:

  • Why should people use this category? What is it for?

  • How exactly is this different than the other categories we already have?

  • What should topics in this category generally contain?

  • Do we need this category? Can we merge with another category, or subcategory?

Thanks Michael for your hint regarding metadata and REST API : openHAB Google Assistant Integration v2.0

Unfortunately it doesn’t work.
I have tried:

{“name”:“nikohomecontrol_blind_440e003a2369_35_rollershutter”,
“tags”:[Blinds],
“type”:“Rollershutter”,
“link”:“http://x.x.x.x:8080/rest/items/nikohomecontrol_blind_440e003a2369_35_rollershutter",“state”:“1”,“editable”:false,“label”:"kitchen window”,“category”:“Blinds”,“groupNames”:[],
“metadata”: {
“ga”: {
“value”: “Blinds”,
“config”: {
“roomHint”: “Kitchen”
}
}
}
}

the response is ok (200) and:

[
  {
    "name": "nikohomecontrol_blind_440e003a2369_35_rollershutter",
    "status": "updated"
  }
]

When getting the items and specifying the metadata ga ()

curl -X GET --header “Accept: application/json” “https://x.x.x.x:8443/rest/items?type=Rollershutter&metadata=ga” -k

I got no metadata:

[
  {
    "link": "https://x.x.x.x:8443/rest/items/nikohomecontrol_blind_440e003a2369_35_rollershutter",
    "state": "0",
    "editable": true,
    "type": "Rollershutter",
    "name": "nikohomecontrol_blind_440e003a2369_35_rollershutter",
    "label": "kitchen window",
    "category": "Blinds",
    "tags": [
      "Blinds"
    ],
    "groupNames": []
  },
  {
    "link": "https://x.x.x.x:8443/rest/items/nikohomecontrol_blind_440e003a2369_38_rollershutter",
    "state": "1",
    "editable": true,

I have switched simple link off.
Any hint plz?
Thanks.

You need to use the metadata endpoint to update it for you items on the API level:
http://demo.openhab.org:8080/doc/index.html#!/items/addMetadata

PUT /items/{itemname}/metadata/{namespace}

At least that worked for me.

1 Like

Thanks, it works for me as well.

You just need to create endpoint namespace including value:

curl -X PUT --header “Content-Type: application/json” --header “Accept: application/json” -d “{
“value”: “Blinds”,
“config”: {
“roomHint” : “Kitchen”}
}” “https://x.x.x.x:8443/rest/items/nikohomecontrol_blind_440e003a2369_35_rollershutter/metadata/ga”

No need to put item with metadata as I tried before:

M.