Light Sensor for MQTT broker

Video Coming Soon – Spoilers!

Construction zone ahead.

SUMMARY:

The idea of this project is to create a Light Sensor that can measure the light level and then report this back to a MQTT broker, which can then publish this reading to other devices, for example a relay connected to a light that can then turn on or off depending on the light level.

PLAN:

As we need to connect to the home network to transmit the light level readings back to the MQTT broker at least once a minute, to do this we will use an ESP8266 that can connect to the wifi and talk directly to our broker. For measuring the light we will use a LDR (Light Dependent Resistor) connected to A0 (Analog Input) on our ESP8266, this will allow us to use the inbuilt analog to digital converter to get a scaled light reading. Also a bias resistor will be required.

Continue reading “Light Sensor for MQTT broker”

Node-Red install in Ubuntu

In this tutorial we are going to install Node-Red into our Ubuntu server which is running the Mosquitto broker. This will enable us to use a web interface to access and control the flow of the messages.

Starting with our freshly installed Ubuntu and Mosquitto we first need to install the NodeJs 12.x

Continue reading “Node-Red install in Ubuntu”

Secure the MQTT broker

In our first episode of the Home Automation series we installed the Mosquitto MQTT broker in Ubintu Server. In this Episode we will look at securing the broker better and installing Node-Red to help monitor and administrate the MQTT broker.

— INSERT VIDEO HERE —

Now we have Ubuntu server installed and the Mosquitto MQTT broker installed it is now time to look at the security of the broker. To make it more secure so that people outside can not contril your devices we will add a username and password to the MQTT broker.

We use the password file generating utility that comes with Mosquitto, to create the user “steve” with password “password”. by entering the following command:

Continue reading “Secure the MQTT broker”

Install Ubuntu Server with MQTT broker

G’day projecteers, welcome to the first video in my Home Automation series. As I have not done too much with home automation I though I would bring you all along for the ride as we work our way through different projects and eventually incorporate them all into a complete home automation system.

So you might ask the question why I am installing a MQTT broker on my own Ubuntu server. Well I already have a virtualbox machine set up with a few dedicated virtual machines so rather than have to use a Raspberry Pi I decided to setup a Ubuntu server as another virtual machine. However if you would rather install the MQTT broker on a Raspberry Pi then Google is your friend. If you like I could do a video on it later.

I was planning to do a voice over in this video but as I have not set up any method to do it yet, I still have voiceless videos, sorry.

If you dont know what a MQTT broker is then have a quick look at my information page “What is a MQTT broker”

Continue reading “Install Ubuntu Server with MQTT broker”

What is a MQTT broker?

Mqtt Stands for Message Queuing Telemetry Transport. Mqtt is based on the old ICQ messenger and works on top of TCP/IP network protocol. Because it uses a simple protocol the data transmitted is kept relatively small and this makes the Mqtt protocol well suited for fast, low bandwidth, communications and provides very small overhead on the network.

The Mqtt broker handles the flow of messages to and from multiple devices by using a subscribe and publish system. Basically only the devices or clients that are interested in a particular topic, that the message belongs to, will receive this message or be able to send a message.

Continue reading “What is a MQTT broker?”