Home Automation / MQTT / OpenHAB / Node Red

OK, since I’m sitting at home doing a whole lot of nothing these days (gotta love being part of the travel industry that’s suddenly found myself without employment :frowning:) I’m trying to figure out where to start with all of this. I have some coding background and can code in the C’s / Vis Basic / etc. but have never ventured into this realm so don’t even know where to start.

  • It looks like MQTT is the basic protocol used for things to communicate, so will have to get a basic understanding there.
  • NodeRed looks like the backend programming of the interactions between ‘things’
  • OpenHab looks like one of the more popular free front ends for visualizing said ‘things’ and their states

My eventual goals for things I’d like to be able to achieve are:

  • Learn what kind of backend I need at my house so that these things can talk to each other (broker?)
  • Learn how to identify, and control ‘things’
  • Create an intuitive control center / dashboard of all things
  • Create rule sets so that things can be automated
  • Set up voice automation
  • Create my own things to control
  • Set up data logging of information collected from sensors / thing states

What I want is a good primer on where to start assuming I have NO idea where to start then some pointers as to what to go to next.

Do you have any suggested items I should purchase first as far as devices to learn with. (Already have the Pi4 and it’s set up with a basic install of OpenHAB).


1 Like

This guy on youtube is pretty good for home automation:

Mycroft is an open source voice assistant like Siri:

1 Like

In my observation, there isn’t a single stack in the Home automation/smart home arena, rather there are umpteen platforms/frameworks such as OpenHAB, SmartThings, WebThings. Each platform has its own paradigm and native SDKs, thus no single “backend”, no single method of identification and control of things, …, though they commonly have a hub/control center/“backend” and the things commonly talk to the hub and commonly via HTTP, websockets, MQTT, … in a JSON like format. Users or developers commonly view and control through the hub. I don’t recall seeing native C or Visual Basic SDKs but I’m sure there are plenty of MQTT, HTTP, websocket libraries for those languages, which you can sometimes fall back to using.

In IoT development, the “Hello World” usually includes controlling a thing and receiving data from a thing. Thus you might buy at one thing of each type, such as a temperature, humidity, water leak sensor, … for receiving data and a smart outlet , … for control. Perhaps, you might look for things that can work over multiple platforms that you want to experiment with.

The above composite image is from a Mozilla Webthings setup, which has a questionable future. A Raspberry Pi with the gateway image is the “backend”, which supports connections with various things on the platform via plugins. It includes a dashboard listing the connected things, along with some state and control for the things, as you see in the bottom left. It also supports rules but didn’t have native voice automation (but nothing stops you from having voice input on your own front end and translating that to control your things).

I did not find a good primer, but looking the sample code and Web Things descriptor and REST API, from an android app I was able to able to enumerate the devices on the hub and retrieve the data from the attached environmental sensors and control things. bpamplin built the “custom thing” in the center of the picture (ESP with LED controlled over GPIO, which I believe was only lightly modified from the Arduino sample code), connected it to the hub, and the android app “controlled” the LED.


I really like Home Assistant. You can use it completely turnkey with a prebuilt Hassio image for a Raspberry Pi or full DIY by installing the core on Debian or Ubuntu. There are hundreds of “integrations” for most every automation technology on the market.

The same developers extended the integrations architecture to make easy to setup and configure sensors on ESP8266 based hardware on ESPHome. These sensors easily integrate into Home Assistant.


@mstovenour, Have you done much with HA? I’ve been working through and learning as much as I can, but it’s a pretty steep learning curve.

I’ve managed to use ESPHome to program a relay board, and can switch the relays on and off. What I’m doing next is trying to make an integration so that it’s actually functional as a system with scheduling and automations.

If you’re at the point where you’re programming this stuff in, I’d love to pick your brain a little

I have done “some” with HA. I have a rather narrow and specialized knowledge after spending a year reverse engineering and greatly modifying the Insteon integration. My experience with automations and templating is somewhat limited. That said I can reverse engineer the code in an hour or so to answer most to my questions. The biggest problem I have with it is that many configuration examples I find on the forum have syntactically incorrect configuration. YAML ain’t human readable in addition to ain’t markup language.