PZEM004 jednofazowy Licznik Energii Elektrycznej

adamkody
Posty: 29
Rejestracja: wt lis 14, 2017 10:33 am

dzieki wielkie niestety nie chce sie zarejestrowac
adamkody
Posty: 29
Rejestracja: wt lis 14, 2017 10:33 am

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("xxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxx");

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.disableSSL(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
            "svr11.supla.org", // SUPLA server address
            "xxxxxxxxxxxxxxx@gmail.com", // Email address used to login to Supla Cloud
            AUTHKEY); // Authorization key

}

void loop() {
    SuplaDevice.iterate();
}
adamkody
Posty: 29
Rejestracja: wt lis 14, 2017 10:33 am

cały czas rozgłasza siec ESP-735C8B
Awatar użytkownika
lesny8
Posty: 2814
Rejestracja: pn gru 11, 2017 9:43 pm

Wygenerowałeś GUID i AUTHKEY?

Jestem tam jeszcze taka linia

Kod: Zaznacz cały

//wifi.disableSSL(false);  //jeśli nie będzie chciał się zarejestrować to wyłącz SSL
Usuń znak komentarza // z przodu
Czekam na kolejne Supla Offline Party 👍
Awatar użytkownika
klew
Posty: 8287
Rejestracja: czw cze 27, 2019 12:16 pm
Lokalizacja: Wrocław

A coś na Serialu się pojawia?
Widzimy się na Supla Offline Party vol. 2 :!:
adamkody
Posty: 29
Rejestracja: wt lis 14, 2017 10:33 am

Jest prawie ok. mój blad nad ranem  zle skopiowałem AUTHKEY-a (kopia którą wysłałem była bez niego wiem) dalej jednak rozgłasza mi siec jeżeli kasuje // przed wifi.disableSSL(false) mam błąd kompilacji
Awatar użytkownika
lukfud
Posty: 2101
Rejestracja: czw lis 23, 2017 11:33 pm
Lokalizacja: Warszawa

adamkody pisze: wt cze 30, 2020 10:05 am Jest prawie ok. mój blad nad ranem  zle skopiowałem AUTHKEY-a (kopia którą wysłałem była bez niego wiem) dalej jednak rozgłasza mi siec jeżeli kasuje // przed wifi.disableSSL(false) mam błąd kompilacji

Kod: Zaznacz cały

 wifi.enableSSL(false);
https://www.facebook.com/groups/supladiy/
adamkody
Posty: 29
Rejestracja: wt lis 14, 2017 10:33 am

Nie ma żadnej różnicy miedzy wifi.enableSSL(false) a // wifi.enableSSL(false) cały czas rozgłasza siec ESP-…..
Awatar użytkownika
klew
Posty: 8287
Rejestracja: czw cze 27, 2019 12:16 pm
Lokalizacja: Wrocław

Sieć ESP może rozgłaszać. W bibliotece nie jest to domyślnie wyłączane i niektóre ESP rozgłaszają mimo łączenia się z domowym wifi.

Co masz w logach?
Widzimy się na Supla Offline Party vol. 2 :!:
adamkody
Posty: 29
Rejestracja: wt lis 14, 2017 10:33 am

gdzie mam logow szukac ?
ODPOWIEDZ

Wróć do „Nowości”