Cov txheej txheem:

Cov Khoom Siv Hauv Tsev Raspberry PI Raws Lub Hwj Chim Saib Xyuas: 14 Cov Kauj Ruam
Cov Khoom Siv Hauv Tsev Raspberry PI Raws Lub Hwj Chim Saib Xyuas: 14 Cov Kauj Ruam

Video: Cov Khoom Siv Hauv Tsev Raspberry PI Raws Lub Hwj Chim Saib Xyuas: 14 Cov Kauj Ruam

Video: Cov Khoom Siv Hauv Tsev Raspberry PI Raws Lub Hwj Chim Saib Xyuas: 14 Cov Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
Cov Khoom Siv Hauv Tsev Raspberry PI Raws Lub Hwj Chim Saib Xyuas
Cov Khoom Siv Hauv Tsev Raspberry PI Raws Lub Hwj Chim Saib Xyuas
Cov Khoom Siv Hauv Tsev Raspberry PI Raws Lub Hwj Chim Saib Xyuas
Cov Khoom Siv Hauv Tsev Raspberry PI Raws Lub Hwj Chim Saib Xyuas

Nov yog qhov haujlwm me me uas kuv tau ua los tshuaj xyuas lub zog siv ntawm cov khoom siv ib puag ncig lub tsev thiab teeb duab ntawm lawv lub zog siv sijhawm. Nws yog ib qho ntawm qhov yooj yim Raspberry PI raws cov haujlwm uas kuv tau ua, tsis muaj qhov txuas lossis nyiag cov khoom qhib yuav tsum tau ua. Nws tsis tas yuav yog Raspberry PI qhov haujlwm, nws tuaj yeem ua tau yooj yim ntawm Linux lub thawv lossis tej zaum Windows.

Tus nqi yog $ 50 AUD rau txheej ntawm 4 ntawm lub hwj chim saib/ntse ntsaws thiab tus nqi ntawm Raspberry PI. Qhov no tuaj yeem khiav ntawm Pi Zero lossis Thawj PI txawm hais tias kuv pom tias nws qeeb me ntsis. Tsuas yog lwm tus PI uas kuv muaj yog PI 3 thiab kuv pom nws zoo nkauj heev, yog li qhov kuv xav qhia. Nco tseg yog tias koj xav khiav nws ntawm PI qub koj tuaj yeem txo qhov zaus ntawm kev khaws cov ntaub ntawv (Kuv tau siv 10 vib nas this).

Txoj haujlwm no tseem muaj qhov txiaj ntsig ntxiv lossis tso lub ntse ntsaws los ntawm cov tuam txhab tsim khoom, yog li koj tsis tas yuav siv lawv cov apps tshwj xeeb thiab kev pabcuam huab. Yog li lawv tuaj yeem siv nrog Tsev Pabcuam lossis tsuas yog nrog koj tus kheej cov ntawv sau nab.

Thov nco ntsoov kuv xav tias koj paub yuav ua li cas rau nruab OS ntawm PI, txuas rau nws thiab khiav qee cov lus txib yooj yim linux. Kuv kuj tseem xav tias koj paub yuav nrhiav tus IP chaw nyob ntawm koj lub ntse ntsaws thaum nws txuas rau koj li WiFi.

Khoom siv

2 pob lossis 4 pob ntawm cov ntse ntsaws los ntawm no:

www.kogan.com/au/buy/kogan-smarterhome-sma…

1 Raspberry PI

Kev txawj:

Muaj peev xwm teeb tsa raspberry PI

Basic linux hais kom ua kab

Cov ntawv nyeem zoo li vi lossis nano (nano yog cov neeg siv zoo dua, vi nrawm dua thaum koj paub nws)

Muaj peev xwm nrhiav IP ntawm cov cuab yeej ntawm koj lub network.

Kauj Ruam 1: Yuav Qee Cov Ntse Plugs

Yuav Ib co Ntse Plugs
Yuav Ib co Ntse Plugs

Cov ntse ntsaws kuv siv yog los ntawm no:

www.kogan.com/au/buy/kogan-smarterhome-sma…

Nco ntsoov tias muaj tag nrho cov ntse ntsaws uas sib xws, feem ntau (tag nrho?) Yog ESP8266 (WEMOS) raws cov cuab yeej thiab yooj yim heev rau nyem. Nco ntsoov kom tau txais qee yam uas muaj lub zog saib xyuas ntau yam tsis ua. Nplooj ntawv no qhia cov npe loj ntawm cov khoom siv sib xws:

templates.blakadder.com/plug.html

Kauj ruam 2: Flashing Device

Qhov no yog qhov yooj yim xav tsis thoob. Koj tsuas yog rub tawm cov software, khiav nws thiab nws coj koj mus.

Txog qhov no koj yuav xav tau Raspberry PI lossis Linux lub thawv nrog WiFi. Koj yuav tsum muaj koj thawj qhov txuas rau lub cuab yeej no TSIS yog WiFi. Rau kuv PI3 qhov no yooj yim li kuv tau txuas nrog Ethernet. Yog tias koj muaj PI Zero ces koj yuav tsum txuas txoj hauv kev qub, nrog cov keyboard thiab saib xyuas.

Kuv xav tias koj paub yuav teeb PI li cas thiab txuas nrog nws nrog SSH lossis cov keyboard yog li kuv yuav tsis hla qhov ntawd. Yog tias koj tsis paub meej muaj ntau cov lus qhia hauv lub vev xaib.

Ua ntej peb pib, tsuas yog me ntsis keeb kwm yav dhau ntawm cov khoom siv. Muaj ib lub tuam txhab nyob hauv Suav teb hu ua Tuya uas tso tawm cov ntse ntsaws rau cov neeg siv khoom sib txawv. Lawv ua kev hloov kho rau cov neeg siv khoom sib txawv thiab muab cov khoom lag luam tsis raug thiab tso cai rau cov tuam txhab ua lawv tus kheej kev hloov kho. Qhov teeb meem nrog qhov no yog tias koj muaj pawg ntawm cov khoom lag luam los ntawm cov neeg muag khoom sib txawv ces koj yuav tsum tau khiav ib pawg ntawm cov apps, qee qhov uas ua haujlwm zoo dua li lwm tus. Los ntawm kev ua kom pom qhov qhib qhov firmware koj tso koj tus kheej los ntawm txhua qhov ntawd. Yog li qhov no zoo rau kev siv tshuab hauv tsev dav dav.

Yog li…. yam tsis muaj ado ntxiv, ntawm no yog cov lus qhia:

1) Khiav cov lus txib ntawm PI, qhov no yuav teeb tsa cov software uas xav tau.

# git clone https://github.com/ct-Open-Source/tuya-convert# cd tuya-convert#./install_prereq.sh

2) Plug lub ntse ntsaws rau lub zog

3) Fais fab nws nrog lub pob

4) tuav lub hwj huam khawm kom txog thaum lub teeb xiav pib ntsais muag

5) Tos 10 vib nas this. Qhov no tsis tseem ceeb tab sis kuv pom tias nws ua haujlwm zoo dua yog tias koj ua.

6) Khiav cov lus txib no

./start_flash.sh

Los ntawm no koj tsuas yog ua raws cov lus qhia tshwj tsis yog thaum kawg xaiv "2. Tasmota". Muaj qhov kev xaiv rau qhov sib txawv firmware tab sis kuv tsis tau sim uas yog li kuv tsis paub tseeb tias nws zoo li cas.

Nco ntsoov tias kuv yuav tsum ua qhov no ntau dua ib zaug, thaum xub thawj kuv xav tias kuv tau ua cov cuab yeej, kuv tsis muaj teeb, tsis muaj kev nyem nyem, tsis muaj lub cim ntawm lub neej. Tab sis kuv txhawb nws thiab khiav qhov lus txib zaum kawg dua thiab nws ua haujlwm. Kuv yuav tsum ua qhov no nrog 3 tawm ntawm 4 lub cuab yeej kuv tau flashed, tsuas yog ib qho mus ncaj, Kuv xav tias yog vim los ntawm kauj ruam 5.

Cov lus qhia tag nrho ntawm no:

github.com/ct-Open-Source/tuya-convert

Kauj Ruam 3: Txuas rau Firmware thawj zaug

Txuas mus rau Firmware thawj zaug
Txuas mus rau Firmware thawj zaug
Txuas mus rau Firmware thawj zaug
Txuas mus rau Firmware thawj zaug
Txuas mus rau Firmware thawj zaug
Txuas mus rau Firmware thawj zaug

Thaum koj flashed tasmota rau ntawm lub cuab yeej nws yuav tsis qhia ntau yam cim ntawm lub neej. Qhov laj thawj rau qhov no yog tias nws yuav tsum tau teeb tsa. Ua qhov no yog qhov yooj yim haum, Kuv pom nws zoo tshaj plaws los ua nws nrog kuv lub xov tooj. Cov kauj ruam yog:

1) Tshawb nrhiav WiFi cov ntsiab lus nkag

2) Txuas mus rau ib daim ntawv lo tasmota_xxxx (qhov x yog tus lej)

3) Lub xov tooj yuav tsum coj koj mus rau nplooj ntawv tsis raug, yog tias tsis mus rau 192.168.4.1

Nco tseg ntawm qee lub xov tooj nws yuav muab koj cov lus hais tias "tsis muaj internet nkag, koj puas xav txuas nrog", xaiv yog.

4) Ntawm nplooj ntawv nws coj mus sau lub npe ntawm koj li Wi -nkaus network thiab tus password rau thawj 2 lub thawv. Nyem qhov kev xaiv los qhia tus lej password thiab kos peb zaug koj tau nkag mus rau tus lej nkag mus raug. Yog tias koj tau nkag mus rau tus lej tsis raug Kuv ntseeg tias nws tuaj yeem nyuaj rov qab los rau lub vijtsam teeb tsa no. Nco tseg koj tseem tuaj yeem tshuaj xyuas rau WiFi tes hauj lwm, txawm hais tias koj pom tseeb tseem xav tau nkag mus rau tus password.

5) Tam sim no lub ntsaws yuav tsum txuas nrog koj li Wi -nkaus network. Koj yuav tsum tau mus rau nplooj ntawv teeb tsa rau koj lub router thiab nrhiav tus IP ntawm koj lub cuab yeej.

6) Qhib lub vev xaib ntawm koj lub PC thiab mus rau https:// [device_ip] Koj yuav tsum pom lub vijtsam teeb tsa los ntawm Tasmota.

Nrog koj zoo siab, koj tau ua tiav lub teeb ntsaws.

Kauj ruam 4: Configuring Plug

Configuring Plug
Configuring Plug

Lub tuam txhab uas ua rau cov cuab yeej no pom tseeb ua rau 10, 000 khoom siv nrog ntau yam teeb tsa sib txawv. Peb twb nyuam qhuav flashed lub firmware tshiab thiab lub firmware tsis paub tias cov cuab yeej twg nws tau raug flashed rau. Yog li ua ntej txhua yam yuav ua haujlwm peb yuav tsum teeb tsa nws. Txhawm rau ua nws peb yuav tsum nrhiav cov ntsiab lus ntawm peb lub cuab yeej hauv lub vev xaib thiab thauj khoom tshwj xeeb.

Txog qhov no, nrhiav koj lub cuab yeej ntawm nplooj ntawv no:

templates.blakadder.com/plug.html

Rau lub cuab yeej kuv siv, teeb tsa nyob ntawm no:

templates.blakadder.com/kogan-KASPEMHUSBA….

Txhawm rau teeb tsa peb tsuas yog luam cov ntawv hauv qab Template. Hauv qhov no nws yog:

Ces

1) Mus rau koj lub cuab yeej teeb tsa nplooj https:// [IP ntawm ntse ntsaws]

2) Nyem teeb tsa, teeb tsa lwm yam

3) Muab tshuaj txhuam rau hauv koj cov hlua qauv

4) Zuam "Enable MQTT"

5) Nyem qhib thiab Txuag.

Txhawm rau ntsuas qhov no tau ua haujlwm, nyem "Cov ntawv qhia zaub mov tseem ceeb" kom rov qab mus rau lub vev xaib thiab tam sim no koj yuav tsum pom cov lej siv fais fab. Lawv txhua tus yuav xoom, txawm tias qhov hluav taws xob tab sis qhov no yog lub cim zoo. Nyem rau khawm toggle thiab koj yuav tsum hnov lub suab sib txuas thiab pom qhov hluav taws xob nce.

Kauj Ruam 5: Calibrate Voltage

Calibrate Voltage
Calibrate Voltage

Kuv pom qhov ntsuas hluav taws xob tau qhia pom zoo heev. Yog tias koj muaj lwm qhov chaw ntawm kev nyeem hluav taws xob hauv tsev (piv txwv li lub ntsuas ntsuas ntse tej zaum ??) ces koj tuaj yeem ntsuas qhov ntsaws tau yooj yim. Ua li no

1) Tau txais qhov ntsuas hluav taws xob raug

2) Qhib lub relay rau hauv lub ntse ntsaws

3) Nyem rau Console hauv qhov home page rau lub cuab yeej

4) Sau cov lus txib "VoltageSet 228" thiab thawb nkag (hloov 228 nrog koj qhov hluav taws xob)

Voltage yuav tsum tam sim no qhia kom raug.

Kauj Ruam 6: Txhim Kho Software ntawm PI

Muaj ob peb pob khoom uas yuav tsum tau teeb tsa ntawm PI. Cov no yooj yim rau nruab thiab tuaj yeem ua tiav raws cov lus qhia los ntawm ntau pob. Kuv yuav muab cov lus qhia ntawm no tab sis nco ntsoov lawv tuaj yeem hloov pauv lub sijhawm yog li kuv cov lus qhia yuav hnub tim. Cov pob yog:

Grafana (rau tso saib cov duab)

Influxdb (lub sijhawm teev cov ntaub ntawv uas yuav khaws peb cov ntaub ntawv)

Telegraf (siv los thawb cov ntaub ntawv rau hauv Influxdb)

Mosquitto (xov tooj cua siv los hla cov ntaub ntawv ib puag ncig, lub ntse ntsaws thawb cov ntaub ntawv ntawm no)

Cov saw ntawm cov ntaub ntawv ntws zoo li no:

Ntse Plug -> Mosquitto -> Telegraf -> InfluxDB -> Grafana

Yog tias koj nug yog vim li cas peb tsis tuaj yeem hla Mosquitto thiab Telegraf, uas yog lo lus nug zoo. Hauv kev xav, Smart Plug tuaj yeem thawb rau Influx. Qhov teeb meem nrog qhov ntawd yog qhov nws yuav tsum tau teeb tsa rau 100s ntawm qhov kawg sib txawv thiab nws yuav kaw peb tawm ntawm qee qhov kev xaiv. Feem ntau cov khoom hauv tsev siv lub tshuab siv Mosquitto kom xa cov lus nyob ib puag ncig. Ua piv txwv, peb tuaj yeem tig lub ntsaws thiab kaw los ntawm kev xa xov mus rau Mosquitto thiab lub ntse ntsaws yuav tau txais lawv thiab teb.

Kauj Ruam 7: Txhim Kho Grafana

Txhim kho Grafana
Txhim kho Grafana

Los ntawm:

grafana.com/grafana/download?platform=arm

Los yog ntau lwm txoj kev xaiv ntawm no:

grafana.com/grafana/download

Rau Pi 1 thiab Pi Zero (ARMv6)

sudo apt-tau nruab -y adduser libfontconfig1#nrhiav qhov hloov tshiab kawg los ntawm nplooj ntawv ntawm topwget https://dl.grafana.com/oss/release/grafana-rpi_7….sudo dpkg -i grafana-rpi_7.0.1_armhf. debsudo /bin /systemctl daemon-reloadsudo /bin /systemctl pab grafana-serversudo /bin /systemctl pib grafana-server

Rau PIs tshiab (ARMv7)

sudo apt -tau nruab -y adduser libfontconfig1#nrhiav qhov tseeb version los ntawm nplooj ntawv ntawm topwget https://dl.grafana.com/oss/release/grafana_7.0.1_…sudo dpkg -i grafana_7.0.1_armhf.debsudo/ bin/systemctl daemon-reloadsudo/bin/systemctl pab grafana-serversudo/bin/systemctl pib grafana-server

Mus Xeem:

Mus rau https:// [IP ntawm PI]: 3000

username/password yog admin/admin, nws yuav nug koj kom hloov nws, koj tuaj yeem hla tam sim no

Yog tias koj tau txais GUI ces txhua yam zoo, txav mus rau theem tom ntej

Kauj Ruam 8: Txhim Kho InfluxDB

Khiav cov lus txib no ntawm PI:

curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key ntxiv -source/etc/os-releasetest $ VERSION_ID = "7" && echo "deb https://repos.influxdata.com/debian wheezy ruaj khov" | sudo tee /etc/apt/sources.list.d/influxdb.listtest $ VERSION_ID = "8" && ncha "deb https://repos.influxdata.com/debian jessie ruaj khov" | sudo tee /etc/apt/sources.list.d/influxdb.listtest $ VERSION_ID = "9" && ncha "deb https://repos.influxdata.com/debian stretch ruaj khov" | sudo tee /etc/apt/sources.list.d/influxdb.listtest $ VERSION_ID = "10" && ncha "deb https://repos.influxdata.com/debian buster ruaj khov" | sudo tee /etc/apt/sources.list.d/influxdb.listsudo apt-tau hloov tshiab apt-tau nruab influxdbsudo systemctl pab kom influxdbsudo systemctl pib influxdb

Kuaj los ntawm kev ntaus "influx". Qhov no yuav tsum tso koj rau hauv kab hais kom ua influxdb. Ntaus "qhia cov ntaub ntawv", yuav tsis muaj cov ntaub ntawv tseem tab sis yog tias koj tau txais cov npe uas tsis muaj qhov yuam kev ces txhua yam zoo.

Kauj Ruam 9: Txhim Kho Telegraf

Qhov no yog ib qho yooj yim heev, vim tias peb tau ntxiv influxdb repos peb tuaj yeem sau:

sudo apt-tau nruab telegrafsudo systemctl pab telegrafsudo systemctl pib telegraf

Txog tam sim no Telegraf yuav twb tau txiav cov txheej txheem ntsuas rau influxdb. Koj tuaj yeem pom lawv los ntawm kev ntaus cov lus txib no:

influxshow databasesuse telegrafshow seriesSELECT * Los ntawm cpu LIMIT 10;

Kauj ruam 10: Nruab Mosquitto

Qhov no yog qhov yooj yim raws li peb tsuas yog teeb tsa lub neej ntawd uas tau ntim nrog raspian:

sudo apt -get -y install mosquittosudo apt -get -y install mosquitto -clientssudo systemctl pab kom mosquittosudo systemctl pib mositto# tsim tus password rau mosquittosudo mosquitto_passwd -c/etc/mosquitto/tasmota tasmota# nkag rau lo lus zais. Sau tus lej zais no raws li peb yuav xav tau muab rau qhov ntse ntsaws

Mus Xeem:

khiav qhov no hauv ib ntu SSH:

mosquitto_sub -t test

Khiav qhov no hauv lwm qhov

mosquitto_pub -t sim -m mymessage

Koj yuav tsum pom koj cov lus hauv thawj SSH ntu

Kauj Ruam 11: Xa Cov Ntaub Ntawv Los Ntawm Smart Plug rau Mosquitto

Xa Cov Ntaub Ntawv Los Ntawm Ntse Plug Rau Mosquitto
Xa Cov Ntaub Ntawv Los Ntawm Ntse Plug Rau Mosquitto

Tam sim no peb muaj mosquitto khiav peb yuav tsum teeb tsa lub ntse ntsaws kom xa cov ntaub ntawv mus rau mosquitto. Qhov no yog qhov yooj yim ua. Peb yuav xav tau tus password nkag mus rau mosquitto los ntawm cov kauj ruam dhau los.

1) Nkag mus rau hauv koj lub vev xaib ntse ntsaws

2) Nyem Configuration, tom qab ntawd Configure Logging

3) Teev lub sijhawm siv xov tooj cua txog 10 thiab nyem tseg.

4) Nyem Configure MQTT

5) Rau tus tswv tsev sau tus IP chaw nyob ntawm koj tus PI

6) Rau lub npe siv nkag mus tasmota

7) Rau tus lej nkag mus lo lus zais los ntawm cov kauj ruam dhau los

8) Rau cov ncauj lus nkag mus tasmota1

9) Nyem tseg

Yuav xeem:

Ntawm PI, ntaus cov lus txib hauv qab no. Hauv 10 vib nas this koj yuav tsum pom cov ntaub ntawv dhau los.

mosquitto_sub -t tele/tasmota1/SENSOR

Cov ntaub ntawv yuav tsum zoo li no:

Kauj Ruam 12: Siv Telegraf los thawb cov ntaub ntawv los ntawm Mosquitto mus rau hauv

Tam sim no peb tab tom teeb tsa Telegraf los nyeem cov ntaub ntawv los ntawm mosquitto thiab thawb rau influxdb. Hauv PI:

1) sudo mv /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.bak

2) sudo vi /etc/telegraf/telegraf.conf

Nco tseg vi tsis yog tus phooj ywg zoo rau cov neeg siv tshiab, yog tias koj xav tau cov ntawv qhia zaub mov raws cov ntawv sau siv nano hloov chaw:

sudo nano /etc/telegraf/telegraf.conf

3) Muab tshuaj txhuam rau hauv qhov teeb tsa los ntawm cov ntawv txuas

4) sudo systemctl rov pib xov tooj

Txhawm rau ntsuas hom no ntawm PI:

kev tuaj

qhia databases

koj yuav tsum pom cov ntawv xeem. Yog tias koj tsis nyiam lub npe xeem koj tuaj yeem hloov dest_db hauv cov ntaub ntawv telegraf.conf.

Kauj Ruam 13: Thaum kawg, Tsim Cov Duab hauv Grafana

Thaum kawg, Tsim Cov Duab hauv Grafana
Thaum kawg, Tsim Cov Duab hauv Grafana

Thaum kawg peb tau pom qee cov ntaub ntawv:-):-)

Ua ntej peb yuav tsum tsim kev sib txuas rau lub database. Mus rau grafana lub vev xaib http: [ip of PI]: 3000

1) Nkag mus nrog admin/admin

2) Hauv kab sab laug nyem lub iav icon thiab cov ntaub ntawv cov ntaub ntawv

3) Nyem ntxiv cov ntaub ntawv qhov chaw

4) Nyem influxdb

5) Rau URL nkag https:// localhost: 8086

6) Rau database nkag xeem

7) Rau HTTP nkag mus Tau

8) Rau lub sijhawm luv luv nkag mus 10s

9) Nyem Txuag thiab Xeem, nws yuav tsum hais "Datasource ua haujlwm"

OK, tam sim no peb muaj kev sib txuas rau lub database peb tuaj yeem tsim teeb duab … thaum kawg.

1) Hauv kab sab laug nyem rau + thiab tom qab ntawd Dashboard thiab Ntxiv Vaj Huam Sib Luag tshiab

2) Rau database nyem InfluxDB

3) Nyem ntsuas thiab xaiv Kogan

4) Rau daim teb xaiv Energy_Power.

5) Rau cov tsis muaj npe, muab koj lub koob npe (piv txwv li Lub Tshuab Ntxhua Khaub Ncaws)

6) Ntawm sab tes xis rau Vaj Huam Sib Luag Muab lub npe rau nws, piv txwv li Lub Hwj Chim.

7) Qhov ntawd yog nws, koj yuav tsum pom cov ntaub ntawv. Nyem rau sab laug khawm kom tawm ntawm kev hloov pauv thiab tom qab ntawd nyem tseg, muab koj lub dashboard lub npe.

Yog tias koj tau txais qhov no deb, ua haujlwm zoo, mob siab rau.

Kauj Ruam 14: Ob peb Yam Lus Qhia Ntxiv

Ob peb Yam Lus Qhia Ntxiv
Ob peb Yam Lus Qhia Ntxiv
Ob peb Yam Lus Qhia Ntxiv
Ob peb Yam Lus Qhia Ntxiv

Lub neej ntawd Telegraf teeb tsa kuv tau muab yog kev saib xyuas me ntsis nyob rau hauv uas ntu tshiab yuav tsum tau ntxiv rau txhua lub cuab yeej thiab rov pib dua ntawm Telegraf yuav tsum tau ua. Nrog cov kev hloov pauv hauv qab no nws ua rau muaj ntau yam hloov pauv hauv cov cuab yeej ntawd tuaj yeem ntxiv lossis hloov pauv hauv Tasmota teeb tsa yam tsis tas yuav hloov Telegraf.

Thawj qhov kev hloov pauv yog tso lub + hauv lub ncauj lus lub npe, qhov no yog qhov pib siv tus tsiaj qus. Qhov no ntawm nws tus kheej yuav txaus tshwj tsis yog thaum koj tab tom teeb duab hauv Grafana cov cuab yeej los ua lub npe zoo li "tele/WashingMachine/SENSOR". Qhov thib ob ntawm Telegraf teeb tsa hauv qab no yog lub regex processor. Nws rub cov ntawv "WashMachine" tawm ntawm qhov chaw thiab hloov nws mus rau hauv cov ntawv tshiab uas tau thawb rau InfluxDB.

Nco tseg: nco ntsoov teeb tsa lub npe sib txawv hauv Tasmota teeb tsa rau txhua lub cuab yeej

[inputs.mqtt_consumer.tags] dest_db = "xeem"

Thaum qhov no ua tiav nws yooj yim heev rau teeb tsa Grafana los qhia ntau yam khoom siv ntawm ib daim duab. Daim duab txuas rau qib no qhia txog yam yuav tsum tau ua. Tsuas yog nyem rau + kos npe rau ntawm pab pawg los ntawm kab thiab xaiv tag (ntaus ntawv). Hauv qab ntawm Alias Los ntawm kev nkag mus $ tag_device. Tam sim no koj yuav tsum pom ntau kab nyob ntawm ib daim duab. Koj tuaj yeem nyem kab ntawv ntawm txhua yam kom qhib thiab tua (ctrl nyem ua haujlwm kom xaiv ntau)

Pom zoo: