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

MqttClientWrapper: An error occured while connecting to MQTT broker. Retrying in 5 seconds. #69

Open
antonhagg opened this issue Nov 29, 2023 · 4 comments
Assignees

Comments

@antonhagg
Copy link

Trying to connect to Beebotte that I use as a broker, but it seems to be an issue. Has anyone else testet this broker?

"INFO: 2023-11-29 14:40:30.605198: MqttClientWrapper: Creating MQTT client with mqtt.beebotte.com:8883 listening on leaf/test."
"INFO: 2023-11-29 14:40:30.607382: MqttClientWrapper: Connecting..."
"WARNING: 2023-11-29 14:40:43.403963: MqttClientWrapper: An error occured while connecting to MQTT broker. Retrying in 5 seconds."

@antonhagg
Copy link
Author

This is also in the logs.
"INFO: 2023-11-29 15:02:25.734287: MqttClientWrapper: mqtt-client::NoConnectionException: The maximum allowed connection attempts ({3}) were exceeded. The broker is not responding to the connection request message (Missing Connection Acknowledgement?"

"FINEST: 2023-11-29 15:02:25.734327: MqttClientWrapper: #0 SynchronousMqttServerConnectionHandler.internalConnect (package:mqtt_client/src/connectionhandling/server/mqtt_client_synchronous_mqtt_server_connection_handler.dart:116)"

@antonhagg
Copy link
Author

I have done some testing today and it seems this is related to SSL/TLS that is not supported as far as I can see.
Would it be possible to add support for SSL. Se here for an example: https://github.com/shamblett/mqtt_client/blob/master/example/mqtt_server_client_secure.dart

@abstarkeys
Copy link

@antonhagg I get the same error as you. Did you find a way to make it work?

@abstarkeys
Copy link

I was able to fix the problem by creating a new HA user, and putting the credentials of this user into the MQTT_USERNAME and MQTT_PASSWORD configuration fields of leaf2MQTT.

Now I get this error: "An error occured while logging in. Please make sure you have selected the right LEAF_TYPE, LEAF_USERNAME and LEAF_PASSWORD.". From what i could find, this is because i have a Canadian 2023 Leaf which isn't supported by this add-on.. I emailed Nissan to ask them to open their API to Canadians, but I doubt it will ever work..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants