Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions custom_components/meshcore/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,7 @@ async def async_step_mqtt_broker(self, user_input=None):
"owner_email": user_input.get("owner_email", ""),
"topic_status": user_input.get("topic_status", DEFAULT_MQTT_TOPIC_STATUS),
"topic_events": user_input.get("topic_events", DEFAULT_MQTT_TOPIC_EVENTS),
"ws_path": user_input.get("ws_path", "/mqtt"),
Comment thread
bplein marked this conversation as resolved.
Outdated
"iata": user_input.get("iata", legacy_global_iata),
"token_ttl_seconds": user_input.get("token_ttl_seconds", legacy_global_ttl),
"payload_mode": user_input.get("payload_mode", "packet"),
Expand Down Expand Up @@ -1134,6 +1135,7 @@ async def async_step_mqtt_broker(self, user_input=None):
): vol.All(cv.positive_int, vol.Range(min=60, max=86400)),
vol.Optional("topic_status", default=broker.get("topic_status", DEFAULT_MQTT_TOPIC_STATUS)): str,
vol.Optional("topic_events", default=broker.get("topic_events", DEFAULT_MQTT_TOPIC_EVENTS)): str,
vol.Optional("ws_path", default=broker.get("ws_path", "/mqtt")): str,
vol.Optional("iata", default=broker.get("iata", legacy_global_iata)): str,
})

Expand Down
6 changes: 5 additions & 1 deletion custom_components/meshcore/mqtt_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class BrokerConfig:
client_id_prefix: str
topic_status: str
topic_packets: str
ws_path: str = "/mqtt"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing default was / and this changes the new default to /mqtt. It might make sense to change the default to / unless we know that /mqtt is what most users are already using.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does make sense. I’ll make the change today.

@bplein bplein Jul 10, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were additional places where this incorrect default was set. Fixed and tested with 4f79a85


@property
def name(self) -> str:
Expand Down Expand Up @@ -304,6 +305,9 @@ def _load_brokers(self) -> list[BrokerConfig]:
),
iata,
),
ws_path=str(
broker_settings.get("ws_path", "/mqtt") or "/mqtt"
).strip(),
)

if broker.is_letsmesh and iata in placeholder_iata_values:
Expand Down Expand Up @@ -426,7 +430,7 @@ async def _async_create_client(self, broker: BrokerConfig):
)

if broker.transport == "websockets":
client.ws_set_options(path="/", headers=None)
client.ws_set_options(path=broker.ws_path, headers=None)

self.logger.info(
"[%s] Ready (status_topic=%s packets_topic=%s auth_token=%s)",
Expand Down