# Getting Rhasspy working with OpenHAB

**URL:** <https://community.openhab.org/t/getting-rhasspy-working-with-openhab/87909>\
**Category:** 3rd Party\
**Tags:** voicecontrol, mqtt, rhasspy\
**Created:** [December 18, 2019, 6:26am UTC](https://community.openhab.org/t/getting-rhasspy-working-with-openhab/87909 "2019-12-18T06:26:51Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Arpagor](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@Arpagor](https://community.openhab.org/u/Arpagor)\
**Post date:** [October 17, 2020, 7:13am UTC](https://community.openhab.org/t/getting-rhasspy-working-with-openhab/87909/21 "2020-10-17T07:13:37Z")

</div>

Help requested for MQTT query syntax  
I have a Rhasspy which works perfectly in voice control of my OH2.  
Currently I have Rhasspy things such as:

> 

Bridge mqtt:broker:Rhasspy “Rhasspy” @ “MQTT” [  
host=“192.168.0.28”,  
port=1883,  
secure=false,  
clientID=“default”,  
username=“”,  
password=“”  
]  
{  
Thing topic Rhasspy\_thing “Rhasspy” @ “MQTT” {  
Channels:  
Type string : Rhasspy\_Intent “Str Rhasspy INTENT” [stateTopic=“hermes/intent/#”]  
}  
}

I get the MQTT frame in the Rhasspy\_intent String item

> String Rhasspy\_Intent “Rhasspy Intent” {autoupdate=“false”,channel=“mqtt:topic:Rhasspy:Rhasspy\_thing:Rhasspy\_Intent” }

and I then process the information received in text mode in a rules !!!

> rule "Rhasspy intent "  
> when  
> Item Rhasspy\_Intent received update  
> then  
> ///// text processing to extract my info  
> var String str\_Mqtt = Rhasspy\_Intent.state.toString  
> val String intentname = transform(“JSONPATH”, “$.intent.intentName”,str\_Mqtt)  
> //////  
> end

I added an item String to retrieve a value such as for example “itentName”  
and I created a new channel in my thing such as:

> Type string : IntentName “Rhasspy INTENTNAME” [stateTopic="hermes/intent/intentName "]

**And the is my question: what is the correct syntax to get the desired value ??**  
**I tried without result after reading examples of these syntaxes:**

> [stateTopic="hermes/intent/intentName "]  
> [stateTopic="hermes/intent/intentName/# "]  
> [stateTopic=“hermes/intent/intentName/#:intentName”]  
> [stateTopic=“hermes:intent:intentName”]

So my question is what is the correct syntax ???  
[I don’t understand the syntax given in paragraph 3.1 of post :](https://community.openhab.org/t/getting-rhasspy-working-with-openhab/87909/14)

> mqtt.things:

```auto
Thing mqtt:topic:mosquitto:rhasspy "Rhasspy voice control" (mqtt:broker:mosquitto) {
        Channels:
                Type string : intent_lights "Rhasspy Intent Lights" [stateTopic="rhasspy/intent/Lights"]
        }

```

> **[hermes/intent/Lights] gives me exactly the same as [hermes/intent/#]**

return json is as follows:

> {  
> “input”: “turn mysensors\_light\_bcc8b6a2\_light\_1\_1\_status ON”,  
> “intent”: {  
> “intentName”: “Lights”,  
> “confidenceScore”: 1.0  
> },  
> “siteId”: “default”,  
> “id”: “93bee187-816f-4db4-a615-4a7c9e3c0e07”,  
> “slots”: [  
> {  
> “entity”: “item”,  
> “value”: {  
> “kind”: “Unknown”,  
> “value”: “mysensors\_light\_bcc8b6a2\_light\_1\_1\_status”  
> },  
> “slotName”: “item”,  
> “rawValue”: “right desk lamp”,  
> “confidence”: 1.0,  
> “range”: {  
> “start”: 5,  
> “end”: 46,  
> “rawStart”: 5,  
> “rawEnd”: 20  
> }  
> },  
> {  
> “entity”: “status”,  
> “value”: {  
> “kind”: “Unknown”,  
> “value”: “ON”  
> },  
> “slotName”: “status”,  
> “rawValue”: “on”,  
> “confidence”: 1.0,  
> “range”: {  
> “start”: 47,  
> “end”: 49,  
> “rawStart”: 21,  
> “rawEnd”: 23  
> }  
> }  
> ],  
> “sessionId”: “93bee187-816f-4db4-a615-4a7c9e3c0e07”,  
> “customData”: null,  
> “asrTokens”: [  
> [  
> {  
> “value”: “turn”,  
> “confidence”: 1.0,  
> “rangeStart”: 0,  
> “rangeEnd”: 4,  
> “time”: null  
> },  
> {  
> “value”: “mysensors\_light\_bcc8b6a2\_light\_1\_1\_status”,  
> “confidence”: 1.0,  
> “rangeStart”: 5,  
> “rangeEnd”: 46,  
> “time”: null  
> },  
> {  
> “value”: “ON”,  
> “confidence”: 1.0,  
> “rangeStart”: 47,  
> “rangeEnd”: 49,  
> “time”: null  
> }  
> ]  
> ],  
> “asrConfidence”: null,  
> “rawInput”: “turn right desk lamp on”,  
> “wakewordId”: null,  
> “lang”: null  
> }

Help me !!!

---

<div class="post-metadata">

**Author:** ![klues](https://community.openhab.org/user_avatar/community.openhab.org/klues/32/91823_2.png) [@klues](https://community.openhab.org/u/klues)\
**Post date:** [August 12, 2022, 11:34am UTC](https://community.openhab.org/t/getting-rhasspy-working-with-openhab/87909/22 "2022-08-12T11:34:51Z")

</div>

I’ve created my own project and using it to connect Rhasspy with openHAB for our smart home at the UAS Technikum Wien: [GitHub - fhtw-edge-computing/rhasspy-bridge: small, customizable and lightweight bridge for connecting Rhasspy to any other platform](https://github.com/fhtw-edge-computing/rhasspy-bridge)

[Previous page](https://community.openhab.org/t/getting-rhasspy-working-with-openhab/87909.md?page=1)
