Skip to content
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

Bug: MQTT connection issue #213

Open
flamestsui opened this issue Dec 31, 2024 · 5 comments
Open

Bug: MQTT connection issue #213

flamestsui opened this issue Dec 31, 2024 · 5 comments
Labels
bug Something isn't working triage More information is required / ongoing investigation

Comments

@flamestsui
Copy link

Snipaste_2024-12-31_14-19-02
Snipaste_2024-12-31_14-19-23

use: homeassistant.local is ok

log:2024-12-31 14:15:23.697 +08:00 [FTL] [MQTT] Error while connecting: Error while authenticating. Connection closed.
MQTTnet.Adapter.MqttConnectingFailedException: Error while authenticating. Connection closed.
---> MQTTnet.Exceptions.MqttCommunicationException: Connection closed.
at MQTTnet.Client.MqttClient.Authenticate(IMqttChannelAdapter channelAdapter, MqttClientOptions options, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at MQTTnet.Client.MqttClient.Authenticate(IMqttChannelAdapter channelAdapter, MqttClientOptions options, CancellationToken cancellationToken)
at MQTTnet.Client.MqttClient.ConnectInternal(IMqttChannelAdapter channelAdapter, CancellationToken cancellationToken)
at MQTTnet.Client.MqttClient.ConnectAsync(MqttClientOptions options, CancellationToken cancellationToken)
at MQTTnet.Client.MqttClient.ConnectAsync(MqttClientOptions options, CancellationToken cancellationToken)
at MQTTnet.Extensions.ManagedClient.ManagedMqttClient.ReconnectIfRequiredAsync(CancellationToken cancellationToken)
2024-12-31 14:15:23.701 +08:00 [WRN] [MQTT] Disconnected: UnspecifiedError
2024-12-31 14:17:27.847 +08:00 [INF] [HASS_API] Server recovered from failed state

@flamestsui flamestsui added the bug Something isn't working label Dec 31, 2024
@amadeo-alex amadeo-alex added the triage More information is required / ongoing investigation label Dec 31, 2024
@amadeo-alex amadeo-alex changed the title Bug:MQTT Bug Bug: MQTT connection issue Dec 31, 2024
@amadeo-alex
Copy link
Collaborator

Hello, this looks like the mqtt broker dropping the connection - not sure why though.

use: homeassistant.local is ok

can you elaborate on this?

@flamestsui
Copy link
Author

use: homeassistant.local is ok
but use dsm.xxx.xxx is not ok
use python mqtt to ha is ok,but app is fail

@flamestsui
Copy link
Author

In the settings, set it to homeassistant.local and it can be used normally.
However, if the IP is set to the domain name (the domain name points to the same point), it will not work.
The same domain name can be submitted to HA using MQTT using Python, but the App cannot.

@amadeo-alex
Copy link
Collaborator

Does it also work in HASS.Agent if you put plain IP in the "Broker IP Address or Hostname" field?

@flamestsui
Copy link
Author

No way either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage More information is required / ongoing investigation
Projects
None yet
Development

No branches or pull requests

2 participants