LordMike / MBW.BlueRiiot2MQTT

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

Error while connecting with server #8

Closed HAjerry closed 4 years ago

HAjerry commented 4 years ago

Hi, many thanks for developing this! Seems like much better solution than using IFTTT. However, cannot get it to work. I have attached the log file below. Please let me know if you can say what's wrong?

`$ sudo docker run -d -e MQTTServer=192.168.1.127 -e BlueRiiotUsername=[MyUser] -e BlueRiiotPassword=[MyPassword] -e LoggingMinimumLevelDefault=Verbose -e LoggingMinimumLevelOverrideMBW.Client.BlueRiiotApi=Verbose lordmike/blueriiot2mqtt:latest````

$ sudo docker logs a4a5f901cd1d [2020-06-04 19:41:59+00:00 DBG] [Microsoft.Extensions.Hosting.Internal.Host] Hosting starting [2020-06-04 19:41:59+00:00 VRB] [MBW.BlueRiiot2MQTT.HASS.HassMqttSensor] Setting device property name to BlueRiiot2MQTT, for blueriiot2mqtt_status [2020-06-04 19:41:59+00:00 VRB] [MBW.BlueRiiot2MQTT.HASS.HassMqttSensor] Setting device property sw_version to 0.2.2, for blueriiot2mqtt_status [2020-06-04 19:41:59+00:00 VRB] [MBW.BlueRiiot2MQTT.HASS.HassMqttSensor] Setting attribute started to 06/04/2020 19:41:59, for blueriiot2mqtt_status [2020-06-04 19:41:59+00:00 VRB] [MBW.BlueRiiot2MQTT.HASS.HassMqttSensor] Adding device identifier blueriiot2mqtt for blueriiot2mqtt_status [2020-06-04 19:41:59+00:00 VRB] [MqttNet.MqttClient] Trying to connect with server '192.168.1.127:1883' (Timeout=00:00:10). [2020-06-04 19:41:59+00:00 DBG] [MBW.BlueRiiot2MQTT.Service.BlueRiiotMqttService] Beginning update [2020-06-04 19:42:00+00:00 INF] [Microsoft.Hosting.Lifetime] Application started. Press Ctrl+C to shut down. [2020-06-04 19:42:00+00:00 INF] [Microsoft.Hosting.Lifetime] Hosting environment: Production [2020-06-04 19:42:00+00:00 INF] [Microsoft.Hosting.Lifetime] Content root path: /app [2020-06-04 19:42:00+00:00 DBG] [Microsoft.Extensions.Hosting.Internal.Host] Hosting started [2020-06-04 19:42:02+00:00 ERR] [MqttNet.MqttClient] Error while connecting with server. MQTTnet.Exceptions.MqttCommunicationException: Host is unreachable [::ffff:192.168.1.127]:1883 `

HAjerry commented 4 years ago

I managed to solve my problem. I was missing --network host when starting the docker. Think good idea to add this to the CLI section in the readme file

LordMike commented 4 years ago

Awesome you solved it. :)