Newbie - integrating MQTT sensors

Hello,

I’ve just installed HASS on RPi 3 in order to manage some devices at home. I used the pre-built image, set up a static IP and can access HASS.

I also installed Mosquitto brocker add-on and tried to use it with an existing MQTT sensor I have. Here are the broker options:

> certfile: fullchain.pem
> customize:
>   active: false
>   folder: mosquitto
> keyfile: privkey.pem
> logins: []
> require_certificate: false

When I try using the broker from another pc with mosquitto_pub and mosquitto_sub, nothing happens. I can’t see a message going through, even though the mosquitto_pub command says it’s connecting OK.

After that I tried adding a sensor in configuration.yaml:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

sensor:  
    - platform: mqtt
      name: "sdm120voltage"
      state_topic: "sdm120/voltage"
          
    - platform: mqtt
      name: "sdm120current"
      state_topic: "sdm120/current"
      
    - platform: mqtt
      name: "sdm120totalenergy"
      state_topic: "sdm120/totalenergy"

I can then add these sensors to the dashboard, but no matter what and how I publish something to the topics above, I don’t see any messages.

Is there some setting I need to allow on the Mosquitto add-on so that it will rely the messages? I’ve been wrestling with that for hours and don’t know what else to try. When I use another Mosquitto broker for my sensors, they work fine.

Thanks