Help an idiot trying to set up MQTT

hi all,

ok first off… I have no idea what I am doing… ive tried to follow a few youtube videos tried to follow the documentation on mqtt and i am even more lost now than i was before…

i’m trying to set up mqtt to recieve data from a multi sensor but first i want to set up the mqtt broker ( i think) and see that its working then i’ll work on the rest… can anyone help?

i’ve added the following to my Config.yaml

mqtt:
  broker: localhost
  port: 1883
  client_id: home-assistant-1 
  username: !secret mqtt_username
  password: !secret mqtt_password

and installed the Mosquitto broker from the hasio add on store with the following settings (username and password removed)

{
  "logins": [
    {
      "username": "username",
      "password": "password"
    }
  ],
  "anonymous": true,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

but thats as far as i can get

any help is greatly accepted

thank you

What is your question?

how do i get this working?

What makes you think it is not working?

that’s a fair point, i have no idea. how do i test that?

Try installing MQTT Lens from the chrome app store and you can the see what’s going on, if anything, with your Mosquito.

Have you been through these instructions?

yeah been though that, and it totally lost me

i’ll give that a try, if I can work it out

ok,

i’ve installed MQTTlens and played with it…

when i go into the MQTT broker and look at the log i see the following…

1547495488: Socket error on client <unknown>, disconnecting.
1547495491: New connection from 192.168.0.25 on port 1883.
1547495491: New client connected from 192.168.0.25 as lens_bMxMmdU4i2uHWuGP0Rmm7WW8MTV (c1, k120).
1547495493: New connection from 192.168.0.40 on port 1883. [ERROR] Auth error with multisensor1 1547495494: Socket error on client <unknown>, disconnecting.
1547495499: New connection from 192.168.0.40 on port 1883. [ERROR] Auth error with multisensor1

so i guess its working… ??

whats the errors though?

If you can publish and subscribe to topics and see data using Lens, it’s working.

Based on the IP address, it’s a different device trying to talk to MQTT but doesn’t have the user/pass set properly.