In this video we will build a home automation system with ESP32’s and a Windows PC in 4 steps:
1.Node Red GUI
2.Mosquitto MQTT Server
3.ESP32 and Software
4.Power On and Test …and connect a 2nd ESP32 client!
And I will show how to add a 2ns ESP32 node
We will build up the system step by step and verify the function after each step.
For this project you need a ESP32, a 10k potentiometer and a Windows PC. (no Raspberry Pi needed).
Zip file with code and links: drive.google.com/file/d/16h4aKjb0zAJQUbYPOZGFfrg-_…
Video Timeline with commands and links:
0:00 Introduction
1:11 System overview
1:56 Set up Node-Red on Windows 10: nodered.org/
2:12 Download and Install NodeJS nodejs.org/en
2:55 Install Node-Red (cmd): npm install -g --unsafe-perm node-red
3:17 Start node-red: (cmd): node-red [enter]
3:17 Get your IPv4 adress (cmd): ipconfig [enter]
3:55 Start Node-Red development environment in browser: xxx.xxx.x.xx:1880
4:06 Add dashboard nodes: manage palette, install, search: node-red-dashboard
4:44 How to load and save node-red from/to a txt file (import/export nodes)
5:44 How to create your own Node-Red flow with drag and drop
7:05 Open the Node-Red user interface you created: xxx.xxx.x.xx:1880/ui
7:47 Set up Mosquitto MQTT server (broker): mosquitto.org/
8:15 Configure Mosquitto in mosquitto.conf: listener 1883 , allow_anonymous true
8:50 Open port 1883 in Windows firewall: search wf.msc, new inbound rule
9:48 Start Mosquitto server: C:\program files\mosquitto (cmd): net start mosquitto
10:07 Connect Node-Red to Mosquitto MQTT Server
10:25 Add the MQTT server info and topic in Node-Red MQTT node
11:49 Build the ESP32 circuit (schematic)
12:21 Analog in GPIO's that you can and cannot use with WiFi
12:41 Set up ESP32 boards in Arduino IDE 2
espressif.github.io/arduino-esp32/package_esp32_in…
13:34 Install ESP32 USB Drivers for Windows (CP210X type)
www.silabs.com/developers/usb-to-uart-bridge-vcp-d…
14:35 Test ESP32 board with blink sketch
15:16 ESP32 home automation Arduino code
15:27 Install PubSubClient library with Arduino library manager
15:54 Add WiFi SSID, Password and MQTT server IPv4 adress in Arduino code
17:06 MQTT topic in Arduino code, explanation how it links to Node-Red MQTT.
19:23 Test the system with 1 ESP32 board and Node-Red dashboard.
20:07 Adding a 2nd ESP32 client to the system
20:50 Adding 2nd ESP32: Node-Red, add nodes and update MQTT messages
21:32 Adding 2nd ESP32: Arduino code update MQTT messages and client name
22:30 Test the system with 2 ESP32 boards and Node-Red dashboard.
23:03 Closure
コメント