Mosquitto broker - no topic "homeassistant"

Hallo everybody.
I’m new to homeassistant and now getting HA working for the first time.
HA is running on a fresh install on a raspberry 3.

To get my openWB communicating with HA, I plan to setup mosquitto broker-AddOn.
The AddOn is installed and working (for what I can see). But my problem now is, that obviously the broker does not receive any topics from HA. For testing I used the tool MQTT-Explorer. I can connect to the HA via a seperatly configured user “mqtt-user”. But the tool only shows $SYS as a topic and not as expected also an “homeassistant”. So I concluded that the communication does not work properly!

The startup-protcoll of the addon is the follwing:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/mosquitto.sh
[23:53:53] INFO: Setting up user mqtt-user
[23:53:55] INFO: SSL is not enabled
cont-init: info: /etc/cont-init.d/mosquitto.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[23:53:58] INFO: Starting NGINX for authentication handling…
[23:53:59] INFO: Starting mosquitto MQTT broker…
2023-10-27 23:53:59: Warning: Mosquitto should not be run as root/administrator.
2023-10-27 23:53:59: mosquitto version 2.0.17 starting
2023-10-27 23:53:59: Config loaded from /etc/mosquitto/mosquitto.conf.
2023-10-27 23:53:59: Loading plugin: /usr/share/mosquitto/go-auth.so
2023-10-27 23:53:59: ├── Username/password checking enabled.
2023-10-27 23:53:59: ├── TLS-PSK checking enabled.
2023-10-27 23:53:59: └── Extended authentication not enabled.
2023-10-27 23:53:59: Opening ipv4 listen socket on port 1883.
2023-10-27 23:53:59: Opening ipv6 listen socket on port 1883.
2023-10-27 23:53:59: Opening websockets listen socket on port 1884.
2023-10-27 23:53:59: mosquitto version 2.0.17 running
2023-10-27 23:54:01: New connection from 127.0.0.1:39282 on port 1883.
2023-10-27 23:54:01: Client disconnected due to protocol error.
[23:54:04] INFO: Successfully send discovery information to Home Assistant.
[23:54:06] INFO: Successfully send service information to the Supervisor.

By the way: the communication to my openWB works flawless.

Any ideas, how to get this issue solved?

Thanks an greetings!
gwath

I don’t think you’re having an issue. HA doesn’t send anything to MQTT by default, it only listens. If all you did was setup the broker and have nothing sending information to it, you won’t see anything except for $SYS. The next step would seem to be to get openWB to send the needed information to MQTT. I know nothing about openWB, but I did find this post where someone got it working with HA through MQTT. Maybe this will help you (if you haven’t seen it already):

Thanks for your reply…
I will have a look at this way… It’s a variety to the way I wanted to. Here’s the (german) guide I used: https://tech-engineering.de/home-assistant-und-openwb/

If the broker was working correctly, why does it not use the mosquitto.conf that I put to /share/mosquitto.
The broker is configurated like this:

logins:
  - username: mqtt-user
    password: myPW
require_certificate: false
certfile: fullchain.pem
keyfile: privkey.pem
customize:
  active: true
  folder: mosquitto

and the /share/msoquitto/mosquitto.conf is

connection openwb
address 192.168.178.40:1883
start_type automatic
topic openWB
local_clientid openwb.mosquitto
try_private false
cleansession true

As you can see in my fist post configuration is only loaded from /etc/mosquitto

2023-10-27 23:53:59: Config loaded from /etc/mosquitto/mosquitto.conf.

You are better to setup a home assistant user rather than within the addon. As the docs say

Create a new user for MQTT via your Home Assistant’s frontend SettingsPeopleUsers , (i.e. not on Mosquitto’s Configuration tab). Notes:

  1. This name cannot be homeassistant or addons, those are reserved usernames.
  2. If you do not see the option to create a new user, ensure that Advanced Mode is enabled in your Home Assistant profile.

Hey.
I did create a new user called “mqtt-user”.

Then you shouldn’t include logins: in your yaml.