MQTT Broker: Homey or Raspberry Pi?

Finally started playing with MQTT, which is fun!

I started with the MQTT Broker on Homey.

Now that I want to take this more seriously, which device is better suited as a broker?

  • Homey 2019 (regular, non-Pro version)
  • Raspberry Pi 3 Model B+

(And why? Performance? Security?)

Current MQTT plans (that might impact resource usage):

  • Use TLS (only)
  • Use authorization
  • Use MQTT Hub/Gateway on Homey (publishing data for about 30 devices)
  • Publish a few topics from my router

Both devices already have some load (Homey continuously gets smart (electricity) meter data from a Pi Zero, Pi 3B+ runs Homebridge for a few devices). If performance is really bad on both the Homey and the Pi I could use a spare Pi 3 Model B (non-plus), but if either device can easily handle this (on top of the existing load) I’d rather not add another device to the mix…

1 Like

Why TLS only?


Wouldn’t the authorization password be communicated in plain text if I allow insecure connections (disable TLS)?

(I plan to access the broker from the internet, not only within my home network)

Ah okay, if you’re planning to access it remotely, it makes sense :slight_smile: Any idea how many data/messages you’re planning to publish? If it’s a couple of 100 a day at most, I think it’ll run on Homey just fine. Even a couple of thousand, probably.

When possible I would like to publish topics/messages for every device managed by my Homey, including the data from the smart electricity meter. That would mean a lot more than a thousand messages per day…

However, I’m also considering to use MQTT on the Pi Zero (instead of a custom Python script) to upload the data to the Homey (if feasible / better than my current solution). Then the amount of messages sent by the MQTT Hub on the Homey would be rather limited (I think).

MQTT is pretty lightweight, so you could start out running it on Homey and keep an eye out for CPU/RAM usage for the broker in Insights.

Going for Raspberry Pi for now.

Main reason: automatic Let’s Encrypt certificates instead of a self-signed certificate.

1 Like

FYI i have stress tested the MQTT broker on Homey with a endless loop resulting in a message througput of around 20 msg/second. So performance wise there should be no problem of using the broker on Homey. Besides i am using Lets Encrypt certs, but manually import them from my server.

But anyway really does not matter where you run your broker.

1 Like