Cov txheej txheem:
- Kauj ruam 1: Kev piav qhia
- Kauj ruam 2: Schematic & Cheebtsam
- Kauj Ruam 3: Kev Tso Chaw thiab Kev Siv Soldering
- Kauj ruam 4: Xeem
- Kauj Ruam 5: Xeem - MQTT Apps ntawm Xov Tooj Ntawm Tes
- Kauj Ruam 6: Ua Rooj plaub (Rau Siv)
- Kauj Ruam 7: Lwm Qhov Kev Txhim Kho Zoo (Rau Siv)
Video: [Tsev IoT] ESP8266 MQTT Client Device: 7 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Nws yog qhov nthuav uas siv qhov pheej yig WiFi-qhib MCU nrog MQTT raws tu qauv los tswj cov khoom siv xws li lub tshuab nqus dej tsis siv neeg rau kuv tus miv. Muaj kuv qhov blog kom paub cov ntaub ntawv ntxaws ntxaws (https://regishsu.blogspot.com/2019/09/home-iot-esp…
Kev qhia tshwj xeeb:
- txuas mus rau qhov tau npaj ua ntej Access-Point SSID thiab MQTT broker
- tswj kev xa rov qab qhib/tua 3mins ib ntus, esp8266 yuav nkag mus rau qhov tsaug zog thaum lub sijhawm xa tawm.
- Kev tswj chaw taws teeb los ntawm MQTT raws tu qauv los ntawm lub xov tooj ntawm tes
Kauj ruam 1: Kev piav qhia
ECO system yuav yog
Raspberry Pi 3B+
- MQTT broker
- Python: paho-mqtt, yuav siv ntau yam ntxiv rau yav tom ntej, piv txwv li thawb ceeb toom rau lub xov tooj ntawm tes nrog kev tshuaj xyuas cov ntaub ntawv.
ESP8266
- tswj lub relay
- raws li MQTT Client
Kauj ruam 2: Schematic & Cheebtsam
Daim ntawv teev npe Parts
- 1 x ESP6266 12E
- 1 x 2P relay module
- 2 x S8050 transistor
- 2 x 100 ohm resistor
- 1 x 10 uF capacitor
- 1 x 0.1uF capacitor
- 1 x LM1117 3.3v module
- 1 x HLK-PM01 230V AC rau 5V/3W DC lub zog hluav taws xob
- 1 x 5x7cm perfboard 1 x AC Hluav taws xob qhov (socket)
Cov Cuab Yeej:
- 1 x 3D tshuab luam ntawv nrog PLA filament
- 1 x Soldering hlau
Khoom siv
- 1 x Raspberry pi 3B+
- 1 x Dej pub piv txwv
Kauj Ruam 3: Kev Tso Chaw thiab Kev Siv Soldering
Kuv tso 2 transistors thiab resistors nyob rau hauv ESP8266 module kom txuag tau qhov chaw.
Ua tib zoo saib xyuas cov xov hlau thiab kev tso chaw yuav tsum tsis txhob cuam tshuam nrog lwm tus xov hlau.
Daim ntawv ceeb toom:
Ib qho ntxiv yog ua qhov "qhib/luv" tshuaj xyuas los ntawm multimeter kom ntseeg tau tias txhua lub xaim yog qhov txuas zoo.
Kauj ruam 4: Xeem
Muaj 3 ntu yuav tsum npaj kom zoo rau kev xeem. Hloov kho qhov kos duab ntawm SSID/Password, tsim cov duab kos thiab xa mus rau ESP8266, teeb tsa MQTT broker ntawm RPI 3B+.
Teeb MQTT broker (Nws yog qhov kev xaiv yog tias koj muaj MQTT broker twb tau ua lawm)
teeb tsa pob ntsig ntsig txog RPI 3B+, thiab yuav pib MQTT tus pabcuam kev pabcuam tau txais.
- sudo apt hloov tshiab
- sudo apt hloov kho sudo apt autoremove sudo apt autoclean sudo apt-tau nruab mosquitto mosquitto-neeg siv
txheeb xyuas qhov kev pabcuam MQTT
kev pabcuam tsis pub dhau qhov xwm txheej
Upload tus kos duab kos
Rub tawm daim duab kos [yooj yim version] thiab hloov kho SSID / Password thiab MQTT broker IP chaw nyob.
- #define AP_SSID "koj-ssid"
- #define AP_PASSWD "password"
- #define MQTT_BROKER "xxx.xxx.xxx.xxx"
thiab tom qab ntawd rub cov duab kos rau ESP8266 tus qauv.
Qhib lub davhlau ya nyob twg ntawm Arduino IDE ntawm PC kom taug qab lub cav los ntawm ESP8266, qhib lub zog siv, esp8266 yuav pib txuas rau koj li Wifi AP thiab tom qab ntawd txuas rau MQTT broker.
Kauj Ruam 5: Xeem - MQTT Apps ntawm Xov Tooj Ntawm Tes
Txhawm rau txheeb xyuas qhov ESP8266 tus qauv no tuaj yeem tswj hwm los ntawm lwm tus MQTT cov cuab yeej, muaj ntau txoj hauv kev los ua.
Txoj Kev 1: Xa cov lus txib los ntawm RPI los ntawm Python. (yuav ua li cas rau nruab Mqtt cov cuab yeej)
- Siv cov relay 1-
- mosquitto_pub -h xx.xx.xx.xx -t Tsev/esp32_sub -m "11"
- Tshem tawm relay 1-
- mosquitto_pub -h xx.xx.xx.xx -t Tsev/esp32_sub -m "10"
Txoj Kev 2: Siv Lub Xov Tooj Ntawm Tes
- Kuv tau sim ntau Apps, tab sis vim li cas kuv thiaj qhia qhov no? Vim tias nws zoo li yooj yim rau kuv lub taub hau ruam, Nws paub tseeb tias koj tuaj yeem siv lwm tus los ntawm koj tus kheej nyiam.
- Ua raws cov duab txhawm rau teeb tsa MQTT tus tswv lag luam thiab hloov khawm ntxiv rau lub cav.
Kauj Ruam 6: Ua Rooj plaub (Rau Siv)
Kuv siv Sketchup los ua qhov teeb meem no.
Kauj Ruam 7: Lwm Qhov Kev Txhim Kho Zoo (Rau Siv)
Kuv tau ua qee qhov muaj txiaj ntsig zoo uas tuaj yeem teeb tsa chaw nyob SSID/Password thiab Borker IP chaw nyob. Thiab tseem tuaj yeem yog OTA txhawm rau rub cov duab kos, cov ncauj lus kom ntxaws nyob ntawm no (https://regishsu.blogspot.com/2019/07/home-iot-esp8266-mqtt-client-device-iot.html)
Pom zoo:
Plug & Ua Si CO2 Sensor Zaub Nrog NodeMCU/ESP8266 rau Cov Tsev Kawm Ntawv, Tsev Kawm Qib Siab lossis Koj Lub Tsev: 7 Kauj Ruam
Plug & Ua Si CO2 Sensor Zaub Nrog NodeMCU/ESP8266 rau Cov Tsev Kawm Ntawv, Lub Tsev Kawm Qib Siab lossis Koj Lub Tsev: Kuv yuav qhia koj sai npaum li cas txhim kho lub plug & ua si CO2 sensor qhov twg txhua qhov ntawm txoj haujlwm yuav txuas nrog DuPont xov hlau. Yuav muaj tsuas yog 5 cov ntsiab lus uas yuav tsum tau muab siv, vim tias kuv tsis tau muab tshuaj txhuam ua ntej qhov haujlwm no txhua lub sijhawm
DIY Tus Nqi Tsawg Tus Tsev Hauv Tsev Siv Esp8266: 6 Cov Kauj Ruam
DIY Tus Nqi Tus Nqi Hauv Tsev Tsis Siv Neeg Siv Esp8266: Nyob zoo txhua tus, Hnub no hauv cov lus qhia no Kuv yuav los qhia koj li cas kuv tau npaj kuv tus kheej lub tsev automation raws li qib mus rau lub tsev ntse siv ESP 8266 module feem ntau hu ua nodemcu yog li tsis tas nkim sijhawm cia peb pib
Siv Kev Cia Siab Lub Hauv Paus txuas ntxiv txhawm rau Nrhiav Lub Tuam Tsev Tsis Ua Haujlwm Txoj Cai Ua Haujlwm Hauv Koj Tsev Neeg Tsob Ntoo ntawm Kev Tshawb Nrhiav Tsev Neeg: 11 Kauj Ruam
Siv Kev Cia Siab Lub Hauv Paus Txuas Ntxiv kom Nrhiav Lub Tuam Tsev Tsis Ua Haujlwm Ua Haujlwm Hauv Koj Tsev Neeg Tsob Ntoo ntawm Kev Tshawb Nrhiav Tsev Neeg: Lub hom phiaj ntawm cov lus qhia no yog los qhia seb yuav tshawb nrhiav koj tsev neeg tsob ntoo li cas hauv Tsev Neeg Nrhiav rau cov poj koob yawm txwv nrog kev ua haujlwm hauv lub tuam tsev tsis tiav siv Kev Cia Siab lub hauv siab txuas ntxiv. Siv Kev Cia Siab Lub Hauv Paus tuaj yeem ua rau koj qhov kev tshawb nrhiav tsis tiav
Retro Speech Synthesis. Ntu: 12 IoT, Kev Siv Tsev Hauv Tsev: 12 Cov Kauj Ruam (nrog Duab)
Retro Speech Synthesis. Ntu: 12 IoT, Kev Siv Tsev Hauv Tsev: Kab lus no yog nqe 12 hauv kab lus ntawm kev siv tshuab hauv tsev Qhia cov ntaub ntawv yuav ua li cas tsim thiab koom ua ke IoT Retro Speech Synthesis Device mus rau hauv lub tsev uas twb muaj lawm tshuab suav nrog txhua yam tsim nyog software ua haujlwm kom pab tau
WiFi IoT Kub thiab Vaum Sensor. Ntu: 8 IoT, Kev Siv Tsev Hauv Tsev: 9 Kauj Ruam
WiFi IoT Kub thiab Vaum Sensor. Ntu: 8 IoT, Kev Ua Haujlwm Hauv Tsev: Preamble Cov kab lus no sau cov tswv yim ruggedisation thiab txuas ntxiv mus ntawm kev qhia ua ntej: 'Pimping' koj thawj IoT WiFi Device. Ntu 4: IoT, Kev Ua Haujlwm Hauv Tsev suav nrog txhua qhov tsim nyog software ua haujlwm kom ua tiav