Cov txheej txheem:

Shelly EM Pib Toggle Raws Li Hnub Ci Panels Ntau Lawm: 6 Cov Kauj Ruam
Shelly EM Pib Toggle Raws Li Hnub Ci Panels Ntau Lawm: 6 Cov Kauj Ruam

Video: Shelly EM Pib Toggle Raws Li Hnub Ci Panels Ntau Lawm: 6 Cov Kauj Ruam

Video: Shelly EM Pib Toggle Raws Li Hnub Ci Panels Ntau Lawm: 6 Cov Kauj Ruam
Video: ताले की चाभी खो जाए तो? by Right To Shiksha 2024, Hlis ntuj nqeg
Anonim
Image
Image

P1: kev siv tsev (piv txwv li "P1 = 1kW" ⇒ peb tab tom siv 1kW) P2: cov khoom siv hnub ci tsim tawm (piv txwv li "P2 = - 4kW" ⇒ peb tab tom tsim 4kW)

Lub rhaub hluav taws xob siv 2kW thaum qhib.

  • Peb xav tig nws yog tias lub hnub ci tsim khoom tsim tawm tsawg kawg 2kW kev siv hluav taws xob tam sim no.
  • Peb xav tig nws tawm yog tias peb tau siv ntau dua li lub hnub ci tsim khoom

Kauj Ruam 1: Yam Koj Xav Tau

Koj yuav xav tau:

  • Wi-nkaus kev twb kev txuas
  • Shelly EM (nrog ob lub clamps - hauv kuv rooj plaub 2x50A tau zoo)
  • Wi-nkaus txuas (piv txwv li Shelly 1)
  • Node.js daim ntawv thov

Kauj Ruam 2: Txuas Koj Li Shelly EM

Tua lub txee hluav taws xob dav dav

  1. Thawj qhov uas yuav tsum tau ua yog xaim lub clamps mus rau Shelly EM (P1+, P1- rau thawj clamp, P2+, P2- rau lwm qhov): txuas lawv raws li tau qhia hauv Phau Ntawv Qhia Qhia.
  2. Tom qab ntawd, coj nws ze rau ntawm koj lub txee thiab txuas lub zog siv: cov tswv yim nruab nrab rau N, thiab kab nkag mus rau L.
  3. Tam sim no, txuas thawj lub clamp (P1) rau cov xaim uas mus rau koj lub tsev, thiab lwm qhov txuas rau cov xaim uas los ntawm lub hnub ci vaj huam sib luag inverter. Nws muaj peev xwm tias koj yuav muaj qee yam coj txawv txawv nrog cov cim (tsis zoo noj): tsuas yog tsis quav ntsej tam sim no.
  4. Qhib lub txee hluav taws xob thiab ua raws li Cov Lus Qhia Siv rau kev txuas Shelly EM rau koj li Wi-nkaus.
  5. Thaum koj muaj lub zog siv tam sim no ntawm koj lub app, koj tuaj yeem hloov qhov kev taw qhia ntawm clamps kom muaj tus lej zoo los ntawm P1, thiab tus lej tsis zoo (kev tsim khoom zoo - tsis zoo) los ntawm P2, txij li peb tau ntsuas kev noj haus.

Kauj Ruam 3: Tau Txais Koj Cov API Tokens thiab Koj Cov Ntaub Ntawv EM

Shelly EM

Los ntawm Shelly Cloud app, mus rau "Cov Chaw Siv" thiab tom qab ntawd nyem rau ntawm "Tau tus yuam sij" khawm.

Qhov tseem ceeb yuav yog YOUR_KEY, thiab server YOUR_SERVER.

Tam sim no mus rau nplooj ntawv tseem ceeb. Qhib chav ntawm koj EM, thiab tom qab ntawv nyem rau EM. Mus rau "Chaw", "Cov ntaub ntawv xov xwm" thiab luam cov cuab yeej ID (YOUR_ID - tsuas yog tus lej thiab ib tus lej, tsis yog ib tus brakets) thiab cov cuab yeej channel (YOUR_CHANNEL).

Ntse hloov

Yog tias koj muaj Shelly 1, koj tsis tas yuav ua dab tsi ntxiv. Txwv tsis pub, koj yuav tsum paub qhov twg yog qhov URL thov kom qhib lossis kaw koj lub cuab yeej. Ob qho no yuav yog koj_EAR_ON_ON thiab YOUR_ END_TURN_OFF.

Koj yuav tsum paub qhov twg yog koj lub cuab yeej siv (YOUR_DEVICE_CONSUMPTION). Kuv qhia koj kom tso tus lej siab me ntsis (piv txwv li yog tias koj lub cuab yeej siv 1900W, muab 2000W).

Kauj Ruam 4: Teeb Koj Daim Ntawv Thov Node.js

shelly_server = 'YOUR_SERVER';

shelly_key = 'KOJ_KEY; shelly_channel = 'KOJ_CHANNEL'; shelly_id = 'YOUR_ID'; tig_on_url = 'KOJ_EARY_ON_ON'; turn_off_url = 'YOUR_ END_TURN_OFF'; device_consumption = YOUR_DEVICE_CONSUMPTION; // piv txwv li rau 2kW tso: 2000 const device = function (status) {if (status == 'on') {fetch (turn_on_url).then (res => res.text ()); } lwm tus yog (xwm txheej == 'tawm') {fetch (turn_off_url).then (res => res.text ()); }} nqa (shelly_server + '/ntaus ntawv/xwm txheej? channel =' + shelly_channel + '& id =' + shelly_id + '& auth_key =' + shelly_key).thiab (res => res.json ()).then (json => {yog (json.isok) {emeters = json.data.device_status.emeters; home_consumption = emeters [0].power; //> 0 solar_panels_production = - emeters [1].power; //> 0 available_energy = solar_panels_production - home_consumption; yog tias muaj (khoom siv_energy device_consumption) {ntaus ntawv ('ntawm');}} lwm qhov {// Shelly EM tsis tuaj yeem ncav cuag}});

Kauj ruam 5: Khiav Koj Daim Ntawv Thov

Tam sim no, koj yuav tsum khiav koj Node.js daim ntawv thov txuas ntxiv mus. Kuv khiav nws txhua 60 vib nas this, tab sis koj tuaj yeem nce lossis txo tus lej no raws li lub sijhawm teb siab tshaj plaws uas koj xav tau rau qhib lossis tua koj lub cuab yeej.

Kauj ruam 6: Ua tiav

Nrog koj zoo siab! Tam sim no koj muaj lub cuab yeej uas tig rau thaum koj yuav tsis them dab tsi rau nws, thiab qhov ntawd txiav tawm thaum koj yuav them hluav taws xob rau nws!

Pom zoo: