Manual add-ons MQTT failed to connect to docker

Im using the guide here to try to add an addon in a home assistant core installation without supervisor or built-in addon functionality.

This might be a docker question, or it might be a front end question, im not sure yet so apologies if its in the wrong spot.

I have docker up and running as expected

CONTAINER ID   IMAGE                COMMAND                  CREATED       STATUS       PORTS     NAMES
c2172a9d4a66   ewelink_smart_home   "docker-entrypoint.s…"   8 hours ago   Up 8 hours             ewelink_smart_home

But attempting to add an MQTT instance gives “connection failed. Please enter the connection information of your MQTT broker”

The information Im entering is the local host IP or hostname and port 3000, no credentials.

The guide isnt clear to me, it implies I should use port 3000 and that it cannot be mapped (I assume changed). A status check gives this:

           "NetworkMode": "host",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "unless-stopped",
--
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
--
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "3000/tcp": {}
            },

although lsof -i tcp:3000 returns nothing.

I think docker is set up and running as expected? So it must be what Im putting in the MQTT instance setup. But there is only the IP address and port to get wrong?

Can anyone point me in the right direction please. I still learning all of this :slight_smile:

What do you mean? You jump from “running ewelink addon standalone” to “add an MQTT instance” without transition…

Well I couldn’t see any further instructions on the link, so I admit from a bit of googling I concluded I ran up the docker instance then connected to it via MQTT.

Is there a guide to help me with the missing steps? It’s a bit hard to know what I’m searching for when Im really not sure what to do with the docker instance

The ewelink guide doesn’t even mention MQTT, does it?
If you want to add MQTT to your setup without HAOS, you’d have to add an additional docker container for that.

Here is my simple docker-compose.yaml therefore:

version: '3'
services:
  mosquitto:
    container_name: mosquitto
    image: eclipse-mosquitto:2
    network_mode: bridge
    ports:
      - 1883:1883
      - 8883:8883
    volumes:
      - ./data/config:/mosquitto/config
      - ./data/data:/mosquitto/data
      - ./data/log:/mosquitto/log
    restart: unless-stopped
 

Thankyou for that. That took a while to do more reading based on your post, but I now have an MQTT instance connected to HA, thankyou.

The trouble is, I cant find any guidance on the next steps - its all very well having HA talking MQTT to mosquito, but noone is talking to the eweeLink Docker. :face_with_open_eyes_and_hand_over_mouth:

The github guide is not at all forthcoming, and assumes (probably not unreasonably) that I know what to do once it is running in Docker. The truth is, I dont and my googling isnt revealing anything :rofl:

Where did you read it suppors MQTT ?

if you want to control sonoff from HA, use