@synesthesiam A fresh install of Rhasspy as a hass.io addon doesn’t work with HomeAssistant - it can’t connect to its API, it gets a 401 Unauthorized.
[DEBUG:7721464] PorcupineWakeListener: started -> listening
[DEBUG:7721462] DialogueManager: ready -> asleep
[INFO:7721461] DialogueManager: Automatically listening for wake word
[DEBUG:7721456] DialogueManager: handling -> ready
[ERROR:7721444] HomeAssistantIntentHandler: handle_intent
Traceback (most recent call last):
File "/usr/share/rhasspy/rhasspy/intent_handler.py", line 110, in in_started
intent = self.handle_intent(intent)
File "/usr/share/rhasspy/rhasspy/intent_handler.py", line 155, in handle_intent
self.forward_intent(intent_name, event_type, slots)
File "/usr/share/rhasspy/rhasspy/intent_handler.py", line 187, in forward_intent
response.raise_for_status()
File "/usr/local/lib/python3.6/dist-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://hassio/homeassistant/api/intent/handle
[DEBUG:7721435] urllib3.connectionpool: http://hassio:80 "POST /homeassistant/api/intent/handle HTTP/1.1" 401 17
[DEBUG:7721407] urllib3.connectionpool: Starting new HTTP connection (1): hassio:80
[DEBUG:7721394] WebSocketObserver: {"intent": {"name": "ChangeLightState", "confidence": 1.0}, "entities": [{"entity": "name", "value": "study lights", "raw_value": "study lights", "start": 9, "raw_start": 9, "end": 21, "raw_end": 21, "tokens": ["study", "lights"], "raw_tokens": ["study", "lights"]}, {"entity": "state", "value": "on", "raw_value": "on", "start": 22, "raw_start": 22, "end": 24, "raw_end": 24, "tokens": ["on"], "raw_tokens": ["on"]}], "text": "turn the study lights on", "raw_text": "turn the study lights on", "recognize_seconds": 0.009700438000436407, "tokens": ["turn", "the", "study", "lights", "on"], "raw_tokens": ["turn", "the", "study", "lights", "on"], "speech_confidence": 0.11110776535696966, "wakeId": "True", "siteId": "default", "hass_event": {"event_type": "rhasspy_ChangeLightState", "event_data": {"name": "study lights", "state": "on", "_text": "turn the study lights on", "_raw_text": "turn the study lights on"}}, "slots": {"name": "study lights", "state": "on"}}
[DEBUG:7721370] DialogueManager: recognizing -> handling
Settings > Intent Handling > Use Home Assistant > Access Token
field was empty, so I filled it with a manually created Long-lived token.
The API itself works alright when I connect to it from my PC:
curl -H "Authorization: Bearer LONG_TERM_TOKEN_HERE" 192.168.0.21:8123/api/discovery_info
{"base_url": "http://192.168.0.21:8123", "location_name": "Home", "requires_api_password": true, "version": "0.103.5"}
Is Rhasspy trying to hit the wrong APIs?