Nie wiem co jest... mam czujnik temperatury i wilgotności z ekranem po 6h bateria rozładowana.
Czy to przez tryb parowania czy jakiś wadliwy egzemplarz ?
Dyskusja ogólna [bramka Zigbee]
Moderator: vajera
-
local
- Posts: 545
- Joined: Mon Jan 27, 2020 11:33 am
4xShelly 1, Shelly 1L, 2xShelly 2.5, Sonoff T3, 2xSonoff Basic R2, 4xNeo 16A
To taka podróbka mi od xiaomi na CR2032?local wrote: Tue Jan 07, 2025 10:23 pm Nie wiem co jest... mam czujnik temperatury i wilgotności z ekranem po 6h bateria rozładowana.
Czy to przez tryb parowania czy jakiś wadliwy egzemplarz ?
Jeśli tak, to może być felerny egzemplarz albo... bateria.
Też mam taki jeden. Na nowej baterii nie trzyma dłużej, jak 24h. Myślałem, że jakieś zwarcie, ale na tyle, ile dałem radę sam ustalić, to nic nie zwiera. Chyba, że jakieś zwarcie wewnętrzne. Pójdzie do śmieci, albo na części - 12 zł przeżyję
Wiesz, że Supla obsługuje Zigbee? Wstąp do Klubu Promila: https://forum.supla.org/viewtopic.php?t=18018
Szukasz nowego GG? Jest tutaj: https://forum.supla.org/viewtopic.php?t=18036-
local
- Posts: 545
- Joined: Mon Jan 27, 2020 11:33 am
Tak na CR2032... bateria dziś wymieniona (nowa).
To ja dałem prawie 3x tyle ale opakowanie w koszu wiec zwrotu raczej nie będzie :/
Ewentualnie podłączy się stałego zasilania i będzie do testowania bramki.
To ja dałem prawie 3x tyle ale opakowanie w koszu wiec zwrotu raczej nie będzie :/
Ewentualnie podłączy się stałego zasilania i będzie do testowania bramki.
4xShelly 1, Shelly 1L, 2xShelly 2.5, Sonoff T3, 2xSonoff Basic R2, 4xNeo 16A
O! Ito jest dobra koncepcja! Dzięki za podsunięcie pomysłulocal wrote: Tue Jan 07, 2025 11:15 pm [...]
Ewentualnie podłączy się stałego zasilania i będzie do testowania bramki.
Wiesz, że Supla obsługuje Zigbee? Wstąp do Klubu Promila: https://forum.supla.org/viewtopic.php?t=18018
Szukasz nowego GG? Jest tutaj: https://forum.supla.org/viewtopic.php?t=18036-
[email protected]
- Posts: 1586
- Joined: Mon Feb 06, 2023 8:56 am
- Has thanked: 18 times
- Been thanked: 26 times
Code: Select all
std::map<uint16_t, Supla::ChannelElement *> suplaChannels{};
void onNewValueReceive(uint16_t cluster_id, uint16_t shortId, const esp_zb_zcl_attribute_t *attribute)
{
if (cluster_id == ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT)
{
if (attribute->id == ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID && attribute->data.type == ESP_ZB_ZCL_ATTR_TYPE_S16)
{
int16_t value = attribute->data.value ? *(int16_t *)attribute->data.value : 0;
Supla::Sensor::GeneralPurposeMeasurement* sensor=(Supla::Sensor::GeneralPurposeMeasurement*) suplaChannels[shortId];
sensor->setValue(((float)value) / 100);
log_i("zbAttributeRead temperature measurement %f", ((float)value) / 100);
}
}
if (cluster_id == ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT)
{
if (attribute->id == ESP_ZB_ZCL_ATTR_REL_HUMIDITY_MEASUREMENT_VALUE_ID && attribute->data.type == ESP_ZB_ZCL_ATTR_TYPE_U16)
{
int16_t value = attribute->data.value ? *(int16_t *)attribute->data.value : 0;
Supla::Sensor::GeneralPurposeMeasurement* sensor=(Supla::Sensor::GeneralPurposeMeasurement*) suplaChannels[shortId];
sensor->setValue(((double)value) / 100);
log_i("zbAttributeRead humidity measurement %f", ((float)value) / 100);
}
}
}
void addSuplaChannel(esp_zb_ieee_addr_t longAddress, uint16_t shortAddress, esp_zb_zcl_cluster_id_t clusterId)
{
switch (clusterId)
{
case ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT:
{
auto sensor = new Supla::Sensor::GeneralPurposeMeasurement();
sensor->setDefaultUnitAfterValue("%");
sensor->setInitialCaption("Humidity");
// sensor->setValue();
suplaChannels[shortAddress] = sensor;
break;
}
case ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT:
{
auto sensor = new Supla::Sensor::GeneralPurposeMeasurement();
sensor->setDefaultUnitAfterValue("C");
sensor->setInitialCaption("Temperature");
// sensor->setValue();
break;
}
case ESP_ZB_ZCL_CLUSTER_ID_ON_OFF:
{
auto relay = new Supla::Control::VirtualRelay();
relay->setInitialCaption("Power switch");
relay->setDefaultFunction(SUPLA_CHANNELFNC_POWERSWITCH);
// relay->turnOff();
// relay->turnOn();
break;
}
default:
break;
}
}
-
vajera
- Posts: 7293
- Joined: Wed Oct 31, 2018 7:58 am
- Location: Biedrusko
- Has thanked: 291 times
- Been thanked: 161 times
Tak, u siebie mam ręcznie pozmieniane partycje, dlatego wrzucając kod na GitHub pokomentowałem wszystkie odwołania do biblioteki Supla. Wrzucę instrukcję wieczorem bo aktualnie nie mam dostępu do komputera.[email protected] wrote: Wed Jan 08, 2025 5:26 pmkombinuje sobie jak by ugryźć komunikację z Supla, no i wszystko pięknie, ale w Platform.io nie skompiluje mi się z Wifi , a pod ArduinoIDE przekraczam rozmiar flasha... @vajera a jak Ci się to zmieściło z Suplą? zmieniałeś ręcznie partycję?Code: Select all
std::map<uint16_t, Supla::ChannelElement *> suplaChannels{}; void onNewValueReceive(uint16_t cluster_id, uint16_t shortId, const esp_zb_zcl_attribute_t *attribute) { if (cluster_id == ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT) { if (attribute->id == ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID && attribute->data.type == ESP_ZB_ZCL_ATTR_TYPE_S16) { int16_t value = attribute->data.value ? *(int16_t *)attribute->data.value : 0; Supla::Sensor::GeneralPurposeMeasurement* sensor=(Supla::Sensor::GeneralPurposeMeasurement*) suplaChannels[shortId]; sensor->setValue(((float)value) / 100); log_i("zbAttributeRead temperature measurement %f", ((float)value) / 100); } } if (cluster_id == ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT) { if (attribute->id == ESP_ZB_ZCL_ATTR_REL_HUMIDITY_MEASUREMENT_VALUE_ID && attribute->data.type == ESP_ZB_ZCL_ATTR_TYPE_U16) { int16_t value = attribute->data.value ? *(int16_t *)attribute->data.value : 0; Supla::Sensor::GeneralPurposeMeasurement* sensor=(Supla::Sensor::GeneralPurposeMeasurement*) suplaChannels[shortId]; sensor->setValue(((double)value) / 100); log_i("zbAttributeRead humidity measurement %f", ((float)value) / 100); } } } void addSuplaChannel(esp_zb_ieee_addr_t longAddress, uint16_t shortAddress, esp_zb_zcl_cluster_id_t clusterId) { switch (clusterId) { case ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT: { auto sensor = new Supla::Sensor::GeneralPurposeMeasurement(); sensor->setDefaultUnitAfterValue("%"); sensor->setInitialCaption("Humidity"); // sensor->setValue(); suplaChannels[shortAddress] = sensor; break; } case ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT: { auto sensor = new Supla::Sensor::GeneralPurposeMeasurement(); sensor->setDefaultUnitAfterValue("C"); sensor->setInitialCaption("Temperature"); // sensor->setValue(); break; } case ESP_ZB_ZCL_CLUSTER_ID_ON_OFF: { auto relay = new Supla::Control::VirtualRelay(); relay->setInitialCaption("Power switch"); relay->setDefaultFunction(SUPLA_CHANNELFNC_POWERSWITCH); // relay->turnOff(); // relay->turnOn(); break; } default: break; } }
Bramka Zigbee <=> SUPLA
Więcej informacji tutaj:
https://forum.supla.org/viewforum.php?f=127
FAQ https://forum.supla.org/viewtopic.php?t=17277
Więcej informacji tutaj:
https://forum.supla.org/viewforum.php?f=127
FAQ https://forum.supla.org/viewtopic.php?t=17277
-
[email protected]
- Posts: 1586
- Joined: Mon Feb 06, 2023 8:56 am
- Has thanked: 18 times
- Been thanked: 26 times
Luz , chciałem się upewnić czy dobrze rozumujevajera wrote: Wed Jan 08, 2025 6:30 pmTak, u siebie mam ręcznie pozmieniane partycje, dlatego wrzucając kod na GitHub pokomentowałem wszystkie odwołania do biblioteki Supla. Wrzucę instrukcję wieczorem bo aktualnie nie mam dostępu do komputera.[email protected] wrote: Wed Jan 08, 2025 5:26 pmkombinuje sobie jak by ugryźć komunikację z Supla, no i wszystko pięknie, ale w Platform.io nie skompiluje mi się z Wifi , a pod ArduinoIDE przekraczam rozmiar flasha... @vajera a jak Ci się to zmieściło z Suplą? zmieniałeś ręcznie partycję?Code: Select all
std::map<uint16_t, Supla::ChannelElement *> suplaChannels{}; void onNewValueReceive(uint16_t cluster_id, uint16_t shortId, const esp_zb_zcl_attribute_t *attribute) { if (cluster_id == ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT) { if (attribute->id == ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID && attribute->data.type == ESP_ZB_ZCL_ATTR_TYPE_S16) { int16_t value = attribute->data.value ? *(int16_t *)attribute->data.value : 0; Supla::Sensor::GeneralPurposeMeasurement* sensor=(Supla::Sensor::GeneralPurposeMeasurement*) suplaChannels[shortId]; sensor->setValue(((float)value) / 100); log_i("zbAttributeRead temperature measurement %f", ((float)value) / 100); } } if (cluster_id == ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT) { if (attribute->id == ESP_ZB_ZCL_ATTR_REL_HUMIDITY_MEASUREMENT_VALUE_ID && attribute->data.type == ESP_ZB_ZCL_ATTR_TYPE_U16) { int16_t value = attribute->data.value ? *(int16_t *)attribute->data.value : 0; Supla::Sensor::GeneralPurposeMeasurement* sensor=(Supla::Sensor::GeneralPurposeMeasurement*) suplaChannels[shortId]; sensor->setValue(((double)value) / 100); log_i("zbAttributeRead humidity measurement %f", ((float)value) / 100); } } } void addSuplaChannel(esp_zb_ieee_addr_t longAddress, uint16_t shortAddress, esp_zb_zcl_cluster_id_t clusterId) { switch (clusterId) { case ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT: { auto sensor = new Supla::Sensor::GeneralPurposeMeasurement(); sensor->setDefaultUnitAfterValue("%"); sensor->setInitialCaption("Humidity"); // sensor->setValue(); suplaChannels[shortAddress] = sensor; break; } case ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT: { auto sensor = new Supla::Sensor::GeneralPurposeMeasurement(); sensor->setDefaultUnitAfterValue("C"); sensor->setInitialCaption("Temperature"); // sensor->setValue(); break; } case ESP_ZB_ZCL_CLUSTER_ID_ON_OFF: { auto relay = new Supla::Control::VirtualRelay(); relay->setInitialCaption("Power switch"); relay->setDefaultFunction(SUPLA_CHANNELFNC_POWERSWITCH); // relay->turnOff(); // relay->turnOn(); break; } default: break; } }
-
vajera
- Posts: 7293
- Joined: Wed Oct 31, 2018 7:58 am
- Location: Biedrusko
- Has thanked: 291 times
- Been thanked: 161 times
@[email protected] Aktualnie kończę kod odpowiedzialny za kompletne odpytanie urządzenia Zigbee - endpointy, klastry i atrybuty - będzie to taki uniwersalny skaner. W następnym kroku chcę rozpocząć integrację z Supla, ale oczywiście nie chcę Cię powstrzymywać przed własną implementacją. 
Weź tylko pod uwagę, że short address urządzenia Zigbee zmienia się po każdym połączeniu z siecią, restartem urządzenia bądź koordynatora, więc nie nadaje się do parowania z kanałami Supla. Do tego celu trzeba użyć pełnego adresu 64 bit IEEE urządzenia.
Weź tylko pod uwagę, że short address urządzenia Zigbee zmienia się po każdym połączeniu z siecią, restartem urządzenia bądź koordynatora, więc nie nadaje się do parowania z kanałami Supla. Do tego celu trzeba użyć pełnego adresu 64 bit IEEE urządzenia.
Bramka Zigbee <=> SUPLA
Więcej informacji tutaj:
https://forum.supla.org/viewforum.php?f=127
FAQ https://forum.supla.org/viewtopic.php?t=17277
Więcej informacji tutaj:
https://forum.supla.org/viewforum.php?f=127
FAQ https://forum.supla.org/viewtopic.php?t=17277
-
[email protected]
- Posts: 1586
- Joined: Mon Feb 06, 2023 8:56 am
- Has thanked: 18 times
- Been thanked: 26 times
Wiem wiem, to tylko prototypvajera wrote: Wed Jan 08, 2025 6:37 pm @[email protected] Aktualnie kończę kod odpowiedzialny za kompletne odpytanie urządzenia Zigbee - endpointy, klastry i atrybuty - będzie to taki uniwersalny skaner. W następnym kroku chcę rozpocząć integrację z Supla, ale oczywiście nie chcę Cię powstrzymywać przed własną implementacją.
Weź tylko pod uwagę, że short address urządzenia Zigbee zmienia się po każdym połączeniu z siecią, restartem urządzenia bądź koordynatora, więc nie nadaje się do parowania z kanałami Supla. Do tego celu trzeba użyć pełnego adresu 64 bit IEEE urządzenia.
A ja trochę z innej beczki. W nawiązaniu do wczorajszego spotkania, co myślicie o tym interfejsie, który pokazał wczoraj Krzysztof odnośnie bramki Auratona? Jeśli to już jest gotowe i może udostępnić, to można by było wykorzystać w tym projekcie. Mam bramkę Auratona w domu i całkiem to nieźle wygląda (bramka i urządzenia podrzędne - przypisane). Wiem Łukasz, że jeszcze jest trochę czasu zanim dojdziesz do tego etapu w swoim programie, ale można by się już nad tym zastanowić. No chyba, że masz całkiem inny pomysł na integrację z Suplą. W każdym razie ze swojej strony akceptuję każde rozwiązanie, które będzie działać 
Wiesz, że Supla obsługuje Zigbee? Wstąp do Klubu Promila: https://forum.supla.org/viewtopic.php?t=18018
Szukasz nowego GG? Jest tutaj: https://forum.supla.org/viewtopic.php?t=18036