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

fix streaming logs from MQTT for ESP32 devices using TLS #6605

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

ccutrer
Copy link
Contributor

@ccutrer ccutrer commented Apr 22, 2024

What does this implement/fix?

esphome logs --device MQTT (and via the ESPHome web dashboard) would just continuously output INFO Successfully reconnected to the MQTT server over and over again for ESP32 devices using TLS to connect to MQTT, without actually connecting or streaming logs from the device.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

esphome:
  name: my_device
  friendly_name: "My Device"

esp32:
  board: esp32dev
  framework:
    type: esp-idf

logger:
  level: INFO

mqtt:
  broker: !secret mqtt_broker
  port: 8883
  username: esphome
  password: !secret mqtt_password
  discovery_unique_id_generator: mac
  topic_prefix: esphome/$name
  certificate_authority: !secret mqtt_ca_cert

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@ccutrer ccutrer requested a review from a team as a code owner April 22, 2024 20:52
@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 53.43%. Comparing base (4d8b5ed) to head (93fb3f7).
Report is 425 commits behind head on dev.

Files Patch % Lines
esphome/mqtt.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #6605      +/-   ##
==========================================
- Coverage   53.70%   53.43%   -0.28%     
==========================================
  Files          50       50              
  Lines        9408     9537     +129     
  Branches     1654     1685      +31     
==========================================
+ Hits         5053     5096      +43     
- Misses       4056     4132      +76     
- Partials      299      309      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jesserockz jesserockz added this to the 2024.4.1 milestone Apr 22, 2024
@jesserockz jesserockz merged commit 7c893aa into esphome:dev Apr 22, 2024
55 checks passed
@ccutrer ccutrer deleted the mqtt-esp32-tls-logs branch April 22, 2024 22:16
@jesserockz jesserockz mentioned this pull request Apr 22, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants