Skip to content

Support auth against an external MQTT broker #42

@f-gdovin

Description

@f-gdovin

Firstly, THANK you for this project, I am just trying to set it up.

However, since I am already running mosquitto container, I decided to use that for roborock server.
Unfortunately, it seems like no auth is supported when trying to reach external MQTT broker.

config.toml (relevant part):

[broker]
mode = "external"
# Fill this in with your existing MQTT broker hostname or IP before starting the stack.
host = "mosquitto"
port = 1883
mosquitto_binary = "mosquitto"
enable_topic_bridge = true

roborock logs:

2026-05-24 21:02:38,908 [INFO] HTTPS server listening on 0.0.0.0:555
2026-05-24 21:02:38,908 [INFO] MQTT TLS proxy listening on 0.0.0.0:8881
2026-05-24 21:02:38,908 [INFO] MQTT backend external on mosquitto:1883
2026-05-24 21:02:38,909 [INFO] [real_stack.mqtt] TLS MQTT proxy listening on 0.0.0.0:8881 -> mosquitto:1883
2026-05-24 21:02:40,846 [WARNING] [real_stack.mqtt] MQTT topic bridge error: [code:135] Not authorized (retrying in 2.0s)

mosquitto logs:

1779656643: New connection from 172.18.0.81:60305 on port 1883.
1779656643: Client auto-C1A46807-624D-DBCE-862F-51B7E39A5D60 [172.18.0.81:60305] disconnected: not authorised.
1779656645: New connection from 172.18.0.81:44025 on port 1883.
1779656645: Client auto-D5DDD1E8-8D54-FA09-6851-1F0C0EFDF600 [172.18.0.81:44025] disconnected: not authorised.
1779656647: New connection from 172.18.0.81:45933 on port 1883.
1779656647: Client auto-5D5FC5BA-4238-62C4-06F9-6D74804454DD [172.18.0.81:45933] disconnected: not authorised.

See mosquitto's docs on auth here

It would be amazing if this project allowed us to send (at least) username and password with talking to an external MQTT broker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions