Cannot Configure MQTT in HA: "Failed to call service mqtt/publish. Service not found."

I have mosquito installed via Brew on Mac. I don’t have access to the add-ons for the HA MQTT broker… so I have been trying to configure it manually.

I’m able to control the switch from the command line through MQTT.

When I attempt to publish a packet, in developer tools, I get the “service not found” message.

My configuration.yaml contains:
broker: (I’ve tried localhost, too) These settings work in command line.
port: 1883
discovery: true

I tried to add switch manually (it doesn’t appear anywhere in the HA UI)

  • platform: mqtt
    name: “Test 1”
    command_topic: “sonoff/cmnd/test1/POWER”
    state_topic: “sonoff/stat/test1/POWER”
    payload_on: “ON”
    payload_off: “OFF”
    retain: true

Mosquitto.conf: added the following lines:
user homeassistant
topic readwrite #

I suspect it could be an ACL`s issue that would be resolved with the MQTT Broker Add-on.

I found the following in the HA DeveloperTools log: “Config entry for mqtt not ready yet.”

Help appreciated!

So you added mosquitto manually ?

Did you reboot after adding mqtt to configuration.yaml ?

Is your indentation correct ? Something like :

  port: 1883
  discovery: true
  discovery_prefix: homeassistant
  username: xxx
  password: xxx

Thanks, Francis. I mistyped “user” for “username”. All resolved.

But, I forgot my HA password and am now trying to get it reinstalled…