-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTT connection with username/password #225
Comments
The skin currently only supports connecting anonymously to the MQTT broker, without a username and password. I was not aware of people using credentials on the client side, since they are exposed to the public. I will add this in the next release, please be patient! |
My Broker on Home assistant is configured with user name and password... |
hello, how I Can try? |
I released a pre-release, v3.5.0-alpha1, for you to test this out. Please follow the normal update instructions. You can now set |
Ok, that's difficult for me without something to look at. Some ideas:
What is the error saying? |
broker have static ip and my broker it is inatalled on Home assistant |
From the screenshot, it looks like you are using secure websockets via SSL (wss://...). Your home assistant config uses non-secure (ws://...) connection on port 1884. So you should either use
or
Please correct me if I am wrong but the skin has no access to 192.168.1.52! If I am accessing https://meteo.iu3cyv.eu/weewx/ I have no access to YOUR local IP. The only way this could work is when you are accessing the skin in the same network as your Home assistant is operating. Please let me know if this helps you, you should inform yourself about the differences between Local/Private IPs vs Public IP addresses. |
hello Daveiano nothing you wrote to me is correct, |
First of all, I just re-configured my MQTT Broker to use a username & password for read access and it works. So the general implementation works.
Perhaps you configured something in weewx.conf (
I think I was not clear about this: It's not weewx, which subscribes to the MQTT broker, it's the browser (the client). Again: If I visit https://meteo.iu3cyv.eu/weewx/, my Browser will have NO access to any of your local IPs. This will only work if you visit the page in the same network as your Broker lives. |
SOrry but what is th correct skin configuration for connect without ssl? |
|
in my configuration, as you can see from the screenshots it is already at 0 but I don't understand why it connects to wss from the chrome console.. |
Could you please check if there are mqqt skin settings defined in weewx.conf? Like I said in a previous comment:
I did some research and found out that the MQTT Client first tries to connect via the specified protocol (without SSL) and if that fails it tries to connect the other option (with SSl in that case) - so it seems this is normal behaviour because the connection is failing. Any news on the IPs? My simple guess is that your broker is not reachable by the MQTT Client (Browser). |
my broker can be reached by clients. However, I'm waiting for the new version of homeassistant which will be released at the beginning of December. it seems the current one doesn't accept mqtt websocket. We see.... |
Ok, good news! Thank you! |
@wifi75 Any news on this? I would like to close this issue. Auth via username/password is included and I don't see any way I can support you further on this. |
Hello My weewx send data to my mqt tserver,
my broker have usr and password.
as skyn.conf missing line for set mqtt user and password,
in fact skyn does not connect to mqtt to collect the data and generate the gauge.
this is my mqtt sky configurazion
For instructions, see https://github.com/Daveiano/weewx-wdc/wiki/Support-for-weewx-mqtt
How should I add a user and password?
The text was updated successfully, but these errors were encountered: