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”

Not so simple LED switch

Hi projecteers, welcome to my first Phenix Project, this section is for reinventing old Electronic projects with more modern methods and components.

TE issue links

When I was younger I used to buy and endlessly pour over a series of electronic magazines put out by Talking Electrinics. These magazines were a fantastic resource back in the day for learning Electronics and had a lot of great projects and theory. If you get the opportunity go look at the old magazines here. Scroll down till you see the scanned links to the magazines and click on the links:

The first project I am going to reinvent was from Issue-1 and was originally called “LIGHT THE LED”, which apparently takes at least 30 min to solve. If you are into creating discrete electronic projects, or want to make your own circuit board they even include the pcb mask, to use for etching your own boards, the old fashion way 😉 .

This is a cute little brain teaser consisting of 2 switches and one red LED. The aim is to make the LED light up. There is no other indication that you are doing anything correctly till the LED lights up once entering the correct pattern. The circuit used a 4017 decade counter. The 4017 has 10 outputs one for each count, and sequentially change with each clock pulse.

Continue reading “Not so simple LED switch”

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?”