synesthesiam / rhasspy

Rhasspy voice assistant for offline home automation
https://rhasspy.readthedocs.io
MIT License
942 stars 101 forks source link

[mqtt] rawValue should not equal value #191

Closed snail59 closed 4 years ago

snail59 commented 4 years ago

Hello,

  1. When using MQTT service, rhasspy sends the same value for "value": and "rawValue": . For example, if one hase :
"room": [
        "(living):downstairs"
         ...
 ]

On line 269, file ./rhasspy/mqtt.py reads "rawValue": ev["value"], while it should be ( I think ) "rawValue": ev["raw_value"],. At least it works for me.

2.The same goes for the input content. It will read Turn off the downstairs light while I think this should read Turn off the bedroom light as this was the real input. This might depend on people's point of view, of course.

synesthesiam commented 4 years ago

You're right. I also think this should be raw_value in the MQTT entity, per the Snips docs. I'm also failing to remember why I had value set to an object with kind and value.

I can fix this in the next version of 2.4 (it's already fixed in 2.5).

snail59 commented 4 years ago

I won't be of a great help as I did not read the snips docs, but I think you did right when creating this object because:

  1. It works ( again, I make a huge use of value and raw_value )
  2. I compared the MQTT messages between snips and rhasspy before opening this issue. The only notable difference was then that the sessionId was filled with a (random numeric ?) value by snips while rhasspy just sends an empty one. I did not notice anything else.

By the way, thank you for your work ;-)

synesthesiam commented 4 years ago

Will be fixed in 2.4.20

snail59 commented 4 years ago

I just tested, it does work.

Thank you