LordMike / MBW.BlueRiiot2MQTT

Utility to map between Blue Riiots pool API, and Home Assistant MQTT
47 stars 2 forks source link

Error while connecting with the server #90

Closed rvannunen closed 10 months ago

rvannunen commented 10 months ago

Hello,

I have installed HASS Add On to use BlueRiiot2MQTT. However, I get an error message, but I don't understand where I did a mistake. Here is the error that I get in the log in home assistant:

[21:19:37 INF] Loading extra config file at /data/options.json [21:19:41 INF] Started [21:19:42 INF] Application started. Press Ctrl+C to shut down. [21:19:42 INF] Hosting environment: Production [21:19:42 INF] Content root path: /app [21:19:45 ERR] Error while connecting with server. MQTTnet.Exceptions.MqttCommunicationException: Name does not resolve ---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name does not resolve at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Threading.Tasks.ValueTask.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state) --- End of stack trace from previous location --- at MQTTnet.Implementations.CrossPlatformSocket.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) at MQTTnet.Implementations.MqttTcpChannel.ConnectAsync(CancellationToken cancellationToken) at MQTTnet.Internal.MqttTaskTimeout.WaitAsync(Func2 action, TimeSpan timeout, CancellationToken cancellationToken) at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken) --- End of inner exception stack trace --- at MQTTnet.Adapter.MqttChannelAdapter.WrapException(Exception exception) at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken) at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken) [21:19:45 INF] Disconnected. [21:19:49 INF] Discovered new pool, 'Vignerolles' (82f2ef4d-4864-4ba9-b32c-80fd3140d94c) [21:19:49 INF] Delaying till next check on pool 'Vignerolles', at 10/03/2023 22:19:49, waiting 01:00:50.9922257 [21:19:51 INF] New data ready for pool 'Vignerolles' at 10/03/2023 22:13:21 (interval 01:12:00). Waiting 00:54:40.6297092 [21:19:51 INF] Pushed 13 discovery documents, 17 values and 19 attribute changes [21:19:51 INF] Pushed 8 discovery documents, 18 values and 19 attribute changes [21:19:54 ERR] Error while connecting with server. MQTTnet.Exceptions.MqttCommunicationException: Name does not resolve ---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name does not resolve at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Threading.Tasks.ValueTask.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state) --- End of stack trace from previous location --- at MQTTnet.Implementations.CrossPlatformSocket.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) at MQTTnet.Implementations.MqttTcpChannel.ConnectAsync(CancellationToken cancellationToken) at MQTTnet.Internal.MqttTaskTimeout.WaitAsync(Func2 action, TimeSpan timeout, CancellationToken cancellationToken) at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken) --- End of inner exception stack trace --- at MQTTnet.Adapter.MqttChannelAdapter.WrapException(Exception exception) at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken) at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken) [21:19:54 INF] Disconnected.

And then again the same error every few seconds. Can you please say me what I did wrong? I double checked my configuration but I am not able to see what's wrong.

Thanks in advance

rvannunen commented 10 months ago

Hello,

I found the error. I was putting mqtt:// before the mqtt server. Everything is working correctly now, I get the values from my pool. Thanks a lot for your great work.