Hi @mortommy,
After some testing, I’ve confirmed that the binding uses the OpenHAB Item Label, and not the OpenHAB Item Name for speech/ intent recognition.
The test to prove this is pretty simple - add a test Item to the OpenHAB *.items file with a very different Name and Label text:
Switch fish "bicycle" ["Switchable"] {channel="binding detail removed"}
Then, fire up the Mycroft test console, refresh the Items from OpenHAB and try turning on fish
and bicycle
:
python -m mycroft.client.text.main --quiet
At the prompt, simulate saying text whilst watching the logs (same as saying Hey Mycroft…):
refresh openhab items
The skill pulls the list of items with tags and reads the out the Names.
The Name is a variable name so often non-human readable - useful for debug, but not very ‘speakable’!
This is what made me suspect the skill was using Name rather than Label!
Say the Name - fish
Mycroft recognises the intent, parrots back the command, but NOTHING HAPPENS. This is slightly misleading, but could well be the Mycroft intent parser, rather than the OpenHAB binding.
turn on fish
>> turn on fish
Say the Label - bicycle
turn on bicycle
>> switch on bicycle
Mycroft recognises the intent from the Label, fires a call to the OpenHAB REST API to turn on the Item named ‘fish’ correctly:
requests.packages.urllib3.connectionpool - DEBUG - http://openhab.home:8080 "POST /rest/items/fish HTTP/1.1" 200 0
So, that seems to work well, and as expected.
My testing so far works for ["Switchable"]
and ["Lighting"]
, but I’ve not managed to ask for the temperature of a ["CurrentTemperature"]
sensor. When I ask, what is radiator temperature
, the Weather skill gives me a forecast!
So, the issue is more of an improvement request…
Thanks again!