+4 votes
by (17.1k points)
Does anyone use use a MQTT & microservices architecture for their smart home? :) For my use case, it looks like using AWS's IoT Core MQTT broker is basically free cents a month). It's easy to have mosquitto to republish to AWS IoT as well. Thinking through my MQTT topic structure. send a PUSH notification by publishing to linquist / contact / <personName> / <sms> send a SMS by publishing to linquist / contact / <personName> / <push> Home automation "stream" linquist / homeautomation / <houseName> / <device> / <property> To build the notifications. very easy to have an AWS IoT Core rule that triggers a lambda based on the MQTT topic subscription. Anyway, just looking to consolidate a bunch of random services I have around the house.  
Does anyone use use a MQTT & microservices architecture for their smart home?

2 Answers

+5 votes
by (1.9k points)
 
Best answer
Yes, I do. I’m a retired software architect and a long term user of smart home stuff. Currently using HomeSeer with zwave devices. I also have several different devices I’ve built myself using Arduinos. I use MQTT to tie things together. I run my own MQTT broker because I’m not going out to a thing external like AWS. There is a nice little plugin to HomeSeer that talks MQTT so I use that for the link into HomeSeer.  
by (17.1k points)
Yeah I do this stuff for a living too.  
by (1.9k points)
@unclothe1851 , cool. GeoFency is another tool I’ve got integrated into my system. It is an iPhone app, but supports web hooks. So I have it running on my wife and my iPhones, and use it’s webhook feature to trigger things in a custom Windows service I have running in the background. I use it to trigger some stuff based on home occupancy and other geolocation stuff.  
by (1.9k points)
But to your original question about the topic/payload structure I’ve used. I’ve done each of these little projects at different times, so my MQTT topics are sort of all over the place. It’s in on my to do list to go back and redesign a better designed consistent use of topics and payloads.  
by (1.9k points)
I use Nexmo (now owned by Vonage) for sending SMS messages.  
by (17.1k points)
@chondro Nice. I use twilio for SMS and pushover for push notifications. SmartThings works fine for geofencing as well as most of my automations.  
+2 votes
by (1.6k points)
I use MQTT with domoticz, Node Red, Alexa and sensors based on ESP8266 and RasPi. Most of the traffic is domoticz in/out, but I also have topics for Alexa and some of the custom sensors that are translated in node red to/from domoticz messages. Planning to add some MQTT for security (keypad, RFID) - with encrypted payloads! MQTT for SMS notifications is interesting, might look into that.  
by (17.1k points)
Encrypted payloads! Each device having its own public/private keypair I assume? :)
by (3.9k points)
@mel7 same here. While AWS MQTT sounds great, you're reliant on your Internet connection which is fine if its reliable. I prefer to control everything locally.  
by (1.6k points)
@unclothe1851 probably not; the ESP8266 MCUs can't handle RSA algorithms and the risk is low as all devices are inside the building. Just needs to be encoded enough that someone snooping it briefly couldn't easily work out the message content. I'll probably use some sort of timestamp-based hashing and then a simple crypto over that.  
by (17.1k points)
@sizable I’m actually using mosquitto locally and having it republish certain topics to AWS. I also have an insanely stable connection.  
The Smart Home Group is where you can always find questions, answers, advice, reviews & recommendations from other community members about smart home automation with zwave, bluetooth, and zigbee IOT devices.
...