PZEM004 jednofazowy Licznik Energii Elektrycznej

Awatar użytkownika
klew
Posty: 8184
Rejestracja: czw cze 27, 2019 12:16 pm
Lokalizacja: Wrocław

forall pisze: wt paź 20, 2020 6:15 pm Mistrzowie :-) mam pytanie, mam pompę ciepła, która ma jednostkę wewnątrzna i zewnętrzna, obie są podłączone na różnych bezpiecznikach w rozdzielni... I MEW-01 tego nie ogarnę :((( potrzebowałbym wlasnie takiego licznika dla jednej fazy dla jednostki zewnętrznej..czy to rozwiązanie zda egzamin, po prostu chcę widzieć ile prądu pobiera jednostka zewnętrzna....?
MEW jest 3-fazowy, więc nie powinno być problemu z podłączeniem tego. Najwyżej w rozdzielni trzeba trochę przewody odpowiednio poukładać. Albo przeżuć obwód jednofazowy na zabezpieczenie jednostki zasilanej 3-fazowo.
Oczywiście wszystko zleć elektrykowi
Widzimy się na Supla Offline Party vol. 2 :!:
forall
Posty: 189
Rejestracja: sob cze 15, 2019 10:36 am

Według serwisu, który uruchamiał pompę powinno być tak jak teraz, a w dokumentacji od nich jest że jednostka zewnętrzna może byc zasilana z wewnetrznej... Może im tak wygodniej jak jedna i druga są na osobnych obwodach...
Chciałem dlatego dać tego PZEM004 na zewnętrzna jednostkę a MEW-01 na wewnątrzna...
10xSRW-01, 1xSBW-01 + 2xMEW-01
Awatar użytkownika
klew
Posty: 8184
Rejestracja: czw cze 27, 2019 12:16 pm
Lokalizacja: Wrocław

forall pisze: śr paź 21, 2020 3:24 pm Według serwisu, który uruchamiał pompę powinno być tak jak teraz, a w dokumentacji od nich jest że jednostka zewnętrzna może byc zasilana z wewnetrznej... Może im tak wygodniej jak jedna i druga są na osobnych obwodach...
Chciałem dlatego dać tego PZEM004 na zewnętrzna jednostkę a MEW-01 na wewnątrzna...
Możesz takiego PZEM-a podłączyć do monitorowania jednego obwodu. Będzie to działać ;)
Widzimy się na Supla Offline Party vol. 2 :!:
forall
Posty: 189
Rejestracja: sob cze 15, 2019 10:36 am

@klew - z tego poczytałem tutaj to ma działać :-)
Do jednostki wewnętrznej mógłbym podłączyć MEW-01 już.
Znalazłby się ktoś chętny żeby takiego gotowca zrobić, sprzedać?
10xSRW-01, 1xSBW-01 + 2xMEW-01
grzegorz.d3
Posty: 38
Rejestracja: sob lut 01, 2020 3:53 pm

A ma może ktoś ten kod przerobiony żeby był wyświetlacz.

Kod: Zaznacz cały

  Copyright (C) AC SOFTWARE SP. Z O.O.

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2
   of the License, or (at your option) any later version.
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU General Public License for more details.
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   */
  // this example will work only on esp8266 and esp32 boards. On Arduino mega it will not fly.
  //dependence: Arduino library for the Updated PZEM-004T v3.0 Power and Energy meter  https://github.com/mandulaj/PZEM-004T-v30

#include <SPI.h>
#include <SuplaDevice.h>
#include <supla/io.h>
#include <supla/sensor/three_phase_PzemV3.h>

// ESP8266 based board:
#include <supla/network/esp_wifi.h>
Supla::ESPWifi wifi("twoja_nazwa_sieci", "twoje_haslo_do_sieci");

void setup() {

    Serial.begin(9600);

    // Replace the falowing GUID with value that you can retrieve from https://www.supla.org/arduino/get-guid 
    char GUID[SUPLA_GUID_SIZE] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //wygeneruj z linku powyżej i podmień

    // Replace the following AUTHKEY with value that you can retrieve from: https://www.supla.org/arduino/get-authkey zrobiłem
    char AUTHKEY[SUPLA_AUTHKEY_SIZE] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //wygeneruj z linku powyżej i podmień

  //Ustaw GPIO jakie chcesz, RX jest wspólny 
  int rx=3;
  int tx1=1;
  int tx2=5;
  int tx3=4; 
  new Supla::Sensor::ThreePhasePZEMv3(rx, tx1, rx, tx2, rx, tx3);

    /*
     * SuplaDevice Initialization.
     * Server address, is available at https://cloud.supla.org
     * If you do not have an account, you can create it at https://cloud.supla.org/account/create
     * SUPLA and SUPLA CLOUD are free of charge
     *
     */

    //wifi.enableSSL(false);  //jeśli nie będzie chciał się zarejestrować to wyłącz SSL
    
    //podaj nr serwera i adres email
    SuplaDevice.begin(GUID, // Global Unique Identifier
            "svr1.supla.org", // SUPLA server address
            "email@address", // Email address used to login to Supla Cloud
            AUTHKEY); // Authorization key

}

void loop() {
    SuplaDevice.iterate();
}
Maniek913
Posty: 491
Rejestracja: czw lut 22, 2018 9:46 pm

lesny8 pisze: pn cze 29, 2020 9:32 pm 1. Usuń zainstalowaną bibliotekę SuplaDevice
2. Pobierz https://github.com/klew/arduino/archive/master.zip
3. Rozpakuj
4. Skopiuj to SuplaDevice z rozpakowanej ścieżki Pobrane/arduino-master/libraries/
5. Wklej do katalogu z bibliotekami Katalog domowy/Arduino/libraries/
6. Otwórz Arduino IDE
7. Utwórz nowy szkic
8. Wklej poniższy kod, wypełnij swoimi danymi
9. Wgraj na wemosa

Kod: Zaznacz cały

/*
   Copyright (C) AC SOFTWARE SP. Z O.O.

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2
   of the License, or (at your option) any later version.
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU General Public License for more details.
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   */
  // this example will work only on esp8266 and esp32 boards. On Arduino mega it will not fly.
  //dependence: Arduino library for the Updated PZEM-004T v3.0 Power and Energy meter  https://github.com/mandulaj/PZEM-004T-v30

#include <SPI.h>
#include <SuplaDevice.h>
#include <supla/io.h>
#include <supla/sensor/three_phase_PzemV3.h>

// ESP8266 based board:
#include <supla/network/esp_wifi.h>
Supla::ESPWifi wifi("twoja_nazwa_sieci", "twoje_haslo_do_sieci");

void setup() {

    Serial.begin(9600);

    // Replace the falowing GUID with value that you can retrieve from https://www.supla.org/arduino/get-guid 
    char GUID[SUPLA_GUID_SIZE] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //wygeneruj z linku powyżej i podmień

    // Replace the following AUTHKEY with value that you can retrieve from: https://www.supla.org/arduino/get-authkey zrobiłem
    char AUTHKEY[SUPLA_AUTHKEY_SIZE] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //wygeneruj z linku powyżej i podmień

  //Ustaw GPIO jakie chcesz, RX jest wspólny 
  int rx=3;
  int tx1=1;
  int tx2=5;
  int tx3=4; 
  new Supla::Sensor::ThreePhasePZEMv3(rx, tx1, rx, tx2, rx, tx3);

    /*
     * SuplaDevice Initialization.
     * Server address, is available at https://cloud.supla.org
     * If you do not have an account, you can create it at https://cloud.supla.org/account/create
     * SUPLA and SUPLA CLOUD are free of charge
     *
     */

    //wifi.enableSSL(false);  //jeśli nie będzie chciał się zarejestrować to wyłącz SSL
    
    //podaj nr serwera i adres email
    SuplaDevice.begin(GUID, // Global Unique Identifier
            "svr1.supla.org", // SUPLA server address
            "email@address", // Email address used to login to Supla Cloud
            AUTHKEY); // Authorization key

}

void loop() {
    SuplaDevice.iterate();
}
Czy mógłby mi ktoś wskazać odpowiednią bibliotekę do kompilacji licznika 3faz ? Stosując bibliotekę z powyższego linku mam taki wynik kompilacji:

Kod: Zaznacz cały

Arduino:1.8.13 (Windows Store 1.8.42.0) (Windows 10), Płytka:"Generic ESP8266 Module, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), ck, 26 MHz, 40MHz, DOUT (compatible), 512K (no SPIFFS), 2, nonos-sdk 2.2.1 (legacy), v2 Lower Memory, Disabled, None, Only Sketch, 115200"





















C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp: In function 'void Supla::initTimers()':

C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp:66:37: error: 'os_timer_func_t' was not declared in this scope

   os_timer_setfn(&supla_esp_timer, (os_timer_func_t *)esp_timer_cb, NULL);

                                     ^

C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp:66:54: error: expected primary-expression before ')' token

   os_timer_setfn(&supla_esp_timer, (os_timer_func_t *)esp_timer_cb, NULL);

                                                      ^

C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp:70:58: error: expected primary-expression before ')' token

   os_timer_setfn(&supla_esp_fastTimer, (os_timer_func_t *)esp_fastTimer_cb, NULL);

                                                          ^

exit status 1

Błąd kompilacji dla płytki Generic ESP8266 Module.



Ten raport powinien zawierać więcej informacji jeśli w 
File -> Preferencje zostanie włączona opcja "Pokaż
szczegółowe informacje podczas kompilacji"
Awatar użytkownika
klew
Posty: 8184
Rejestracja: czw cze 27, 2019 12:16 pm
Lokalizacja: Wrocław

Maniek913 pisze: pn lis 23, 2020 5:37 pm
lesny8 pisze: pn cze 29, 2020 9:32 pm 1. Usuń zainstalowaną bibliotekę SuplaDevice
2. Pobierz https://github.com/klew/arduino/archive/master.zip
3. Rozpakuj
4. Skopiuj to SuplaDevice z rozpakowanej ścieżki Pobrane/arduino-master/libraries/
5. Wklej do katalogu z bibliotekami Katalog domowy/Arduino/libraries/
6. Otwórz Arduino IDE
7. Utwórz nowy szkic
8. Wklej poniższy kod, wypełnij swoimi danymi
9. Wgraj na wemosa

Kod: Zaznacz cały

/*
   Copyright (C) AC SOFTWARE SP. Z O.O.

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2
   of the License, or (at your option) any later version.
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU General Public License for more details.
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   */
  // this example will work only on esp8266 and esp32 boards. On Arduino mega it will not fly.
  //dependence: Arduino library for the Updated PZEM-004T v3.0 Power and Energy meter  https://github.com/mandulaj/PZEM-004T-v30

#include <SPI.h>
#include <SuplaDevice.h>
#include <supla/io.h>
#include <supla/sensor/three_phase_PzemV3.h>

// ESP8266 based board:
#include <supla/network/esp_wifi.h>
Supla::ESPWifi wifi("twoja_nazwa_sieci", "twoje_haslo_do_sieci");

void setup() {

    Serial.begin(9600);

    // Replace the falowing GUID with value that you can retrieve from https://www.supla.org/arduino/get-guid 
    char GUID[SUPLA_GUID_SIZE] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //wygeneruj z linku powyżej i podmień

    // Replace the following AUTHKEY with value that you can retrieve from: https://www.supla.org/arduino/get-authkey zrobiłem
    char AUTHKEY[SUPLA_AUTHKEY_SIZE] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //wygeneruj z linku powyżej i podmień

  //Ustaw GPIO jakie chcesz, RX jest wspólny 
  int rx=3;
  int tx1=1;
  int tx2=5;
  int tx3=4; 
  new Supla::Sensor::ThreePhasePZEMv3(rx, tx1, rx, tx2, rx, tx3);

    /*
     * SuplaDevice Initialization.
     * Server address, is available at https://cloud.supla.org
     * If you do not have an account, you can create it at https://cloud.supla.org/account/create
     * SUPLA and SUPLA CLOUD are free of charge
     *
     */

    //wifi.enableSSL(false);  //jeśli nie będzie chciał się zarejestrować to wyłącz SSL
    
    //podaj nr serwera i adres email
    SuplaDevice.begin(GUID, // Global Unique Identifier
            "svr1.supla.org", // SUPLA server address
            "email@address", // Email address used to login to Supla Cloud
            AUTHKEY); // Authorization key

}

void loop() {
    SuplaDevice.iterate();
}
Czy mógłby mi ktoś wskazać odpowiednią bibliotekę do kompilacji licznika 3faz ? Stosując bibliotekę z powyższego linku mam taki wynik kompilacji:

Kod: Zaznacz cały

Arduino:1.8.13 (Windows Store 1.8.42.0) (Windows 10), Płytka:"Generic ESP8266 Module, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), ck, 26 MHz, 40MHz, DOUT (compatible), 512K (no SPIFFS), 2, nonos-sdk 2.2.1 (legacy), v2 Lower Memory, Disabled, None, Only Sketch, 115200"





















C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp: In function 'void Supla::initTimers()':

C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp:66:37: error: 'os_timer_func_t' was not declared in this scope

   os_timer_setfn(&supla_esp_timer, (os_timer_func_t *)esp_timer_cb, NULL);

                                     ^

C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp:66:54: error: expected primary-expression before ')' token

   os_timer_setfn(&supla_esp_timer, (os_timer_func_t *)esp_timer_cb, NULL);

                                                      ^

C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp:70:58: error: expected primary-expression before ')' token

   os_timer_setfn(&supla_esp_fastTimer, (os_timer_func_t *)esp_fastTimer_cb, NULL);

                                                          ^

exit status 1

Błąd kompilacji dla płytki Generic ESP8266 Module.



Ten raport powinien zawierać więcej informacji jeśli w 
File -> Preferencje zostanie włączona opcja "Pokaż
szczegółowe informacje podczas kompilacji"
Czy masz najnowszą wersję softu do board esp8266?
Widzimy się na Supla Offline Party vol. 2 :!:
Maniek913
Posty: 491
Rejestracja: czw lut 22, 2018 9:46 pm

klew pisze: pn lis 23, 2020 7:40 pm
Maniek913 pisze: pn lis 23, 2020 5:37 pm
lesny8 pisze: pn cze 29, 2020 9:32 pm 1. Usuń zainstalowaną bibliotekę SuplaDevice
2. Pobierz https://github.com/klew/arduino/archive/master.zip
3. Rozpakuj
4. Skopiuj to SuplaDevice z rozpakowanej ścieżki Pobrane/arduino-master/libraries/
5. Wklej do katalogu z bibliotekami Katalog domowy/Arduino/libraries/
6. Otwórz Arduino IDE
7. Utwórz nowy szkic
8. Wklej poniższy kod, wypełnij swoimi danymi
9. Wgraj na wemosa

Kod: Zaznacz cały

/*
   Copyright (C) AC SOFTWARE SP. Z O.O.

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2
   of the License, or (at your option) any later version.
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU General Public License for more details.
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   */
  // this example will work only on esp8266 and esp32 boards. On Arduino mega it will not fly.
  //dependence: Arduino library for the Updated PZEM-004T v3.0 Power and Energy meter  https://github.com/mandulaj/PZEM-004T-v30

#include <SPI.h>
#include <SuplaDevice.h>
#include <supla/io.h>
#include <supla/sensor/three_phase_PzemV3.h>

// ESP8266 based board:
#include <supla/network/esp_wifi.h>
Supla::ESPWifi wifi("twoja_nazwa_sieci", "twoje_haslo_do_sieci");

void setup() {

    Serial.begin(9600);

    // Replace the falowing GUID with value that you can retrieve from https://www.supla.org/arduino/get-guid 
    char GUID[SUPLA_GUID_SIZE] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //wygeneruj z linku powyżej i podmień

    // Replace the following AUTHKEY with value that you can retrieve from: https://www.supla.org/arduino/get-authkey zrobiłem
    char AUTHKEY[SUPLA_AUTHKEY_SIZE] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //wygeneruj z linku powyżej i podmień

  //Ustaw GPIO jakie chcesz, RX jest wspólny 
  int rx=3;
  int tx1=1;
  int tx2=5;
  int tx3=4; 
  new Supla::Sensor::ThreePhasePZEMv3(rx, tx1, rx, tx2, rx, tx3);

    /*
     * SuplaDevice Initialization.
     * Server address, is available at https://cloud.supla.org
     * If you do not have an account, you can create it at https://cloud.supla.org/account/create
     * SUPLA and SUPLA CLOUD are free of charge
     *
     */

    //wifi.enableSSL(false);  //jeśli nie będzie chciał się zarejestrować to wyłącz SSL
    
    //podaj nr serwera i adres email
    SuplaDevice.begin(GUID, // Global Unique Identifier
            "svr1.supla.org", // SUPLA server address
            "email@address", // Email address used to login to Supla Cloud
            AUTHKEY); // Authorization key

}

void loop() {
    SuplaDevice.iterate();
}
Czy mógłby mi ktoś wskazać odpowiednią bibliotekę do kompilacji licznika 3faz ? Stosując bibliotekę z powyższego linku mam taki wynik kompilacji:

Kod: Zaznacz cały

Arduino:1.8.13 (Windows Store 1.8.42.0) (Windows 10), Płytka:"Generic ESP8266 Module, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), ck, 26 MHz, 40MHz, DOUT (compatible), 512K (no SPIFFS), 2, nonos-sdk 2.2.1 (legacy), v2 Lower Memory, Disabled, None, Only Sketch, 115200"





















C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp: In function 'void Supla::initTimers()':

C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp:66:37: error: 'os_timer_func_t' was not declared in this scope

   os_timer_setfn(&supla_esp_timer, (os_timer_func_t *)esp_timer_cb, NULL);

                                     ^

C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp:66:54: error: expected primary-expression before ')' token

   os_timer_setfn(&supla_esp_timer, (os_timer_func_t *)esp_timer_cb, NULL);

                                                      ^

C:\Users\damia\Documents\Arduino\libraries\SuplaDevice\src\supla\timer.cpp:70:58: error: expected primary-expression before ')' token

   os_timer_setfn(&supla_esp_fastTimer, (os_timer_func_t *)esp_fastTimer_cb, NULL);

                                                          ^

exit status 1

Błąd kompilacji dla płytki Generic ESP8266 Module.



Ten raport powinien zawierać więcej informacji jeśli w 
File -> Preferencje zostanie włączona opcja "Pokaż
szczegółowe informacje podczas kompilacji"
Czy masz najnowszą wersję softu do board esp8266?
No..... nie miałem :oops: Teraz jest OK
Wielkie dzięki za szybką odpowiedź.
pawel2223
Posty: 3
Rejestracja: ndz sty 07, 2018 7:26 pm

Witam,
Ma ktoś na sprzedaż płytkę PCB 1F i 3 F ?
Maniek913
Posty: 491
Rejestracja: czw lut 22, 2018 9:46 pm

mam 1szt 1Faz
ODPOWIEDZ

Wróć do „Nowości”