Cov txheej txheem:

ESP8266 & Pej Xeem "Dawb" MQTT Broker HiveMQ & Node-RED: 6 Kauj Ruam (nrog Duab)
ESP8266 & Pej Xeem "Dawb" MQTT Broker HiveMQ & Node-RED: 6 Kauj Ruam (nrog Duab)

Video: ESP8266 & Pej Xeem "Dawb" MQTT Broker HiveMQ & Node-RED: 6 Kauj Ruam (nrog Duab)

Video: ESP8266 & Pej Xeem
Video: Кто умнее - Тимур Батрутдинов или школьники? Шоу Иды Галич 1-11 2024, Kaum ib hlis
Anonim
ESP8266 & Pej Xeem
ESP8266 & Pej Xeem

MQTT cov txheej txheem tau siv lub zog zoo hauv xyoo tas los no txij li nws yooj yim, nyab xeeb, siv tau thiab hnav zoo meej rau IoT thiab M2M daim ntawv thov.

Ua tsaug rau kev koom tes ntawm cov tsim tawm thiab tsim tawm ntawm MQTT daim ntawv thov, muaj pej xeem MQTT Broker rau Internet tshuaj xyuas thiab tswj kev ntsuas, muaj kev sib txuas los ntawm ib tus neeg siv MQTT hauv qhov no peb yuav siv HIVEMQ, uas muaj dashboard los saib MQTT kev sib txuas thiab Web sockets, vim nws yog pej xeem yuav tsum muaj qee qhov kev txiav txim siab uas peb yuav pom hauv qab no.

Lub vev xaib raug cai: HiveMQDashboard MQTT: HiveMQ

Kev sib txuas Broker MQTT

  • Tus broker: broker.hivemq.com
  • Chaw nres nkoj TCP: 1883
  • Websocket Chaw nres nkoj: 8000

Kuaj

Tom qab ntawd peb yuav ua 2 qhov kev xeem:

  1. Kev Sib Txuas Broker MQTT HIVEMQ nrog Node-RED.
  2. Kev Sib Txuas Broker MQTT HIVEMQ nrog ESP8266 & Node-RED.

Ua tiav kev qhia thiab rub tawm

Yog xav paub ntxiv, thov mus saib:

Para mas información visita:

Kauj Ruam 1: Nruab Node-RED

Image
Image

Kauj Ruam 2: Qee qhov Cheeb Tsam Yuav Tsum Ua Rau Tsev & Kev Xeem

Qee qhov Cheeb Tsam Yuav Tsum Tau Ua rau Tsev & Kev Xeem
Qee qhov Cheeb Tsam Yuav Tsum Tau Ua rau Tsev & Kev Xeem
Qee qhov Cheeb Tsam Yuav Tsum Tau Ua rau Tsev & Kev Xeem
Qee qhov Cheeb Tsam Yuav Tsum Tau Ua rau Tsev & Kev Xeem

Qee qhov khoom siv xav tau rau kev tsim & ntsuas:

ESP8266 12E -

Sensor DS18B20 Onewire -

3 Kuj 10K

Kauj Ruam 3: Kuaj 1: Kev Sib Txuas Broker MQTT HIVEMQ Nrog Node-RED

Image
Image
Kuaj 1: Kev Sib Txuas Broker MQTT HIVEMQ Nrog Node-RED
Kuaj 1: Kev Sib Txuas Broker MQTT HIVEMQ Nrog Node-RED

Siv Node-RED yav dhau los teeb tsa ntawm lub server hauv zos hauv kuv lub network, peb yuav ua MQTT kev sib txuas nrog HIVEMQ txhawm rau txheeb xyuas qhov kev sib txuas los ntawm ib tus neeg siv MQTT.

Kauj ruam 4: Architecture

Architecture
Architecture

Kev Sib Txuas Sensor

ESP8266 tus qauv tau teeb tsa ua MQTT tus neeg siv khoom thiab ua qhov ntsuas kub ib ntus ntawm DS18B20 sensor, txuas nrog D4 tus pin (Gpio 02), muab rau 5v, nrog nws qhov kev pom zoo tiv thaiv hauv cov ntaub ntawv maxim.

Yuav tsum muaj cov tsev qiv ntawv:

  • PubSubClient.h
  • OneWire.h
  • DallasTemperature.h

Kauj Ruam 5: Kuaj 2: Kev Sib Txuas Broker MQTT HIVEMQ Nrog ESP8266 & Node-RED

Image
Image

Hauv qhov xwm txheej no tus qauv ESP8266 12E NodeMCU teeb tsa raws li tus neeg siv MQTT nyeem qhov ntsuas kub DS18B20 raws tu qauv (Onewire) xa qhov ntsuas kub ntawm MQTT mus rau Tus Neeg Sawv Cev HIVEMQ thiab Node-RED teeb tsa hauv lub zos network thov tus nqi kub thiab teeb ntawm Node-RED Dashboard.

MQTT Cov ntsiab lus "kub/PDAC Tswj/ntsuas"

Xov

Piv txwv tus nqi ntsuas kub "28.9"

Kauj Ruam 6: Cov lus xaus thiab Cov Lus Qhia Ntxiv

Cov lus xaus thiab Cov Lus Qhia Ntxiv
Cov lus xaus thiab Cov Lus Qhia Ntxiv

Peb txiav txim siab tias txawm hais tias tus kws tshaj lij tus tswv lag luam yog pej xeem peb tsis paub daim ntawv thov uas txuas nrog tas li rau tus broker no, thiab vim nws yog pub dawb rau pej xeem HIVE muaj ntau yam kev cai lij choj uas yuav tsum tau coj mus rau hauv tus account.

Peb tsuas yog ua qhov ntsuas nrawm, txawm hais tias nws yuav tsum tau sau tseg tias lawv tau teeb tsa lawv daim ntawv thov IoT nrog tus tswv lag luam no yam tsis muaj teeb meem tshwm sim qhov kev pabcuam tau qhib thiab pej xeem.

Nrog tus tswv lag luam hauv huab (intenet) los ntawm txhua qhov chaw peb tuaj yeem txuas peb cov cuab yeej thiab daim ntawv thov yam tsis txwv tus IP chaw nyob thiab lwm yam kev txwv, tam sim no tshawb fawb cov phiaj xwm thiab kev pabcuam ntawm MQTT servers.

Hauv cov lus qhia tom ntej no peb yuav sim lwm qhov pej xeem MQTT servers thiab cuam tshuam nrog FRED (Node-RED).

Lwm tus tshaj tawm Broker's

Public Broker Tests Mosca.io

Pom zoo: