I’m getting the following error in “Problems” tab:
“HomeAssistantIntentHandler Can’t contact server Unable to reach your Home Assistant server at htps://192.168.0.186:8123. Is it running?” (sorry i had to remove 1 “t” because i cannot post it otherwise - it is meant to be https)
this URL is accessible with no issues when i test it with postman. I’m not using HASS.IO image for the raspberry - i use raspbian with home assistant docker.
If you are using https:// protocol, and have a DuckDNS node name and SSL certificate, you must use the recognized DNS node name of your Home Assistant system. If you’re running Rhasspy in a docker container, you can enable this by adding the following line to your docker command:
@FredTheFrog i’m not sure what you mean by DNS name. let me explain my setup:
i have home assistant docker and rhasspy docker both installed on a raspbian buster. the network address of the raspberry is 192.168.0.186 and to access it i use “https://192.168.0.186:8123”. the SSL certificate is a self signed one - i’m not sure if that might cause a probelm though.
what is the meaning of the dns name before the ip and in what way does rhasspy use it?
If both HA and Rhasspy are in Docker containers on the same host, you can safely ignore my post.
What @TinyDoT posted is more relevant. Be certain to generate your own long-lived token in HA, use that in Rhasspy, and be certain there are no leading or trailing spaces in the token on the Rhasspy settings screen.
i’ve generated the token i’m using in rhasspy from home assistant, and using the same token to call “https://192.168.0.186:8123/api/states” after setting the authorization header with it (adding "Bearer " before) - works fine.
checked - there are no spaces or non related characters in the string - i even copied it back from rhasspy settings to postman and it works.
Ok, so you added the certificate, to your profile folder, which should be at “~/.config/rhasspy/profiles/en” and added the proper json to your profile. Now, at this point did you restart the server?
The $RHASSPY_PROFILE_DIR is a variable for your profile location which is:
“~/.config/rhasspy/profiles/en”
and that is a link into your docker for the profile:
“/profiles”
The way you have this setup, in theory should work after a restart if not may be @synesthesiam can chime in on this.
i did what you described and it didn’t work - $RHASSPY_PROFILE_DIR is not recognized inside the docker image (i printed the environment variables from within it and it does not exist). this variable must be set from within the docker container or it will have no value when it is used as the path from “profile.json”:
“pem_file”: “$RHASSPY_PROFILE_DIR/certificate.pem”
i’m not sure why it was not set, or am i missing something else here?
i tried another thing - after attaching to the container, i saw that filesystem “/dev/root” is mounted on “/profiles” and the folder with the certificate is actually in “/profiles/en”, so i changed in profile.json to
this path DOES contain the certificate when i’m doing “ls /profiles/en/certificate.pem” from within the container but it does not solve the issue after restart.
by doing “echo $HOME/.config/rhasspy/profiles/en”
i’m getting: “/root/.config/rhasspy/profiles/en” and this folder doesn’t exist. same output for “ls ~/.config/rhasspy/profiles/en”
and it works - i get the full list of states!
so i t seems that the URL is accessible from the docker, and the problem is related to rhasspy application itself - probably because of the certificate but i don’t understand why
The link that I sent you about this it seemed to solve the problem, but I do not know which version that was for. Maybe an update broke something that allowed this to work.
actually - it describes a different error - " HTTPSConnectionPool(host='home-assistant.local', port=443): Max retries exceeded with url: /api/events/rhasspy_ChangeInput (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))"
mine is “HomeAssistantIntentHandler Can’t contact server Unable to reach your Home Assistant server at htps://192.168.0.186:8123. Is it running?"
so maybe the certificate is not the issue. i need to see some debug logs for it’s start process - how can i do that?