MQTT connected devices 100+

I know I'm obsessive but today I hit the milestone of 100 devices connected to MQTT and all accessible to HE in one way or another. Discovery works for about half of these devices and these comprise about 90% of thousands of entities. Agreed not all are useful and some are just one 'device' with lots of sub devices for example I have 2226 entities discoverable from just one Home Assistant device on MQTT. Most of these are themselves devices originated from MQTT but reported back to MQTT.

image

I have spent a lot of time making my system MQTT centric and I have many many controllers. My aim is to link everything via MQTT rather than any direct controller <> controller API. One of the niceties of this approach is that it's one plugin/application on HE rather than tens or hundreds of different ones.

I don't recommend anything approaching this extreme of MQTT connected devices but it is very helpful in stress testing my MQTT app and knowing it works well ! If you have multiple controllers from different manufacturers then it is the way to implement this.

Because the devices communicate via MQTT then the islands of automation can typically remain functional with minimal assistance eg security, climate, AV, telephony, lighting etc. plus their own control system e.g Sonos etc..

Also pleased to say that device discovery** integrations are now working
or imminent for these controllers:

HomeAssistant
OpenHAB
Athom Homey (but not Homey Hub)
Indigo
C-Bus
Domoticz

HomeSeer***
Vera**
Fibaro HC3 and HC2***
Zipato***

Reactor - network rules engine
Loxone - looking into both of these as I use them

NodeRED integrates very well with MQTT too

** Some discoveries support better device recognition than others.
*** Probably - might require extra work / plugins

..and actually anything supporting homie or HA Discovery MQTT protocols. Individual 'ad hoc' MQTT payloads can be supported too including payload mappings and all these can be used concurrently. This discovery can allow device sharing across different manufacturer hubs similar to HubConnect or HubMesh but both these are faster and better choices within say Hubitat<>Hubitat communication.

PS I am not touting the MQTT integration here.. just mentioning it's capabilities. In fact from a support perspective I hope that only enthusiasts explore it as it has so many permutations and requires a good understanding of the way MQTT works.

4 Likes

That sounds like it was a lot of work but that the payoff has been huge for you. Congratulations!

I've been reading up on Kasa WiFi smart plugs and it appears that MQTT is one option for integrating them into 3rd party hubs like Home Assistant or Hubitat. Any info on if your MQTT app is able to bring newer Kasa plugs into HE?

The integration can bring any* MQTT enabled device into HE by configuring individual 'ad hoc' MQTT topics/payloads and mapping and translating payloads to HE attributes. It works both for status and control but it does take an effort to configure. It does not handle 'discovery' of such devices unless they support the homie or HA discovery protocol.

  • *Currently if the payload is json format I only support it at a single level - i.e. not nested json payloads.

I may look at supporting some custom MQTT topic structures like Tasmota / Sonoff / Shelly directly in the future but as you can guess Hubitat is not my main controller and so I would need some free time and motivation to undertake such.

Well don't rush into it on my account. With over 9100 lines of code/comments in the current version of the app, I bet you've got a mile long to-do list going already.

It is a big app and defintely needs refactoring to be smaller.

As you really push the boundaries with complex devices like thermostats I am steering well clear of you :wink:

With just two controllers using a direct API link between in your case HA and HE makes sense. It's just a private conversation they have whereas all my implementation must go through MQTT to be open and accessible to everyone.

Pretty much on top of it recently (bugs wise) and it's mostly feature complete but there will always be more that might be useful as well as expanding the virtual device offerings to match other controllers devices, and that will be pretty much on request as people need something going forward. Please no-one ask for music player support .

@kevin
I understand your obsession with MQTT
I have around 90 devices using zigbee2mqtt and z-wavejs2mqtt into node-red
Probably 10 more devices in HE talking to Node-red via mqtt

I really like that I can use a Pi in my motorhome and transmit via mqtt back to my home server