ESP8266 – WiFi controlled light

In home control systems you often need a simple remote controllable relay. Just to switch on or off some lights or appliances. Here is my solution where I used an ESP8266 to control a relay over TCP socket communication. It is a real simple and easy to build system, but special care has to be taken here, because we are dealing with 220V or 110V, depending on the region you live. In hardware description below I show the two option,

Read more

My Home Control System – Devices, tasks and communication

After talking about the basics of a server-less system, it is time to show the architecture of my system. To see the code used send the  UDP broadcast, read this post. For the code for the TCP communication, read this post. At the moment I have the following devices in the system: Solar panel monitoring – Arduino Yun Front yard security device – ESP8266 CCTV still camera – ESP8266 Back yard security device – ESP8266 Bedroom light switch and dimmer

Read more

Communication between devices that doesn’t require a server (TCP code examples)

TCP packet communication Instead of implementing a “full” web server, I decided to go to a simpler TCP server – client connection. This eliminates overhead in the protocol but as well limits the usage. It is not possible to just use a browser (Chrome, Firefox, …) to send commands to a device. But I was not planing to use browsers anyway. TCP client (control device) example for ESP8266 To be able to send a packet over TCP it is only

Read more

Communication between devices that doesn’t require a server (UDP code examples)

UDP broadcast Two things to keep in mind about UDP broadcast: UDP broadcast is not a safe method. There is no check if anyone has received the packet. It is just sent out on the network and that’s it. If a recipient miss it, no warning or error is thrown. UDP broadcast works only in your local network. You cannot send a UDP broadcast to “the world”. ISPs, modems and specially mobile networks do not allow it. UDP broadcast sender

Read more

Used parts, libraries and the application source code

Parts list Part Manufacturer Source ESP32 Elecrow  CircuitRocks Philippines 1.44″ TFT Elecrow CircuitRocks Philippines TSL2561 Adafruit CircuitRocks Philippines LDR ??? local electronic parts shop DHT11 Elecrow CircuitRocks Philippines Libraries TSL2561 Github PlatformIO Arduino IDE DHTesp Github PlatformIO Arduino IDE TFT_eSPI Github PlatformIO Arduino IDE MQTTClient Github PlatformIO Arduino IDE ArduinoJSON Github PlatformIO Arduino IDE Ticker-esp32 Github PlatformIO Arduino IDE Source code Github

Read more

Using the multitasking capabilities of the ESP32 / FreeRTOS

One thing that I wanted to learn more about is the multitasking capabilities of the ESP32. I digged into the ESP-IDF manuals and found helpful information about the FreeRTOS SMP and how it works. What I found then is that if you program the ESP32 using the Arduino core for ESP32 as your framework, then it is quite simple. Then loop() is running as a task already in parallel to others that handle WiFi, BLE, … To split your app tasks

Read more

Communication between devices that doesn’t require a server

Why would you you want to have your Arduino’s, ESP8266 and ESP32 devices to be able to communicate to each other without using a central server? Simple, a central server can fail, or, if the server is not on the local network, the connection to the server can be interrupted (no internet connection). So for my home control system I defined in the requirements that  devices should be able to communicate with each other without the need of a server.

Read more

My Home Control System

I was always fascinated by automated homes. For me it is interesting to collect information about power consumption remote control appliances have security devices around the house When we bought our new (very old) house in 2014, I started looking into systems like Openmotics, openHAB, home-assistant or Open Source Automation (this list can be extended endless). What I learned during my investigation is that it is all about IoT and everything is in the Cloud. That is great when you have a

Read more

ESP32 Weatherstation

The ESP32 is a nice module with plenty of connectivity possibilities, digital IO’s, analog input, and touch pad inputs. When I got my first ESP32 I started playing around with it to explore all its possibilities. The result is a small weatherstation that collects weather information from different sources and displays them on a 1.44″ TFT display. The result is still on a breadboard and not included into a housing yet. The main goal was to test as many connectivity options

Read more
Free Link Directory