Home Assistant Community Add-on: MQTT Server & Web client

Interesting, it should work with the mosquitto addon installed?

Yes, it will work with any WS enabled broker.

Interesting!!

To clarify this runs its own broker too right ??

Could I use this to have two brokers?

(One locally with no auth and this one running on a different port, open to the world with with enabled )

Congrats on the new add-on! Very nice addition of the HiveMQ web client.
Just installed and tested, it works.

I could not find it in the docs, but is there a way to make the fields in the web client persistent?
When I change screens now and return, all fields are empty again and I need to re-logon the server.
Although I love the addition of it, this behavior makes the web client not that useful.

By default it runs it’s own broker, but you can disable that in this add-on :slight_smile:
Yes you can have two, just make sure they uses different ports.

By upping the the value for “Keep alive” (default 60) in the UI it should stay alive longer :slight_smile:

Ah thanks, that helps. It’s a case of ‘as designed’ I guess.
:wink:

[EDIT]
This does not solve the issue of going to some other screen however. Even when you go back within the keep alive time frame, all fields are emptied and you need to setup a connection again.

Just installed but it won’t start, nothing in the log (no log)

That is wierd, I have had my window in the background for hours at the time.
Are you using this with the broker it came with?

if so can you activate debug logging and open an issue for it on GitHub?
https://github.com/hassio-addons/addon-mqtt

Most likely you have something else running on one of the ports.
Check the hassio system log :slight_smile:

its not showing up in the add-on store for me :((

Check the Hassio system log (Hass.io panel → system) it might contain valuable information on this.

Yes, I use the included broker.
When opening the web client in a separate browser tab, it stays connected ok. The behavior I described is when using the iframe integration.

I will test some more tomorrow and open an issue when needed. Going to get some sleep first.

1 Like

Refreshing the store (top right icon) helps!

1 Like

18-09-26 21:37:35 INFO (SyncWorker_13) [hassio.docker.interface] Clean hassioaddons/mqtt docker application
18-09-26 21:37:35 ERROR (SyncWorker_13) [hassio.docker] Can’t start addon_a0d7b954_mqtt: 500 Server Error: Internal Server Error (“driver failed programming external connectivity on endpoint addon_a0d7b954_mqtt (ffdaa59c662ae98ef1eb7fb5f9673144d1ec37077d4c2af08da2aa5b8c1fa699): Bind for 0.0.0.0:1884 failed: port is already allocated”)
18-09-26 21:38:39 INFO (SyncWorker_15) [hassio.docker.interface] Clean hassioaddons/mqtt docker application
18-09-26 21:38:40 ERROR (SyncWorker_15) [hassio.docker] Can’t start addon_a0d7b954_mqtt: 500 Server Error: Internal Server Error (“driver failed programming external connectivity on endpoint addon_a0d7b954_mqtt (4287d80d59602da7749a9c5de94a2288736e30b2bcd8d681e6531bed7ef74691): Bind for 0.0.0.0:1884 failed: port is already allocated”)
18-09-26 21:40:56 INFO (SyncWorker_0) [hassio.docker.interface] Clean hassioaddons/mqtt docker application
18-09-26 21:40:57 ERROR (SyncWorker_0) [hassio.docker] Can’t start addon_a0d7b954_mqtt: 500 Server Error: Internal Server Error (“driver failed programming external connectivity on endpoint addon_a0d7b954_mqtt (87516794ea474dcd01499acbd3842f66390ec01ccfc6d81dcc4990f250755e7d): Bind for 0.0.0.0:1884 failed: port is already allocated”)

But I set the part with the broker all to false (I just want to use mosquitto addon server and just check topics

You have another add-on using this port (probably another mqtt addon)
Even if you set the broker part to false you also need to change the ports under the configuration to something else.

Ok done that. It starts but when opening the web ui I received this

I see in the background that you are using 1883 that is usually an mqtt port,
You need to use a WebSocket port with the web client.
Can you verify that you are using a WebSocket port?

I am getting this error on a fresh install of the add-on.

INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
INFO: Password is NOT in the Have I Been Pwned database! Nice!
FATAL: The configured certfile is not found
[cont-init.d] 10-requirements.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.
 
 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------

using this config

{
  "log_level": "info",
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "web": {
    "enabled": true,
    "username": "XXXXX",
    "password": "YYYYY",
    "ssl": false
  },
  "broker": {
    "enabled": true,
    "enable_ws": false,
    "enable_mqtt": true,
    "enable_ws_ssl": true,
    "enable_mqtt_ssl": false,
    "allow_anonymous": false
  },
  "mqttusers": [
    {
      "username": "ZZZZZ",
      "password": "EEEEE",
      "readonly": true,
      "topics": [
        "#"
      ]
    }
  ]
}

It can not find the certificate file you have defined in your add-on config.
If you don’t have a certificate you have two options:

  • Create a certificate , and use that. (best option)
  • Set all ssl options to false in the add-on config
1 Like

Sorry I do not understand what that is … newb. Yes 1883 is the mqtt port, I do not know which websocket poert to use