wiem, że to wątek o gg, ale podłączę się do tematu, mam pytanie czy poprawnie KPOP działa jedynie z dołączonym webinterfacem? Bo zrobiłem kod, który na sztywno ustawia serwery, ustawienia wifi itd. Problem jest taki, że nie wpisuje on w kanał wartości "Before" i "After",
Screenshot_2024-06-05-19-45-12-194_org.supla.android.jpg
Dodatkowo w Cloudzie jest komunikat że konfiguracja jeszcze nie jest dostępna.
Screenshot_2024-06-05-19-45-41-887_com.android.chrome.jpg
To jest kod z przykładów do biblioteki, tyle że ustawiam na sztywno wszystko
kod
Code: Select all
#include <SuplaDevice.h> //https://github.com/SUPLA/arduino/tree/develop
#include <EEPROM.h>
#include <supla/control/relay.h>
#include <supla/network/esp_wifi.h>
#include <supla/sensor/general_purpose_measurement.h>
//******************************************************************WIFI SETUP************************************************************************************************
Supla::ESPWifi wifi("ssid", "pass");
//*****************************************************************SUPLA SETUP************************************************************************************************
// 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};
// Replace the following AUTHKEY with value that you can retrieve from: https://www.supla.org/arduino/get-authkey
char AUTHKEY[SUPLA_AUTHKEY_SIZE] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
const char* SERVER_SUPLA = "svr";
const char* Email_adres = "mail";
Supla::Sensor::GeneralPurposeMeasurement *gpm = nullptr;
void setup() {
auto r1 = new Supla::Control::Relay(12);
Serial.begin(115200);
gpm = new Supla::Sensor::GeneralPurposeMeasurement();
// Default channel config values are initialized only once. They can be
// modified later, but they won't change corresponding used configurable
// parameters.
// Below lines are optional, just remove them if you don't want to set
// them.
gpm->setDefaultValueDivider(0); // in 0.001 steps, 0 is ignored
gpm->setDefaultValueMultiplier(0); // in 0.001 steps, 0 is ignored
gpm->setDefaultValueAdded(0); // in 0.001 steps
gpm->setDefaultUnitBeforeValue("before");
gpm->setDefaultUnitAfterValue("after");
gpm->setDefaultValuePrecision(3); // 0..4 - number of decimal places
// Set some initial value of measurement
gpm->setValue(3.1415);
SuplaDevice.begin(GUID, // Global Unique Identifier
SERVER_SUPLA, // SUPLA server address
Email_adres, // Email address used to login to Supla Cloud
AUTHKEY); // Authorization key
// put your main code here, to run repeatedly:
}
void loop() {
SuplaDevice.iterate();
static uint32_t lastTime = 0;
if (millis() - lastTime > 1000) {
lastTime = millis();
// set some new value on gpm:
gpm->setValue(millis() / 1000.0);
}
}
You do not have the required permissions to view the files attached to this post.