homie-esp8266 icon indicating copy to clipboard operation
homie-esp8266 copied to clipboard

Error with SSL Mosquitto connection

Open seineken opened this issue 4 years ago • 1 comments

I'm getting an error when activated the SSL with Let's Encrypt in the Mosquitto broker.

This is the log from the device:

✖ /homie/config.json doesn't exist Configuration invalid. Using CONFIG MODE Configuration mode started �💡 Firmware growtth-nanny (1.0. �🔌 Booting innto config mode Device ID is ecfabc6e221c AP started as GN-ecfabc6e221c with IP 192.168.123.1 Triggering Wi-Fi scan... ✔ Wi-Fi scan completed Triggering Wi-Fi scan... ✔ Wi-Fi scan completed Triggering Wi-Fi scan... ✔ Wi-Fi scan completed Received captive portal request: Redirect: http://192.168.123.1 Received captive portal request: Redirect: http://192.168.123.1 Received captive portal request: Redirect: http://192.168.123.1 Received captive portal request: UI bundle found Triggering Wi-Fi scan... Received captive portal request: Redirect: http://192.168.123.1 ✔ Wi-Fi scan completed Received captive portal request: UI bundle found Received captive portal request: Redirect: http://192.168.123.1 Received captive portal request: Redirect: http://192.168.123.1 Received heart request Received device information request Received captive portal request: Redirect: http://192.168.123.1 Received captive portal request: Redirect: http://192.168.123.1 Received captive portal request: Redirect: http://192.168.123.1 Received captive portal request: UI bundle found Received captive portal request: UI bundle found Received networks request Triggering Wi-Fi scan... ✔ Wi-Fi scan completed Received config request ✔ Configured ↻ Rebooting into normal mode... ����L��D���

Normal mode started �💡 Firmware growth-nanny (1.0. �🔌 Booting into normal moode {} Stored configuration • Hardware device ID: ecfabc6e221c • Device ID: ecfabc6e221c • Name: Veg • Device Stats Interval: 60 sec • Wi-Fi: ◦ SSID: ******* ◦ Password not shown • MQTT: ◦ Host: *********** ◦ Port: 8883 ◦ Base topic: devices/ ◦ Auth? yes ◦ Username: ***** ◦ Password not shown • OTA: ◦ Enabled? yes • Custom settings: ◦ readInterval: 5 (set) ↕ Attempting to connect to Wi-Fi... ✖ Wi-Fi disconnected, reason: 4 Triggering WIFI_DISCONNECTED event... Wi-Fi disconnected, reason: 4 ↕ Attempting to connect to Wi-Fi... ✔ Wi-Fi connected, IP: 192.168.1.5 Triggering WIFI_CONNECTED event... Wi-Fi connected, IP: 192.168.1.5, gateway: 192.168.1.254, mask: 255.255.255.0 ↕ Attempting to connect to MQTT... ↕ Attempting to connect to MQTT... ↕ Attempting to connect to MQTT... ↕ Attempting to connect to MQTT... ↕ Attempting to connect to MQTT... ↕ Attempting to connect to MQTT... ↕ Attempting to connect to MQTT... ↕ Attempting to connect to MQTT... ↕ Attempting to connect to MQTT... ↕ Attempting to connect to MQTT... ↕ Attempting to connect to MQTT... ↕ Attempting to connect to MQTT...

This is the log from Mosquitto broker:

1590086726: Client connection from 179.13.148.144 failed: error:1408F10B:SSL routines:ssl3_get_record:wrong version number. 1590086727: Client connection from 179.13.148.144 failed: error:1408F10B:SSL routines:ssl3_get_record:wrong version number. 1590086731: Client connection from 179.13.148.144 failed: error:1408F10B:SSL routines:ssl3_get_record:wrong version number. 1590086739: Client connection from 179.13.148.144 failed: error:1408F10B:SSL routines:ssl3_get_record:wrong version number. 1590086754: Client connection from 179.13.148.144 failed: error:1408F10B:SSL routines:ssl3_get_record:wrong version number. 1590086777: Client connection from 179.13.148.144 failed: error:1408F10B:SSL routines:ssl3_get_record:wrong version number. 1590086813: Client connection from 179.13.148.144 failed: error:1408F10B:SSL routines:ssl3_get_record:wrong version number.

I'm using Homie 3.0.0

This is my platformio.ini

[env:nodemcuv2] platform = espressif8266 board = nodemcuv2 framework = arduino build_flags = -D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY lib_deps = https://github.com/homieiot/homie-esp8266.git#develop

seineken avatar May 21 '20 18:05 seineken

It looks like you haven't enabled SSL. You need to set the flag ASYNC_TCP_SSL_ENABLED.

mkfrey avatar May 28 '20 09:05 mkfrey