esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

MQTT messages may be silently discarded instead of being published #2009

Open smurfix opened 3 years ago

smurfix commented 3 years ago

Operating environment/Installation (Hass.io/Docker/pip/etc.):

Linux, Debian Bullseye, venv

ESP (ESP32/ESP8266, Board/Sonoff):

Sonoff S20

ESPHome version (latest production, beta, dev branch)

dev

Affected component:

https://www.home-assistant.io/docs/mqtt/

Description of problem: When I publish multiple MQTT messages, some are silently discarded.

Inserting a delay fixes the problem.

Problem-relevant YAML-configuration entries:

esphome:
  on_boot:
    then:
    - delay: 5s
    - mqtt.publish_json: …
    - mqtt.publish_json: …
    - mqtt.publish_json: …
    - mqtt.publish_json: …

Of these four messages (fairly large ones, but then the ESP8266 has enough memory, 55% free) only two are transmitted.

Logs (if applicable):

No logs, mqtt debug doesn't report anything. Specifically it doesn't report discarding any messages.

Additional information and things you've tried:

Workaround: Add a delay between these messages. But that's not a long-term solution as I suspect that the problem may show up in other contexts.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

smurfix commented 3 years ago

Well, the problem hasn't been fixed …

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.