# MQTT Broker: Homey or Raspberry Pi?

**URL:** <https://community.homey.app/t/mqtt-broker-homey-or-raspberry-pi/17715>\
**Category:** Questions & Help\
**Created:** [September 4, 2019, 9:38pm UTC](https://community.homey.app/t/mqtt-broker-homey-or-raspberry-pi/17715 "2019-09-04T21:38:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![prosumer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/prosumer/32/166478_2.png) [@prosumer](https://community.homey.app/u/prosumer)\
**Post date:** [September 4, 2019, 9:38pm UTC](https://community.homey.app/t/mqtt-broker-homey-or-raspberry-pi/17715/1 "2019-09-04T21:38:27Z")

</div>

Finally started playing with MQTT, which is fun!

I started with the [MQTT Broker](https://community.homey.app/t/mqtt-broker-for-homey/5129) 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](https://community.homey.app/t/mqtt-hub-gateway/6766) 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…

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [September 5, 2019, 6:03am UTC](https://community.homey.app/t/mqtt-broker-homey-or-raspberry-pi/17715/2 "2019-09-05T06:03:16Z")

</div>

Why TLS only?

---

<div class="post-metadata">

**Author:** ![prosumer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/prosumer/32/166478_2.png) [@prosumer](https://community.homey.app/u/prosumer)\
**Post date:** [September 5, 2019, 7:45am UTC](https://community.homey.app/t/mqtt-broker-homey-or-raspberry-pi/17715/3 "2019-09-05T07:45:12Z")

</div>

Security.

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)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [September 5, 2019, 7:47am UTC](https://community.homey.app/t/mqtt-broker-homey-or-raspberry-pi/17715/4 "2019-09-05T07:47:18Z")

</div>

Ah okay, if you’re planning to access it remotely, it makes sense 🙂 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.

---

<div class="post-metadata">

**Author:** ![prosumer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/prosumer/32/166478_2.png) [@prosumer](https://community.homey.app/u/prosumer)\
**Post date:** [September 5, 2019, 9:10am UTC](https://community.homey.app/t/mqtt-broker-homey-or-raspberry-pi/17715/5 "2019-09-05T09:10:08Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [September 5, 2019, 9:47am UTC](https://community.homey.app/t/mqtt-broker-homey-or-raspberry-pi/17715/6 "2019-09-05T09:47:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![prosumer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/prosumer/32/166478_2.png) [@prosumer](https://community.homey.app/u/prosumer)\
**Post date:** [September 6, 2019, 8:40am UTC](https://community.homey.app/t/mqtt-broker-homey-or-raspberry-pi/17715/7 "2019-09-06T08:40:35Z")

</div>

Going for Raspberry Pi for now.

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

---

<div class="post-metadata">

**Author:** ![scanno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/scanno/32/8358_2.png) [@scanno](https://community.homey.app/u/scanno)\
**Post date:** [September 15, 2019, 2:29pm UTC](https://community.homey.app/t/mqtt-broker-homey-or-raspberry-pi/17715/8 "2019-09-15T14:29:21Z")

</div>

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.
