Skip to content

Fix HTTP state reconciliation when MQTT is active - #661

Open
dhia-e-rzig wants to merge 1 commit into
krahabb:devfrom
dhia-e-rzig:fix/http-mqtt-state-reconciliation
Open

Fix HTTP state reconciliation when MQTT is active#661
dhia-e-rzig wants to merge 1 commit into
krahabb:devfrom
dhia-e-rzig:fix/http-mqtt-state-reconciliation

Conversation

@dhia-e-rzig

Copy link
Copy Markdown

Summary

  • keep periodic Appliance.System.All polling active when HTTP is the selected protocol, even if an auxiliary MQTT connection is receiving pushes
  • preserve polling suppression when MQTT is both selected and active
  • add an MSG200 regression test for reconciling a missed per-channel garage-door push

Root cause

NamespaceHandler.async_poll_all() used _mqtt_active alone to decide that all state updates would arrive by push. With HTTP selected and cloud MQTT connected, a dropped or incomplete multi-channel push therefore disabled the HTTP reconciliation path too. One MSG200 channel could remain stale indefinitely even though a direct Appliance.System.All response contained the correct state.

The guard now checks both curr_protocol and _mqtt_active, so HTTP remains the authoritative polling transport while MQTT can still provide low-latency auxiliary pushes.

Related context: #538

Tests

  • pytest tests/test_config_entry.py::test_device_http_poll_with_mqtt_active -q
  • pytest tests/test_config_entry.py -q
  • full CI suite: 36 passed
  • black --check on changed files

@krahabb krahabb added the todo This item needs processing label Aug 24, 2026
@krahabb

krahabb commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Hello @dhia-e-rzig,
Thank you for submitting this. Allow me to regain focus on meross_lan development since I was a bit off for some time ;)
I'll check this asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

todo This item needs processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants