Gilles76
(Gilles)
November 8, 2016, 1:57pm
1
Hi,
For an easy integration in a vocal command project, I want to get real item name.
The rest api in json for getting items is almost interresting but there is no real name.
In final, I want to have a file with:
“item name from sitemap”: “bathroom light”, “link form rest item”: http://server_ip:8080/rest/balbla
Does someone do that ? How ?
The aim is to ask an assistant some commands with real name from openhab.
I’m not a dev but I can code a little bit if someone has some informations.
Gilles.
Hi,
Don’t you get the xml format when accessing http://your_ip/rest/items/item_name ?
You basically get all the info for the item: name, state, etc.
Best regards,
George
Gilles76
(Gilles)
November 8, 2016, 5:40pm
3
Yes it’s ok, I can see my items name but not widget item name from sitemap.
What I want is the name which is display when you use the web interface.
I try to list with rest over sitemaps but it’s too hard for me to have a result as I use groups frames etc …
Kind Regards,
Gilles.
Do you mean the label in the sitemap items?
rlkoshak
(Rich Koshak)
November 9, 2016, 8:08pm
6
At this time there is no way to get the label for the Item through the API. I think I remember seeing a new label
or getLabel
method on an Item so this may be something that might be added in the future.
Gilles76
(Gilles)
November 10, 2016, 8:34am
7
Ok so for the moment, I have to do my vocal system configuration by hand.
Rich, if you are interesting you can go there, it’s a french project which is very interesting and works very well.
http://domotiquefacile.fr/jarvis/
With that, you can by natural vocals commands send order to your openhab and have a vocal confirmation.
It’s a kind of 'iron man’s Jarvis" !
And thank you for your answer.
It might be a little complicated, but I think you can parse the sitemaps files looking for label="" in element definitions. Just an ideea.
Gilles76
(Gilles)
November 10, 2016, 1:18pm
9
@george.erhan ,
It’s funny I just think that, I will try to see if it is doable.
Thank you for your suggestion.