Mosquitto broker to HiveMq connection issues

I am running Mosquitto broker in Home Assistant. I had previously successfully connected a bridge to HiveMQ and was receiving the subscribed messages (visible in HiveMQ web client). I made some changes to the structure of the topics in the Mosquitto bridge config file, and it broke the connection. Now I can’t get the bridge connection working at all. Here is my current bridge .config file, along with the moquitto broker logs. Can anyone please help? It was working before I changed the topic structure in Block 3…

2026-07-04 13:35:25: Connecting bridge sa_local_inbound_stream (192.168.86.163:1883)

2026-07-04 13:35:25: Connecting bridge hm_cloud_outbound (8214ec1f1483481e933c1d9c70ced7ee.s1.eu.hivemq.cloud:8883)

2026-07-04 13:35:25: mosquitto version 2.1.2 running

2026-07-04 13:35:25: New connection from ::1:36290 on port 1883.

2026-07-04 13:35:25: Protocol error from ::1:36290: First packet not CONNECT (0A).

2026-07-04 13:35:25: Client ::1 [::1:36290] disconnected: protocol error.

[13:35:26] INFO: Successfully send discovery information to Home Assistant.

[13:35:26] INFO: Successfully send service information to the Supervisor.

Hello @andyc1

Welcome to HiveMQ Community Forum.
The issue is with the wildcard characters (#) in your Block 3 topic mappings. Mosquitto bridge topic configuration doesn’t use wildcards in the same way as MQTT topic filters.

The problem in your configuration:

topic solar_assistant/# out 0 energyos/pt/sv_2026_009/site_01/solar_assistant/ #
topic shelly/# out 0 energyos/pt/sv_2026_009/site_01/shelly/ #

Corrected configuration:

topic solar_assistant/# out 0 energyos/pt/sv_2026_009/site_01/solar_assistant/

topic shelly/# out 0 energyos/pt/sv_2026_009/site_01/shelly/

After making this change, restart your Mosquitto broker and the bridge connection to HiveMQ Cloud should work again.

We hope this helps.

Regards,
Sheetal from HiveMQ Support

Thanks for your response Sheetal, however after amending the topics in the .config file and restarting the broker, I still get the same error in the logs:

2026-07-06 10:53:39: Connecting bridge hm_cloud_outbound (8214ec1f1483481e933c1d9c70ced7ee.s1.eu.hivemq.cloud:8883)

2026-07-06 10:53:39: mosquitto version 2.1.2 running

2026-07-06 10:53:40: New connection from ::1:56758 on port 1883.

2026-07-06 10:53:40: Protocol error from ::1:56758: First packet not CONNECT (0A).

Hello Andy,

If you revert to the original topic structure (block 3) does the bridge connection work?
For more insight into your configuration, can you share the HiveMQ bridge config.xml and mosquitto.conf?

Regards,
Gil

Hi Gil,

No it doesn’t even connect when i revert back to original simple topic structure. I’m using HiveMQ Cloud, so don’t think I have a config.xml i can share with you. I’m bridging a local Mosquitto broker from inside a Home Assistant OS container to a HiveMQ Cloud tier over TLS port 8883. Here is my local bridge config file:

My HiveMQ cluster endpoint is 8214ec1f1483481e933c1d9c70ced7ee.s1.eu.hivemq.cloud

The local mosquitto error logs:

​Hello Andy,

I’m having difficulty locating your cluster through our backoffice.
Can you please provide the email address (organization owner) for cluster 8214ec1f1483481e933c1d9c70ced7ee.s1.eu.hivemq.cloud?

With your consent, I would like to create a temporary credential and test the connection from my side.

Are you able to bump up the Mosquitto logging to DEBUG to give us more logging?
​I see the connection initiated to port 8883, but nothing else is written afterwards.

Regards,
Gil

Hi Gil, email address is Andy.cocker@gmail.com I’ll get the debug logs and forward in the morning. Thanks for your assistance.

Andy

Hello Andy,​

The organization ID bound to the address Andy.cocker@gmail.com is “n0z8zi” with cluster endpoint:
b7a5fa5670d0410cb9eea1c45ec08a4b.s1.eu.hivemq.cloud
…and not ​

8214ec1f1483481e933c1d9c70ced7ee.s1.eu.hivemq.cloud

Could you please confirm?

Regards,
Gil

Hi Gil, no, the organization is Solviva and the endpoint is 8214ec1f1483481e933c1d9c70ced7ee.s1.eu.hivemq.cloud - See screengrab:

Also here are the debug logs from Mosquitto broker


[16:12:59] INFO: Starting mosquitto MQTT broker...
2026-07-10 16:12:59: Loading config file '/share/mosquitto/energyos.conf'
2026-07-10 16:12:59: Info: running mosquitto as user: root.
2026-07-10 16:12:59: Warning: Mosquitto should not be run as root/administrator.
2026-07-10 16:12:59: Restored 412 base messages
2026-07-10 16:12:59: Restored 412 retained messages
2026-07-10 16:12:59: Restored 3 clients
2026-07-10 16:12:59: Restored 1 subscriptions
2026-07-10 16:12:59: Restored 0 client messages
2026-07-10 16:12:59: mosquitto version 2.1.2 starting
2026-07-10 16:12:59: Config loaded from /etc/mosquitto/mosquitto.conf.
2026-07-10 16:12:59: Bridge support available.
2026-07-10 16:12:59: Persistence support available.
2026-07-10 16:12:59: TLS support available.
2026-07-10 16:12:59: TLS-PSK support available.
2026-07-10 16:12:59: Websockets support available.
2026-07-10 16:12:59: Loading plugin: /usr/share/mosquitto/go-auth.so
2026-07-10 16:12:59:  ├── Username/password checking enabled.
2026-07-10 16:12:59:  ├── TLS-PSK checking enabled.
2026-07-10 16:12:59:  └── Extended authentication not enabled.
2026-07-10 16:12:59: Plugin has registered to receive 'reload' events.
2026-07-10 16:12:59: Plugin has registered to receive 'basic-auth' events.
2026-07-10 16:12:59: Plugin has registered to receive 'acl-check' events.
2026-07-10 16:12:59: Plugin has registered to receive 'psk-key' events.
2026-07-10 16:12:59: Opening ipv4 listen socket on port 1883.
2026-07-10 16:12:59: Opening ipv6 listen socket on port 1883.
2026-07-10 16:12:59: Opening ipv4 listen socket on port 1884.
2026-07-10 16:12:59: Opening ipv6 listen socket on port 1884.
2026-07-10 16:12:59: Connecting bridge sa_local_inbound_stream ([192.168.86.163:1883](http://192.168.86.163:1883))
2026-07-10 16:12:59: Bridge core-mosquitto.sa_local_inbound_stream sending CONNECT
2026-07-10 16:12:59: Bridge local.core-mosquitto.hm_cloud_outbound doing local SUBSCRIBE on topic energyos/pt/sv_2026_009/site_01/solar_assistant/solar_assistant/#
2026-07-10 16:12:59: Bridge local.core-mosquitto.hm_cloud_outbound doing local SUBSCRIBE on topic energyos/pt/sv_2026_009/site_01/Shelly/Shelly/#
2026-07-10 16:12:59: Connecting bridge hm_cloud_outbound (8214ec1f1483481e933c1d9c70ced7ee.s1.eu.hivemq.cloud:8883)
2026-07-10 16:12:59: Bridge core-mosquitto.hm_cloud_outbound sending CONNECT
2026-07-10 16:12:59: mosquitto version 2.1.2 running
2026-07-10 16:12:59: Received CONNACK on connection local.core-mosquitto.sa_local_inbound_stream.
2026-07-10 16:12:59: Bridge local.core-mosquitto.sa_local_inbound_stream sending SUBSCRIBE (Mid: 64, Topic: #, QoS: 0, Options: 0x00)
2026-07-10 16:12:59: Received PUBACK from local.core-mosquitto.sa_local_inbound_stream (Mid: 63, RC:0)
2026-07-10 16:12:59: Received SUBACK from local.core-mosquitto.sa_local_inbound_stream
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/grid_charge_point_2/state', ... (1 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/time_point_5/state', ... (5 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/grid_peak_shaving_power/state', ... (5 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/max_charge_current/state', ... (2 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/battery_absorption_charge_voltage/state', ... (5 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/capacity_point_3/state', ... (2 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/battery_equalization_charge_voltage/state', ... (5 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/voltage_point_6/state', ... (5 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/grid_charge_point_4/state', ... (1 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/max_solar_power/state', ... (5 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/generator_stop_capacity/state', ... (3 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/power_point_4/state', ... (5 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/grid_voltage_high/state', ... (5 bytes))
2026-07-10 16:12:59: Received PUBLISH from local.core-mosquitto.sa_local_inbound_stream (d0, q0, r1, m0, 'solar_assistant/inverter_1/use_timer/state', ... (1 bytes))

(attachments)

Hello Andy,

Organization ID = n0z8zi is Organization name = Solviva.
This can also be verified by clicking on the Organizations button in the top left of your console:

When I login to your organization, I can only see 1 cluster:

Can you share similar screenshots when you login to cloud console and include:

  1. Organization button → Members section
  2. Cloud clusters screen

Regards,
Gil

Hi Gil, very strange; I see a different cluster than you.