Chyba to jest jakoś głębiej poblokowane w aktualny SD.
Wygenerowałem nowe GUID i AUTHKEY i użyłem funkcji:
SuplaDevice.setGUID(GUID);
SuplaDevice.setAuthKey(AUTHKEY);
SuplaDevice.setEmail(SUPLA_EMAIL);
SuplaDevice.setServer(SUPLA_SERVER);
SuplaDevice.begin();
Ale na serwie dalej pojawia się inne GUID, pewnie to po MACu, więc to jakaś grubsza sprawa.
Problem z DS18B20 w trybie parasite na ESP8266
-
klew
- Posts: 13905
- Joined: Thu Jun 27, 2019 12:16 pm
- Location: Wrocław
- Has thanked: 134 times
- Been thanked: 137 times
Nie, tam nie ma niczego poblokowanego. Te metody set po prostu nie działają, gdy soft używa klas typu Supla::Config - to one są źródłem prawdyMarian1544 wrote: Mon Jun 29, 2026 11:36 am Chyba to jest jakoś głębiej poblokowane w aktualny SD.
Wygenerowałem nowe GUID i AUTHKEY i użyłem funkcji:
SuplaDevice.setGUID(GUID);
SuplaDevice.setAuthKey(AUTHKEY);
SuplaDevice.setEmail(SUPLA_EMAIL);
SuplaDevice.setServer(SUPLA_SERVER);
SuplaDevice.begin();
Ale na serwie dalej pojawia się inne GUID, pewnie to po MACu, więc to jakaś grubsza sprawa.
Jeśli chcesz tak programowo ustawić guid i authkey, to trzeba zrobić inicjalizację Configa przed SuplaDevice.begin() i ręcznie ustawić setGuid oraz setAuthKey (na instancji cfg, a nie na SuplaDevice). Na pewnoe gdzieś na forum są przykłady użycia tego.
Najlepsze suple dla Twojego domu 
-
Marian1544
- Posts: 64
- Joined: Sat Aug 28, 2021 4:45 pm
Próbowałem coś w tym stylu:
Ale nie umiem tego cfg zainicjalizować, ani namierzyć getconfig().
Jak to prawidłowo podpiąć?
Code: Select all
#include <supla/storage/config.h>
auto cfg = Supla::Storage::getConfig();
if (cfg) {
cfg->setGUID(GUID);
cfg->setAuthKey(AUTHKEY);
cfg->setWiFiSSID(WIFI_SSID);
cfg->setWiFiPassword(WIFI_PASSWORD);
cfg->setSuplaServer(SUPLA_SERVER);
cfg->setEmail(SUPLA_EMAIL);
}Jak to prawidłowo podpiąć?
-
klew
- Posts: 13905
- Joined: Thu Jun 27, 2019 12:16 pm
- Location: Wrocław
- Has thanked: 134 times
- Been thanked: 137 times
Coś w ten deseń:
Code: Select all
#include <supla/storage/littlefs_config.h>
Supla::LittleFsConfig configSupla;
void setup() {
....
// przed SuplaDevice.begin()
Supla::Storage::Init();
auto cfg = Supla::Storage::ConfigInstance();
if (cfg) {
cfg->setGUID(GUID);
cfg->setAuthKey(AUTHKEY);
// opcjonalnie też pozostała konfiguracja:
cfg->setWiFiSSID(WIFI_SSID);
cfg->setWiFiPassword(WIFI_PASSWORD);
cfg->setSuplaServer(SUPLA_SERVER);
cfg->setEmail(SUPLA_EMAIL);
cfg->commit();
}
.....
SuplaDevice.begin();
Najlepsze suple dla Twojego domu 
-
Marian1544
- Posts: 64
- Joined: Sat Aug 28, 2021 4:45 pm
Dzięki, działa
.
Udało się też zachować historię
Udało się też zachować historię
