I have been trying to get a working MQTT setup as several things such as the respeaker4 led triggers rely on mqtt to function. so while i had a working system for http posts i have now broken it by trying to enable mqtt.
One specific thing i have now seen a few times is the Rhasspy Assistant hassio addon doesnt seem to persist some settings on reboot.
This is not a rebuild just a restart in the hassio supervisor section.
the reason i have noticed this very prominently is that if i set a mqtt address and set it to external then it starts processing (spinning logo) forever. the mqtt output is giving an error saying that it recieved a new connection and then socket error.
this also means that the web ui doesnt start so i am locked out of being able to change it back to do more testing.
So i ended up doign a VNC into my ubuntu VM and then using terminal to docker exec -it to connect to the rhasspy docker container so i could edit the profile.json file manually.
first time i did this i foudn there was no package for either vim or nano.
so i do apt-get install nano.
this gives me a further error that there is an archive folder missing.
i create this folder and reinstall and i can now nano the file remove the mqtt settings and after restarting rhaspy it is now back to internal.
I ahve done this three times now.
And i dont mean just getting the mqtt error.
Every time i restart the rhasspy docker container it no longer has nano, it gives the same error so i have to create the archive folder to apt-get install nano.
Is there something seriously wrong here? or is it deliberate that the rhasspy container seems to rebuild itself even if you just restart the container.
Also as a rhasspy addon in HA it appears that the profile folder is just contained on the container. which makes no sense either. as if it is on the container and can save data between restarts then why is nano gone when i restart???
Im so confused and moderately frustrated now.
Oh, and the benefit of adding it via hassio with it autoconfiguring the api key etc. doesnt work. so i still had to create the long lived token and add it anyway.
HA and the Rhasspy Addon are running perfectly fine on my and other machine’s so I cannot relate to the issue you seem to have.
Let’s start by getting some things worked out as they are unclear to me.
So, what Home Assistant are you running in the VM? Is it supervised or core or OS or something else?
Normally, you cannot vnc into an Home Assistant OS and use the docker command and most certainly there is no apt functionality.
Yes obviously, because you probably did not commit. But the profile.json is also mapped to the share/rhasspyprofiles/ of the Home Assistant config so you would never have to exec into the docker container.
No, it does not rebuild. The image remains the same, so if you restart it, is will create new container from the same image. If you want to change the image, you should commit those to it.
That is how docker works.
Well, if you do not edit the data where the container maps it (in /share/rhasspy/profiles on the host) but rather in the container itself, as restart will just map the /share data again and therefore your data seems lost.
So let’s first start with a question:
How is your Home Assistant setup exactly?
Ubuntu virtual machine with HA supervised installed on that. hence the addon usage for rhasspy.
I am unfamiliar with committing in docker. all of my other docker containers running mqtt, radarr, sonarr, mysql, nginx wordpress, python flask apps and other little projects etc dont revert to a previous state when you restart them. they do if you rebuild them by using docker down and then build but not a restart. is this something specific to the way hassio (ha supervised) does things?
i have just looked on the VM for the share folder. and recall now the reason i had used docker exec to edit the profile on the rhasspy docker container is due to there not being a /share/ folder in existence on the VM. Is the share folder that is setup by HA when it installs the Rhasspy docker container mapped to another container? or am i missing something.
Yes, there is. But it might be in /usr/share or a path like that. It is created by Home Assistant and on the same level as the config folder.
Maybe try a find on the system.
There might be an issue with the path if you use supervised, I am not sure.
But if you have a ubuntu VM, you can always use the docker command for Rhasspy directly. No need for the Addon
ok. i will try without the addon. hopefully that fixes my mqtt issue also.
It is important that you use a username and password for MQTT of you use the addon
That has the anonymous option disabled if I am not mistaken.
Your HA username should work fine
Hi. Could you just clarify that pls.
My external mqtt has no username and password set at the moment so all devices connect to it without a username and password.
So the addon “must” use a username and password?
Your external broker is something other than the addon?
Then it might not matter. I assumed you used the addon.
Hi, Thanks for all the feedback. I installed rhasspy just using docker and not as a hassio addon and it connected to my external MQTT with no issues.
This fixed my other issue passing data back from home assistant to the satellite station also.
I had tried the hassio MQTT addon and also my main external docker MQTT which the rest of my home automation uses previously and the rhasspy addon would not connect to either. this may have been some sort of issue with docker not seeing the ip correctly or something else. not sure but happy to have a fully working system now.
I just have to setup my intent handlers now and am good to go. plus a load more satellites obviously but i now have a template to use to set these up which is great.