XIAOMI LYWSD03MMC - odczyt przez ESP32

User avatar
veeroos
Posts: 1081
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów
Has thanked: 1 time
Been thanked: 9 times

Post

Dziwne, no dzisiaj już tego nie sprawdzę, bo w pracy jestem, wczoraj ten program wgrałem i chodził, ale nie ładował wartości poziomu baterii. Zobacz co wypluwa moduł w logach
Zamel Mew-01, Zamel PEW-01, Zamel SBW-01, Zamel THW-01, Zamel SRW-01, Zamel mSLW-02, Auraton BOX + Indor Sensor, Airly Gate By Veeroos, Zigbee to Supla Gateway + sensors, Zamel SGW-01 and more

https://github.com/v33r005
Juszczaczek1
Posts: 389
Joined: Sun Nov 08, 2020 3:41 pm
Been thanked: 2 times

Post

takie cos mi wypluwa i wygląda jak by się cały czas rozłączał

Code: Select all

invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
User avatar
veeroos
Posts: 1081
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów
Has thanked: 1 time
Been thanked: 9 times

Post

A jaki tam ESP32 siedzi? Nie C3 czasami? Chyba coś nie tak z bootloaderem jest, napisz dokładnie jaki układ i przekompiluje program
Zamel Mew-01, Zamel PEW-01, Zamel SBW-01, Zamel THW-01, Zamel SRW-01, Zamel mSLW-02, Auraton BOX + Indor Sensor, Airly Gate By Veeroos, Zigbee to Supla Gateway + sensors, Zamel SGW-01 and more

https://github.com/v33r005
Juszczaczek1
Posts: 389
Joined: Sun Nov 08, 2020 3:41 pm
Been thanked: 2 times

Post

veeroos wrote: Wed Nov 29, 2023 6:30 pm A jaki tam ESP32 siedzi? Nie C3 czasami? Chyba coś nie tak z bootloaderem jest, napisz dokładnie jaki układ i przekompiluje program
Esp32-s3-wroom-1
You do not have the required permissions to view the files attached to this post.
User avatar
veeroos
Posts: 1081
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów
Has thanked: 1 time
Been thanked: 9 times

Post

Zaraz wyślę 2 wersje softu na priv sprawdzisz sobie
Zamel Mew-01, Zamel PEW-01, Zamel SBW-01, Zamel THW-01, Zamel SRW-01, Zamel mSLW-02, Auraton BOX + Indor Sensor, Airly Gate By Veeroos, Zigbee to Supla Gateway + sensors, Zamel SGW-01 and more

https://github.com/v33r005
barbiere
Posts: 2
Joined: Thu Nov 30, 2023 11:25 am

Post

Cześć Panowie,
ja mam problem z wgraniem, mam komunikat że program zajmuje 140% pamięci i nie da się go wgrać. Możliwe? czy coś źle robię, mam ESP32 DEVKITV1.
User avatar
veeroos
Posts: 1081
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów
Has thanked: 1 time
Been thanked: 9 times

Post

barbiere wrote: Thu Nov 30, 2023 11:33 am Cześć Panowie,
ja mam problem z wgraniem, mam komunikat że program zajmuje 140% pamięci i nie da się go wgrać. Możliwe? czy coś źle robię, mam ESP32 DEVKITV1.
Musisz zmienić ustawienie schematu partycji
IMG_20231130_081958.jpg
Ja u siebie mam tak
You do not have the required permissions to view the files attached to this post.
Zamel Mew-01, Zamel PEW-01, Zamel SBW-01, Zamel THW-01, Zamel SRW-01, Zamel mSLW-02, Auraton BOX + Indor Sensor, Airly Gate By Veeroos, Zigbee to Supla Gateway + sensors, Zamel SGW-01 and more

https://github.com/v33r005
xkamil
Posts: 5
Joined: Sat May 02, 2020 1:31 pm

Post

Cześć wgrałem twój kod, śmiga faktycznie na płytce też musiałem zmienć Partition Scheme na Huge App, wtedy śmiga (ja mam płytkę ESP32-S3).
Flagi faktycznie się dodają ale przez to że są w w setup() to dodają się tylko raz na początku programu i się nie aktualizują, nie wiem jak to zmienić, ale z pewnością chodzi o miejsce umieszczenia.
xkamil
Posts: 5
Joined: Sat May 02, 2020 1:31 pm

Post

Żeby wysłać stan baterii do flagi, trzeba to zrobić tak jak wysyłanie wartości temp i wilgotności.

Code: Select all

      channel.setBatteryLevel(bat1);
Dodałem to pod wysyłaniem wartości temp i wilg w utworzonej klasie każdego czujnika.

Code: Select all

class Czujnik1 : public Supla::Sensor::ThermHygroMeter {
 public:
  explicit Czujnik1()
{

  }

  double getTemp() {
    temperature = temp1;
    return temperature;
  }

  double getHumi() {
    humidity = wilg1;
    return humidity;
  }

 private:
  void iterateAlways() {
    if (millis() - lastReadTime > 10000) {
      lastReadTime = millis();
      channel.setNewValue(getTemp(), getHumi());
      channel.setBatteryLevel(bat1);
    }
  }

  void onInit() {
    channel.setNewValue(getTemp(), getHumi());
  }

 protected:
  double temperature = - 270;
  double humidity = 0;

};
U mnie śmiga dajcie znać jak u Was.
User avatar
veeroos
Posts: 1081
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów
Has thanked: 1 time
Been thanked: 9 times

Post

Kurde taka pierdoła a ja się zastanawiałem jak to ogarnąć. U mnie też działa
Zamel Mew-01, Zamel PEW-01, Zamel SBW-01, Zamel THW-01, Zamel SRW-01, Zamel mSLW-02, Auraton BOX + Indor Sensor, Airly Gate By Veeroos, Zigbee to Supla Gateway + sensors, Zamel SGW-01 and more

https://github.com/v33r005

Return to “Zagadnienia ogólne”