MQTT (HA) vs Mosquitto (HassIO)

I think I’ve got this right. If I’m wrong, I’m about ready to throw something.
I believe I’ve been using HassIO with the Mosquitto plugin. I can’t afford to keep replacing SD cards, so I dug out an old netbook, installed Mint Linux (it’s what I had and it’s nearly Ubuntu). Install HA and it seems to be working.

But, now I have HA and not HassIO. So, I have no Mosquitto.

There are instructions for MQTT on HA. MQTT appears to be built into HA. Why is Mosquitto an option in HassIO?

Is it possible to install any of the HassIO components now that I’m HA? It was really useful having the web based config editor.

Nope. I don’t think I got that right. I think MQTT is the HA client and Moquitto is a broker available under HassIO.

The MQTT broker inside HA will not retain messages between reboots. For better performance, use an external broker.

Install hassio?

No. There is a broker available inside HA.

1 Like

OKay. 2 out of 3 ain’t bad. I just discovered the internal broker. I guess there must already be a predefined user “homeassistant” since we are advised only of how to set the password.

I don’t like the look of the install instructions for HassIO in Docker. I have no experience of that. I’ve just put an SSH server on my Mint Linux box, so I can modify my config.yaml and restart.

I think the only thing I’m really missing now is that the cards in HassIO have a convenient template.

That’s a point. What file do I modify in order to create cards on the Overview screen? I notice a card has automagically been added for my Roku TV box.

Because running 3 commands is hard? Why don’t you like it?

You don’t need experience.

No idea what this means. Lovelace is the same whether you’re on hassio or home assistant installed in some other manner.

Use Lovelace

1 Like

How did you install HA on the new machine? In a virtual environment or in Docker or “some other third thing”?

In a Python venv.

Not that. I can easily cut and paste a set of commands. I just like to know what they mean.

Hah! I’ve heard that one before. I now haves some experience of HAss and I’m still floundering!

Yeah - I was being a numpty. I didn’t notice that the menu was there all along. I must’ve thought ti was an add-in.

I like to hear that.

You actually don’t HAVE TO know how docker works…you don’t need to manage docker so it’s not required to know. Did you know how docker worked when you were running hassio from sdcard? Then why do you need to know now?

Ok so you now have a few options:

  1. use the (reportedly crappy) internal broker. not recommended.
  2. use mosquitto installed on your linux box as another standalone app. That will work perfectly fine. I did that on my RPi with HA in a venv and then I did that again when I switched from the RPi to a NUC also with HA in a venv. And I still use it as my main MQTT broker even now with HA running in Docker.
  3. install Docker and run Eclipse-Mosquitto in a Docker container. I also have that running in Docker too to be able to test how to bridge two different MQTT brokers together.

once you decide which way to go if you get stuck i can try to give you a hand on either of #2 or #3.

Docker becomes extremely easy once you figure out volume mounts and ports. So if you get your broker set up in Docker then there will be no reason to not use HA (hassio or non) in Docker too.

No. I’d never heard of it. I was running on a Pi. To the best of my knowledge this was without docker. I’d like to know now just because it looks like I might need to use it.

I think I can get by with Hass if I can just get over the initial hump!

I’m not sure if you’re aware, but you can install HassIO on anything, including your netbook.

HassOS is only exclusive to the RasPi (And other devices, but it runs as the OS, limiting the use of the machine); HassIO runs happily on any linux machine.

Hassio IS docker.

HassOS is a docker host. Hassio consists of 2 docker containers plus add-on containers.

You were using docker and you didn’t even know it.

Actually it’s distributed as a vmdk also that you can run in a VM

And that is the “problem”…

that fact is buried so deep that not very many people know it, especially the new ones. And because of that they lose all of the benefits of Docker.

I completely agree.

That’s what I find amusing and disheartening at the same time. Everyone is ‘afraid’ of Docker, because it’s confusing if you just read about it. If it was published on the getting started that running hassio is running Docker, some people would say “Oh, that’s easy”.

1 Like