Bo jeśli damy korektę w cloudzie to w apce mamy uwzględniona a na wyświetlaczu termometru już nie .
Rozumie że to nie ten etap projektu ale może w przyszłości .......
Moderator: vajera
Tokeny sam wyciąga skrypt w Pythonielukasz06 wrote: Mon Feb 03, 2025 7:08 pm Ogólnie czytałem, że Zigbee jest trochę bardziej prądożerne niż ble. Też chętnie zobaczę, poczytam, jak wyciągasz te tokeny![]()
Z ciekawości zapytam, czy jest to możliwe dla LYWSD 002? Bo ma takiego i nie mogę go przerobić przez ota.
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=18036Musiałem wyedytować i na nowo skompilować kod, bo mojego przypadku jeszcze nie zdążyłeś uwzględnić. W każdym razie można dodać (zmienić) w liniach 244, 245:vajera wrote: Mon Feb 03, 2025 10:53 pm Wrzuciłem mały update (kod + bin):
1. dodane nowe urządzenia (ze zgłoszeń),
2. czujniki iaszone mają włączone raportowanie (przy parowaniu) co 900 sekund (15 minut),
3. wszystkie typy mierników elektrycznych raportują przy parowaniu takie dane jak domyślne ustawienia raportów + tzw. mnożniki i dzielniki - będę wdzięczny za logi bo to być może pozwoli rozwiązać problem przeliczników,
4. Z2S_DEVICE_DESC_RELAY_ELECTRICITY_METER_2 - dla tego profilu licznik energii elektrycznej pobiera dane co 30 sekund,
5. dodałem VirtualRelayScenesSwitch ( credits @[email protected]),
6. porządków w kodzie ciąg dalszy,
7. w bazie jest obecnie 58 urządzeń
Code: Select all
{ .manufacturer_name = "_TZ3000_5f43h46b", .model_name = "TS011F",
.z2s_device_desc_id = Z2S_DEVICE_DESC_RELAY_ELECTRICITY_METER_2, .z2s_device_endpoints_count = 1},
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=18036U mnie rownież pod podwójnym przyciskiem jedynie możliwość przypisania funkcji otwierania bramy i automatu schodowegoZibi_007 wrote: Tue Feb 04, 2025 12:08 amMusiałem wyedytować i na nowo skompilować kod, bo mojego przypadku jeszcze nie zdążyłeś uwzględnić. W każdym razie można dodać (zmienić) w liniach 244, 245:vajera wrote: Mon Feb 03, 2025 10:53 pm Wrzuciłem mały update (kod + bin):
1. dodane nowe urządzenia (ze zgłoszeń),
2. czujniki iaszone mają włączone raportowanie (przy parowaniu) co 900 sekund (15 minut),
3. wszystkie typy mierników elektrycznych raportują przy parowaniu takie dane jak domyślne ustawienia raportów + tzw. mnożniki i dzielniki - będę wdzięczny za logi bo to być może pozwoli rozwiązać problem przeliczników,
4. Z2S_DEVICE_DESC_RELAY_ELECTRICITY_METER_2 - dla tego profilu licznik energii elektrycznej pobiera dane co 30 sekund,
5. dodałem VirtualRelayScenesSwitch ( credits @[email protected]),
6. porządków w kodzie ciąg dalszy,
7. w bazie jest obecnie 58 urządzeńbo choć błędnie pokazuje moc, to przynajmniej działa i aktualizujeCode: Select all
{ .manufacturer_name = "_TZ3000_5f43h46b", .model_name = "TS011F", .z2s_device_desc_id = Z2S_DEVICE_DESC_RELAY_ELECTRICITY_METER_2, .z2s_device_endpoints_count = 1},
Załączam logi z parowania (jest też tam na końcu naciśnięcie przycisku, pewnie zbędne, piszę tylko dla informacji). No i rzeczywiście stan licznika zmienia się co kilkadziesiąt sekund.
EDIT: Nie wiem, czy ma tak być, pewnie coś przegapiłem (może to ten VRSS), ale po dodaniu włącznika scen (tego z 4 klawiszami) mam możliwość przypisania im tylko funkcji otwierania bramy i automatu schodowego.
Code: Select all
case SUPLA_CHANNELTYPE_ACTIONTRIGGER: {
//auto Supla_VirtualRelay = new Supla::Control::VirtualRelay();
auto Supla_VirtualRelay = new Supla::Control::VirtualRelaySceneSwitch((0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER), 1000);
Supla_VirtualRelay->setInitialCaption(z2s_devices_table[devices_counter].Supla_channel_name);
Supla_VirtualRelay->setDefaultFunction(z2s_devices_table[devices_counter].Supla_channel_func);
Supla_VirtualRelay->getChannel()->setChannelNumber(z2s_devices_table[devices_counter].Supla_channel);
} break;Code: Select all
case Z2S_DEVICE_DESC_SWITCH_4X3: {
//auto Supla_Z2S_VirtualRelay = new Supla::Control::VirtualRelay();
auto Supla_Z2S_VirtualRelay = new Supla::Control::VirtualRelaySceneSwitch((0xFF ^ SUPLA_BIT_FUNC_CONTROLLINGTHEROLLERSHUTTER), 1000);
Supla_Z2S_VirtualRelay->setDefaultFunction(SUPLA_CHANNELFNC_POWERSWITCH);
char button_name_function[30];
char button_function[][15] = {"pressed", "double pressed","held"};
sprintf(button_name_function, "button #%d %s", device->endpoint, button_function[sub_id]);
Z2S_fillDevicesTableSlot(device, first_free_slot, Supla_Z2S_VirtualRelay->getChannelNumber(), SUPLA_CHANNELTYPE_ACTIONTRIGGER, sub_id,
button_name_function, SUPLA_CHANNELFNC_POWERSWITCH);
} break;Wczoraj i dzisiaj jeszcze testowałem, także mam jakieś spostrzeżenia, może coś wymyślicie.vajera wrote: Fri Jan 31, 2025 1:44 pmBramka obecnie próbuje przy każdym nowym urządzeniu wykonać odczyt kilku atrybutów z klastra Basic w określonej kolejności (tzw. Tuya magic spell). Ten odczyt zrobiłem na semaforach z timeout 10 sekund każdy. Niestety część czujników pomimo wprowadzenia w tryb parowania ma jakiś bałagan w pamięci i nie chce zwracać tych parametrów, co sprawia, że bramka blokuje się na około 70-80 sekund. Jedyne rozwiązanie to skuteczne wprowadzenie czujnika w stan parowania, czasami konieczne jest wyjęcie baterii na 20-30 sekund.kiler88 wrote: Fri Jan 31, 2025 12:41 pm Dopiero zaczynam zabawę, wgrałem ostatniego bina i próba sparowania czujnika którego nie ma na liście tak jakby uwala bramkę, przestają działać dodane wcześniej czujniki, nie pomaga reset zasilaniem, nie działa trzymanie 5s BOOT żeby wyczyścić listę urządzeń, usunięta po tym z cloud i dodana ponownie bramka zgłasza się z wcześniej sparowanymi czujnikami. Pomaga wgranie od nowa bina. Nie wiem czy coś nie tak z moim ESP32-C6-8MB czy to tak po prostu jest. Dwa działające czujniki które mam działają stabilnie, nie ma problemów po resecie, dopiero dodanie czegoś spoza listy wykrzacza działanie, sprawdzałem na dwóch różnych czujnikach które się nie dodają.
Code: Select all
[ 38643][I][ZigbeeGateway.cpp:778] sendAttributeRead(): Sending 'read attribute' command
[ 38768][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1003) callback
[ 38769][V][ZigbeeHandlers.cpp:242] zb_cmd_read_report_cfg_resp_handler(): Read report configuration response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0xb04)
[ 38770][V][ZigbeeHandlers.cpp:249] zb_cmd_read_report_cfg_resp_handler(): Read report configuration response: status(140), cluster(0xb04), attribute(0x508), type(0x0), min_interval(0x0), max interval(0x0), delta(0x0)
[ 38785][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1003) callback
[ 38786][V][ZigbeeHandlers.cpp:242] zb_cmd_read_report_cfg_resp_handler(): Read report configuration response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0xb04)
[ 38787][V][ZigbeeHandlers.cpp:249] zb_cmd_read_report_cfg_resp_handler(): Read report configuration response: status(140), cluster(0xb04), attribute(0x50b), type(0x0), min_interval(0x0), max interval(0x0), delta(0x0)
[ 38816][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1003) callback
[ 38817][V][ZigbeeHandlers.cpp:242] zb_cmd_read_report_cfg_resp_handler(): Read report configuration response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0x702)
[ 38818][V][ZigbeeHandlers.cpp:249] zb_cmd_read_report_cfg_resp_handler(): Read report configuration response: status(140), cluster(0x702), attribute(0x0), type(0x0), min_interval(0x0), max interval(0x0), delta(0x0)
[ 38850][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1003) callback
[ 38851][V][ZigbeeHandlers.cpp:242] zb_cmd_read_report_cfg_resp_handler(): Read report configuration response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0xb04)
[ 38852][V][ZigbeeHandlers.cpp:249] zb_cmd_read_report_cfg_resp_handler(): Read report configuration response: status(140), cluster(0xb04), attribute(0x505), type(0x0), min_interval(0x0), max interval(0x0), delta(0x0)
[ 38876][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1000) callback
[ 38877][V][ZigbeeHandlers.cpp:151] zb_cmd_read_attr_resp_handler(): Read attribute response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0xb04)
[ 38877][V][ZigbeeHandlers.cpp:160] zb_cmd_read_attr_resp_handler(): Read attribute response: status(134), cluster(0xb04), attribute(0x600), type(0x0), value(0)
NLME Status Indication, status: 0x12
[ 48644][E][ZigbeeGateway.cpp:784] sendAttributeRead(): Semaphore timeout reading attribute 0x600 - device 0xa2da, endpoint 0x1, cluster 0xb04
[ 48645][I][ZigbeeGateway.cpp:778] sendAttributeRead(): Sending 'read attribute' command
[ 48693][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1000) callback
[ 48693][V][ZigbeeHandlers.cpp:151] zb_cmd_read_attr_resp_handler(): Read attribute response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0xb04)
[ 48694][V][ZigbeeHandlers.cpp:160] zb_cmd_read_attr_resp_handler(): Read attribute response: status(134), cluster(0xb04), attribute(0x601), type(0x0), value(0)
[ 58645][E][ZigbeeGateway.cpp:784] sendAttributeRead(): Semaphore timeout reading attribute 0x601 - device 0xa2da, endpoint 0x1, cluster 0xb04
[ 58646][I][ZigbeeGateway.cpp:778] sendAttributeRead(): Sending 'read attribute' command
[ 58688][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1000) callback
[ 58688][V][ZigbeeHandlers.cpp:151] zb_cmd_read_attr_resp_handler(): Read attribute response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0xb04)
[ 58689][V][ZigbeeHandlers.cpp:160] zb_cmd_read_attr_resp_handler(): Read attribute response: status(134), cluster(0xb04), attribute(0x602), type(0x0), value(0)
NLME Status Indication, status: 0x12
[ 68646][E][ZigbeeGateway.cpp:784] sendAttributeRead(): Semaphore timeout reading attribute 0x602 - device 0xa2da, endpoint 0x1, cluster 0xb04
[ 68647][I][ZigbeeGateway.cpp:778] sendAttributeRead(): Sending 'read attribute' command
[ 68687][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1000) callback
[ 68688][V][ZigbeeHandlers.cpp:151] zb_cmd_read_attr_resp_handler(): Read attribute response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0xb04)
[ 68688][V][ZigbeeHandlers.cpp:160] zb_cmd_read_attr_resp_handler(): Read attribute response: status(134), cluster(0xb04), attribute(0x603), type(0x0), value(0)
NLME Status Indication, status: 0x12
[ 78647][E][ZigbeeGateway.cpp:784] sendAttributeRead(): Semaphore timeout reading attribute 0x603 - device 0xa2da, endpoint 0x1, cluster 0xb04
[ 78648][I][ZigbeeGateway.cpp:778] sendAttributeRead(): Sending 'read attribute' command
[ 78692][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1000) callback
[ 78693][V][ZigbeeHandlers.cpp:151] zb_cmd_read_attr_resp_handler(): Read attribute response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0xb04)
[ 78693][V][ZigbeeHandlers.cpp:160] zb_cmd_read_attr_resp_handler(): Read attribute response: status(134), cluster(0xb04), attribute(0x604), type(0x0), value(0)
[ 88648][E][ZigbeeGateway.cpp:784] sendAttributeRead(): Semaphore timeout reading attribute 0x604 - device 0xa2da, endpoint 0x1, cluster 0xb04
[ 88649][I][ZigbeeGateway.cpp:778] sendAttributeRead(): Sending 'read attribute' command
[ 88689][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1000) callback
[ 88689][V][ZigbeeHandlers.cpp:151] zb_cmd_read_attr_resp_handler(): Read attribute response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0xb04)
[ 88690][V][ZigbeeHandlers.cpp:160] zb_cmd_read_attr_resp_handler(): Read attribute response: status(134), cluster(0xb04), attribute(0x605), type(0x0), value(0)
[ 98651][E][ZigbeeGateway.cpp:784] sendAttributeRead(): Semaphore timeout reading attribute 0x605 - device 0xa2da, endpoint 0x1, cluster 0xb04
[ 98652][I][ZigbeeGateway.cpp:778] sendAttributeRead(): Sending 'read attribute' command
[ 98693][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1000) callback
[ 98694][V][ZigbeeHandlers.cpp:151] zb_cmd_read_attr_resp_handler(): Read attribute response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0x702)
[ 98694][V][ZigbeeHandlers.cpp:160] zb_cmd_read_attr_resp_handler(): Read attribute response: status(134), cluster(0x702), attribute(0x303), type(0x0), value(0)
[108652][E][ZigbeeGateway.cpp:784] sendAttributeRead(): Semaphore timeout reading attribute 0x303 - device 0xa2da, endpoint 0x1, cluster 0x702
[108653][I][ZigbeeGateway.cpp:778] sendAttributeRead(): Sending 'read attribute' command
[108693][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1000) callback
[108694][V][ZigbeeHandlers.cpp:151] zb_cmd_read_attr_resp_handler(): Read attribute response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0x702)
[108695][V][ZigbeeHandlers.cpp:160] zb_cmd_read_attr_resp_handler(): Read attribute response: status(134), cluster(0x702), attribute(0x301), type(0x0), value(0)
[118653][E][ZigbeeGateway.cpp:784] sendAttributeRead(): Semaphore timeout reading attribute 0x301 - device 0xa2da, endpoint 0x1, cluster 0x702
[118654][I][ZigbeeGateway.cpp:778] sendAttributeRead(): Sending 'read attribute' command
[118696][I][ZigbeeHandlers.cpp:35] zb_action_handler(): Receive Zigbee action(0x1000) callback
[118697][V][ZigbeeHandlers.cpp:151] zb_cmd_read_attr_resp_handler(): Read attribute response: from address(0xa2da) src endpoint(1) to dst endpoint(1) cluster(0x702)
[118697][V][ZigbeeHandlers.cpp:160] zb_cmd_read_attr_resp_handler(): Read attribute response: status(134), cluster(0x702), attribute(0x302), type(0x0), value(0)
[128654][E][ZigbeeGateway.cpp:784] sendAttributeRead(): Semaphore timeout reading attribute 0x302 - device 0xa2da, endpoint 0x1, cluster 0x702Code: Select all
Read report configuration response: status(140), cluster(0xb04), attribute(0x508), type(0x0), min_interval(0x0), max interval(0x0), delta(0x0)