MQTT publisher::spawn is never callled.#870
Open
Yesuah wants to merge 3 commits into
Open
Conversation
…led from main.rs. args.mqtt is never read. Fix adds the channel, wires broadcast_tick_task, and spawns the publisher on startup.
main.rs has its own Args struct separate from the library's cli::Args. MqttConfig::from_args() expects the library type so calling it with the local type caused a type mismatch. Fix adds all MQTT fields to the local Args and constructs MqttConfig inline in the spawn block.
broadcast_tick_task only runs for esp32 source. simulate source uses simulated_data_task which never sent to vitals_tx, so MQTT state topics never received messages and all entities stayed unknown in HA.
Owner
|
Thanks for catching this — your diagnosis was correct at the time this PR was opened: the MQTT publisher was implemented but not spawned. Triage update: this is now resolved on
Because of that, this PR's diff (which targets the older flat Recommend closing as superseded by #872. Appreciate the clear write-up — it matched the root cause exactly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MQTT publisher is fully implemented but publisher::spawn is never called from main.rs. args.mqtt is never read. Fix adds the channel, wires broadcast_tick_task, and spawns the publisher on startup.