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

ESP-IDF mqtt uses secured connection by default? #5788

Open
MGWGIT opened this issue May 14, 2024 · 1 comment
Open

ESP-IDF mqtt uses secured connection by default? #5788

MGWGIT opened this issue May 14, 2024 · 1 comment

Comments

@MGWGIT
Copy link

MGWGIT commented May 14, 2024

The problem

I try to send unsecured mqtt message to my broker, but receive esp-idf errors caused tls connection fails.

Why tls error occured for insecure publish? [E][mqtt.idf:162]: Last error code reported from esp-tls: 0x8008

Which version of ESPHome has the issue?

2024.4.2

What type of installation are you using?

Docker

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP32-IDF

Board

No response

Component causing the issue

mqtt

Example YAML snippet

esphome:
    name: esp-xxx
    platformio_options:
      board_build.flash_mode: dio

esp32:
  board: esp32-s3-devkitc-1
  flash_size: 4MB
  framework:
    type: esp-idf
    sdkconfig_options:
      COMPILER_OPTIMIZATION_SIZE: y
    advanced:
      ignore_efuse_mac_crc: false
  variant: esp32s3

mqtt:
  broker: "iot.fr-par.scw.cloud"
  port: 1883
  username: "my_user_id"
  password: ""
  topic_prefix: "test"
  skip_cert_cn_check: true

Anything in the logs that might be useful for us?

[14:09:41][V][mqtt.idf:119]: Event dispatched from event loop event_id=7
[14:09:41][V][mqtt.idf:122]: MQTT_EVENT_BEFORE_CONNECT
[14:09:42][V][esp-idf:000]: E (206625) MQTT_CLIENT: mqtt_message_receive: transport_read() error: errno=128
[14:09:42]
[14:09:42][V][esp-idf:000]: E (206628) MQTT_CLIENT: esp_mqtt_connect: mqtt_message_receive() returned -1
[14:09:42]
[14:09:42][V][esp-idf:000]: E (206629) MQTT_CLIENT: MQTT connect failed
[14:09:42]
[14:09:42][V][mqtt.idf:119]: Event dispatched from event loop event_id=0
[14:09:42][E][mqtt.idf:160]: MQTT_EVENT_ERROR
[14:09:42][E][mqtt.idf:162]: Last error code reported from esp-tls: 0x8008
[14:09:42][E][mqtt.idf:163]: Last tls stack error number: 0x0
[14:09:42][E][mqtt.idf:165]: Last captured errno : 0 (Success)
[14:09:42][V][mqtt.idf:119]: Event dispatched from event loop event_id=2
[14:09:42][V][mqtt.idf:131]: MQTT_EVENT_DISCONNECTED
[14:09:42][W][mqtt:323]: MQTT Disconnected: TCP disconnected.
[14:09:42][I][mqtt:234]: Connecting to MQTT...
[14:09:42][V][esp-idf:000]: I (206640) MQTT_CLIENT: Client asked to disconnect

Additional information

No response

@MGWGIT
Copy link
Author

MGWGIT commented May 14, 2024

Is it because set(CONFIG_MQTT_TRANSPORT_SSL "y") in cmake?

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

1 participant