which MQTT service to choose in 2020?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

which MQTT service to choose in 2020?

#1 Post by hereiam991 » 24 Oct 2020, 15:46

Hello People,
i am new to home automation and want to eavluate on what i want to settle in the future.

i got a nodemcu with espeasy running, i do like it a lot so far.
liking especially how easy it it to deal with data from the arduino serial by using a dummy device, i think comparable projets dont offer this function.

my "problem" is to decide for a MQTT broker or any other form of server to display my data.

in the end i want to display and visualize sensor data, usual stuff like temp humidity etc.
if there would be the possibility to control my gosund sp111 smart plugs too that would be brilliant, but main focus is simple setup and no hardware hassle.

could setup a raspi for this server purpose, but in best case a easy to use online service would do the trick for me.
it seems adafruit.io would be usable for me.
how is the integration status? do you guys use adafruit.io and whats your opinion?

edit: i found this nice little mini dashboard, brilliant idea.
i just miss to be able to log sensor data and displa ythemin a graph.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: which MQTT service to choose in 2020?

#2 Post by TD-er » 24 Oct 2020, 20:22

Some routers and/or access points also have packages that can be installed as plugin.
If I'm not mistaken, OpenWRT also has a MQTT plugin.

It can also be installed on most NAS'es as package. (e.g. Synology)
So maybe you already have one or more of those options?

I'm not a big fan of running online services on which your automation tools are going to depend.
Availability may be out of your hands and also it adds quite a lot of variables to the solution.
For example the timeout must be set quite a bit higher. Local services often operate just fine with 100 msec timeout, while for online services just the ping time may be a multiple of that.
Also external services depend on DNS, which may change every now and then. But your connected units may not always connect to the same host and DNS services quite often show up in the ESPEasy timing stats as taking seconds (thus timeout).

I'm running Mosquitto on my R'pi 3b and that's running just fine, but maybe you also have some hardware already capable of running a MQTT broker package.
Just look around and start thinking inside the box :)

hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

Re: which MQTT service to choose in 2020?

#3 Post by hereiam991 » 26 Oct 2020, 00:34

yes youre right, local is preferable.
while if its just to collect some temparature datas i dont see a big problem with online services.
well, when your switches depending on it your arguments are absolute true.

i do have some hardware, at lleast will have.
i decided to upgrade my oldest synology diskstation, when the new one comes in (just a 220j) i will try to install homeassistant by using hass.io.
its not clear to me if there the mosquito package will be directly avaiable, but if guess i people here dont say otherwise, it should basically work.

i never dealt with mqtt before, "simple" http would be fine for me, but as far i see for home assistant, msoquito and mqtt is the only way.
will see and report.

thanks for the reply!

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: which MQTT service to choose in 2020?

#4 Post by TD-er » 26 Oct 2020, 01:22

Just before you buy the 220J, please check the specs along with the requirements of Hass.io.

MQTT does not require much, but on the other hand the "J" series of Synology were always a bit low on RAM.
Maybe the current releases are not that bad anymore, but a few years ago the "J" versions were really low on RAM so better check first.

hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

Re: which MQTT service to choose in 2020?

#5 Post by hereiam991 » 26 Oct 2020, 05:25

the diskstation is ordered allready.
youre right, i was also just looking for the ram requirement haha.
we will see, the new 220j have 512mb, not that much in a virtaul world, docker, on the other hand it will replace a 212J (that one is really slow...).

luckily i dont plan to run much on it, its basically just a backup station otherwise, so it will be ok if most of the ram will be used by hass.io.
i could dig from a screenshot in the net that the main client took about 100mb plus some other smaller services, the cpu of the new 220 is quite powerfull that should be quite snappy as long the ram isnt full.
if its 150mb ram all in all it should be ok, plan b is using domoticz or a native install of home assistant if that is doable (at least bare metall it should run well).
plan c is a raspi 4 with a case and ssd, but have to say in this config the raspi loose a bit of its sexapeal, beside that he isnt cheap anymore then.
... i played with the thought getting a bigger Diskstation, but thats about twice the price if i see right and i really wont run much on the J.
its really just for some siwtches and logging sensor data ( each minute will do easily), otherwise just backup servies and maybe one/me is usnig it as a network storage for small files.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: which MQTT service to choose in 2020?

#6 Post by TD-er » 26 Oct 2020, 08:52

512 MB should indeed be enough for services that can be directly installed on the Synology.
Not sure if you even can run Docker if the NAS hasn't got a x86 CPU.

But the Hass.io community is quite big and active, so wouldn't be surprised if there is a native Synology package for it.

hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

Re: which MQTT service to choose in 2020?

#7 Post by hereiam991 » 26 Oct 2020, 13:41

it looks like the home assistant as also domoticz are avaiable over synocommunity packages (at least theyre showen in my package center on my old DS212J).
i admit that this was a quick buy, i wanted to replace my old 212 anyway as she started to become unreliable.
in worst case i have a dual core i7 ubuntu notebook with 16gb of ram i could use for the home server, its just shhoting with big guns on small birds i would say.

hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

Re: which MQTT service to choose in 2020?

#8 Post by hereiam991 » 26 Oct 2020, 16:24

no luck so far, got the station today.
home assistant as domoticz are installable but neither really work.
i found some native compiled domoticz packages for DSM but sadly "just the 218j is supported.
otherwise its a nice box, quite quick and do have a little ram free to play with.
i could maybe try to compile it myself?
https://www.domoticz.com/wiki/Synology

hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

Re: which MQTT service to choose in 2020?

#9 Post by hereiam991 » 26 Oct 2020, 19:08

looks like the asus tinkerboard is well supported from home assistant, seems to be a nice option with a onboard ssd.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: which MQTT service to choose in 2020?

#10 Post by TD-er » 26 Oct 2020, 19:16

Not sure how new the DS220J is, but if it is brand new then you could also check to see if there is already some beta build available.
And maybe the MQTT broker is already present as a separate package?

hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

Re: which MQTT service to choose in 2020?

#11 Post by hereiam991 » 26 Oct 2020, 20:54

the 220j is from this year (20).
if it would be a 218j i may could find my luck here.
http://www.jadahl.com/
native compiled domoticz packages.

i just dedusted a raspi 3b+ and let a home assistant installation run on it.
maybe simply use what all are using, shouldnt be too hard to setup a sd card backup, while have to say, if it switches something it could deserve at least ssd reliability to my opinion.

oh, i could install msoquito as it looks, but thats a bit incomplete isnt it?

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: which MQTT service to choose in 2020?

#12 Post by TD-er » 26 Oct 2020, 21:05

Mosquitto incomplete: Yes
But I don't know what is included by Hass.io.
Mosquitto is way more friendly to use compared to a number of other MQTT brokers.

And MQTT was the topic, not Domoticz/Hass.io :)

hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

Re: which MQTT service to choose in 2020?

#13 Post by hereiam991 » 26 Oct 2020, 22:55

i completly derailed the thread sry.
well so far i have a raspi running with home assistant plus mosquito, am just too stupid to get datas in to home assistant.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: which MQTT service to choose in 2020?

#14 Post by TD-er » 26 Oct 2020, 23:41

Home Assistant needs YAML files, right?
Or do they now have some kind of editor which doesn't frustrate a new user to the bone? (by chewing away the nails...)

I tried it once over 2 years ago and it was utterly frustrating to find the typo in YAML files which caused the HA executable to crash on the missing space or tab instead of space.

To keep historical data you also need some kind of database.
Either SQlite, or some SQL database.
Anyway, for me it was over 2 years ago I looked at it. And since it is quite popular, I cannot imagine it is still so frustratingly configuration unfriendly.

hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

Re: which MQTT service to choose in 2020?

#15 Post by hereiam991 » 27 Oct 2020, 01:27

youre on the right track i think.
i spend a few hours with it, while beeing a nice peace of software you need yaml files, right.
it could be they made some things easier, but i couldnt find those assistants on the quick.
i simply installed domoticz on the sd card and it looks i have hat i want.
result, no mqqt for me 2020 probably, neither on or offline, plain old domoticz.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: which MQTT service to choose in 2020?

#16 Post by TD-er » 27 Oct 2020, 09:07

Can't you run Mosquitto as a separate package?
It does make things quite a bit easier as the Domoticz MQTT controller also allows for some plugins to sync data back from Domoticz to the plugin (e.g. the switch plugin)

User avatar
Ath
Normal user
Posts: 3488
Joined: 10 Jun 2018, 12:06
Location: NL

Re: which MQTT service to choose in 2020?

#17 Post by Ath » 27 Oct 2020, 12:10

Installing Mosquitto on the same RPi as Domoticz is quite easy: https://sigmdel.ca/michel/ha/domo/domo_03_en.html

Done similar steps over a year ago, and never have to look after it, works like a charm.
/Ton (PayPal.me)

hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

Re: which MQTT service to choose in 2020?

#18 Post by hereiam991 » 27 Oct 2020, 16:33

i technically can do that, i just wasnt aware its sensefull, sounds like it is.
as far i understood it simply included installing mosquito on the raspi i have my domoticz running (easy thing).
i would switch to domoticz mqqt protocol then on my espeasy 8266.
the how to link seems to be very good! thanks.

am quite happy allready (no stress from my side), maybe one could enlighten me of the benefits a bit more,
using mqqt over plain old domoticz http?
i would be able to easier to integrate my gosund smart switches (which are still on stock firmware), right?

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: which MQTT service to choose in 2020?

#19 Post by TD-er » 27 Oct 2020, 17:02

Yep, using Domoticz MQTT, you can also send switch updates to the ESP.
See: https://espeasy.readthedocs.io/en/lates ... t=domoticz

This does not work with Domoticz HTTP as that one is mainly meant to send sensor data, not receiving anything from Domoticz.

With MQTT you can also import data from other devices using the MQTT import plugin. However that plugin can only read "numerical" values, not full JSON texts.
So using MQTT does have more benefits, not only for Domoticz.

hereiam991
Normal user
Posts: 31
Joined: 24 Oct 2020, 15:18

Re: which MQTT service to choose in 2020?

#20 Post by hereiam991 » 28 Oct 2020, 16:55

thanks for the link, time to learn something new it seems.

JR01
Normal user
Posts: 260
Joined: 14 Feb 2016, 21:04
Location: South Africa

Re: which MQTT service to choose in 2020?

#21 Post by JR01 » 30 Oct 2020, 15:38

So, for "Generic MQTT" - which I use to converse with Node-RED - I have been using OpenHAB MQTT - is this correct? Mayby time to bring "Generic" into the name as well?
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: which MQTT service to choose in 2020?

#22 Post by TD-er » 30 Oct 2020, 15:50

OpenHAB MQTT is indeed the most generic MQTT controller as it doesn't format/alter the data for a specific platform.

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 38 guests