razzo04 / rhasspy-mobile-app

A simple mobile app for rhasspy.
MIT License
120 stars 13 forks source link

Auto-Setup changes mqtt config on the server #14

Open Ulrar opened 3 years ago

Ulrar commented 3 years ago

Hi,

My (external) MQTT port is 8883, instead of the default 1883. When I click auto-setup in the mobile or watch app, it somehow changes the mqtt settings in rhasspy to 1883, breaking it. Everything else works as expected, but I have to manually go re-change the port in rhasspy every time.

Thanks

razzo04 commented 3 years ago

Auto-Setup won’t work with port 8883 because this is usually reserved for MQTT over TLS and the app can’t automatically get the appropriate certificate from rhasspy so it tries to use port 1883 to connect. Maybe I should display a message to the user about the use of port 8883.

Ulrar commented 3 years ago

Yeah I'm not sure why mine is running on 8883 without TLS, I realize that's not standard but I have it configured everywhere so I'm not changing it. The issue isn't really that, I just don't think clicking "Auto setup" in the app should change settings on the server side. I'd expect only the app's settings to change, right ?

razzo04 commented 3 years ago

I have designed it in such a way that is bidirectional if the app doesn’t have mqtt settings try to get from rhasspy but if the app is connected to mqtt and rhasspy settings are considered invalid it will try changing it. Even if the mqtt settings are not modified the app needs to add the site id to rhasspy and enable the dialogue manager so to complete the auto-setup he has to change rhasspy settings. Perhaps in the next release, I may improve the handling of this case.