IOT SDK

User avatar
klew
Posts: 13905
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław
Has thanked: 134 times
Been thanked: 137 times

Post

Spróbuj w tym miejscu dodać jakiegoś debug printa i sprawdź, czy dla drugiego AT jest wysyłany request:
https://github.com/SUPLA/supla-espressi ... onn.c#L428
Najlepsze suple dla Twojego domu :mrgreen:
User avatar
kris.sg
Posts: 482
Joined: Mon Aug 07, 2017 8:08 pm
Location: Przezchlebie
Has thanked: 1 time
Been thanked: 1 time

Post

Spoko, wcześniej dodałem :

Code: Select all

#if defined(RETREIVE_CHANNEL_CONFIG) && ESP8266_SUPLA_PROTO_VERSION >= 16
      {
        TDS_GetChannelConfigRequest request = {};
        for (uint8 a = 0; a < CHANNEL_CONFIG_LIMIT; a++) {
			supla_log(LOG_DEBUG, "GetChannelConfigRequest: %i", (1 << a));	// moj log
          if (RETREIVE_CHANNEL_CONFIG & (1 << a)) {
            request.ChannelNumber = a;
			supla_log(LOG_DEBUG, "ChannelConfigRequested: %i", a);		// moj log
            srpc_ds_async_get_channel_config(devconn->srpc, &request);
          }
        }
      }

#endif /*defined(RETREIVE_CHANNEL_CONFIG)*/
debug :

Code: Select all

09:59:25.971 -> GetChannelConfigRequest: 1
09:59:25.971 -> GetChannelConfigRequest: 2
09:59:25.971 -> GetChannelConfigRequest: 4
09:59:25.971 -> ChannelConfigRequested: 2  ------  dla kanalu 2
09:59:26.016 -> GetChannelConfigRequest: 8
09:59:26.016 -> ChannelConfigRequested: 3  ------  dla kanalu 3
09:59:26.016 -> GetChannelConfigRequest: 16
09:59:26.016 -> GetChannelConfigRequest: 32
09:59:26.016 -> GetChannelConfigRequest: 64
09:59:26.016 -> GetChannelConfigRequest: 128
request jest wysyłany dla 2 i 3 kanału
■Rpi4(m.2) Supla Cloud, Scripts ■Rpi3(sd) SD: 6x MI ATC, 1x W.S.
ROLETY_V3 x12 ■SWITCH_DUAL x4 ■GATE_MODULE_V3 x1 ■SOCKET_SSR x1 ■SMOKE_MODULE x1
SONOFF_TOUCH x4 ■YUNSCHAN x1 ■STAITCASE_DIMMER x1 ■MEW-01 x2 ■mROW-02 x1 ■LEW-01 x1
POW_R2 x2 ■SP111 x3
User avatar
lesny8
Posts: 3132
Joined: Mon Dec 11, 2017 9:43 pm
Has thanked: 10 times
Been thanked: 9 times

Post

Ja też wczoraj sobie przysiadłem do AT i od razu dla dwóch kanałów, nawet nie kompilowałem tego przykładu od @klew, ale na jego podstawie poustawiałem wszystko. Kanały z wyzwalaczami akcji dodałem na końcu, żeby nie było konfliktu.

Do-rejestrowały się i w Cloud mam info dla kanałów sterujących info o przypisanych AT, tak jak w przypadku modułów Zamela (ikonka przycisku w kanale).

Po ustawieniu akcji na przytrzymanie dla obu kanałów, urządzenie odbiera tylko jedną konfigurację z serwera co widzę na terminalu.
Requesty idą dwa, też puszczałem printa w tym miejscu https://github.com/SUPLA/supla-espressi ... onn.c#L428
ale info o odebraniu konfiguracji dostaje tylko raz dla kanłu 3

Code: Select all

Channel config received: ch 3, func 700, cfgtype 0, cfgsize 4
U mnie kanały 0 i 1 to przekaźniki, kanał 2 termometr, 3 i 4 to kanały z AT
dlatego ustawiłem

Code: Select all

#define RETREIVE_CHANNEL_CONFIG 0b11000
P.S. @klew dziękuję za przykład :)
SOP 2023 :heavy_check_mark:
SOP 2024 :heavy_check_mark:
Czekam na kolejne Supla Offline Party :upside_down_face:
🧩: 🔑cz->b ⛴️+ila
User avatar
klew
Posts: 13905
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław
Has thanked: 134 times
Been thanked: 137 times

Post

Jaką macie ustawioną wersję protokołu?
Najlepsze suple dla Twojego domu :mrgreen:
User avatar
kris.sg
Posts: 482
Joined: Mon Aug 07, 2017 8:08 pm
Location: Przezchlebie
Has thanked: 1 time
Been thanked: 1 time

Post

Ja mam:

Code: Select all

#define ESP8266_SUPLA_PROTO_VERSION 16
■Rpi4(m.2) Supla Cloud, Scripts ■Rpi3(sd) SD: 6x MI ATC, 1x W.S.
ROLETY_V3 x12 ■SWITCH_DUAL x4 ■GATE_MODULE_V3 x1 ■SOCKET_SSR x1 ■SMOKE_MODULE x1
SONOFF_TOUCH x4 ■YUNSCHAN x1 ■STAITCASE_DIMMER x1 ■MEW-01 x2 ■mROW-02 x1 ■LEW-01 x1
POW_R2 x2 ■SP111 x3
User avatar
lesny8
Posts: 3132
Joined: Mon Dec 11, 2017 9:43 pm
Has thanked: 10 times
Been thanked: 9 times

Post

Ja też 16
SOP 2023 :heavy_check_mark:
SOP 2024 :heavy_check_mark:
Czekam na kolejne Supla Offline Party :upside_down_face:
🧩: 🔑cz->b ⛴️+ila
User avatar
klew
Posts: 13905
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław
Has thanked: 134 times
Been thanked: 137 times

Post

Problematyczna okazała się kolejka/bufor wyjściowy. Na moim forku ( https://github.com/klew/supla-espressif-esp ) jest korekta: https://github.com/klew/supla-espressif ... f76ceae5c1

PR też czeka, więc do oficjalnego repo niedługo też dotrze.
Najlepsze suple dla Twojego domu :mrgreen:
User avatar
lesny8
Posts: 3132
Joined: Mon Dec 11, 2017 9:43 pm
Has thanked: 10 times
Been thanked: 9 times

Post

Potwierdzam, działa :D

Code: Select all

Channel config received: ch 1, func 700, cfgtype 0, cfgsize 4
input 14, flags 3, max clicks 0, active 1024
Channel config received: ch 3, func 700, cfgtype 0, cfgsize 4
input 12, flags 3, max clicks 0, active 1024
Input[ch: 1] sending action trigger (1 << 10)
Input: action 0 is not activated
pm open,type:2 0
Input[ch: 3] sending action trigger (1 << 10)
Input: action 0 is not activated
Dzięki Mistrzu za śledztwo 👍
SOP 2023 :heavy_check_mark:
SOP 2024 :heavy_check_mark:
Czekam na kolejne Supla Offline Party :upside_down_face:
🧩: 🔑cz->b ⛴️+ila
User avatar
kris.sg
Posts: 482
Joined: Mon Aug 07, 2017 8:08 pm
Location: Przezchlebie
Has thanked: 1 time
Been thanked: 1 time

Post

Potwierdzam u mnie też już jest ok:

Code: Select all

10:26:16.685 -> Channel config received: ch 2, func 700, cfgtype 0, cfgsize 4
10:26:16.685 -> Config result channel = 2
10:26:16.685 -> sizeof(TSD_ChannelConfig_ActionTrigger) = 4
10:26:16.685 -> Config result i = 0, result channel = 2
10:26:16.685 -> input 14, flags 3, max clicks 0, active 4096
10:26:16.685 -> Set active action channel = 2 ,active action = 4096
10:26:16.685 -> Config result i = 1, result channel = 2
10:26:16.731 -> Config result i = 2, result channel = 2
10:26:16.731 -> Config result i = 3, result channel = 2
10:26:16.731 -> Config result i = 4, result channel = 2
10:26:16.731 -> Config result i = 5, result channel = 2
10:26:16.731 -> Config result i = 6, result channel = 2
10:26:16.731 -> Channel config received: ch 3, func 700, cfgtype 0, cfgsize 4
10:26:16.731 -> Config result channel = 3
10:26:16.775 -> sizeof(TSD_ChannelConfig_ActionTrigger) = 4
10:26:16.775 -> Config result i = 0, result channel = 3
10:26:16.775 -> Config result i = 1, result channel = 3
10:26:16.775 -> input 12, flags 3, max clicks 0, active 4096
10:26:16.775 -> Set active action channel = 3 ,active action = 4096
10:26:16.775 -> Config result i = 2, result channel = 3
10:26:16.775 -> Config result i = 3, result channel = 3
10:26:16.775 -> Config result i = 4, result channel = 3
10:26:16.820 -> Config result i = 5, result channel = 3
10:26:16.820 -> Config result i = 6, result channel = 3
W imieniu moim i moich włączników ściennych dzięki wielkie :D
■Rpi4(m.2) Supla Cloud, Scripts ■Rpi3(sd) SD: 6x MI ATC, 1x W.S.
ROLETY_V3 x12 ■SWITCH_DUAL x4 ■GATE_MODULE_V3 x1 ■SOCKET_SSR x1 ■SMOKE_MODULE x1
SONOFF_TOUCH x4 ■YUNSCHAN x1 ■STAITCASE_DIMMER x1 ■MEW-01 x2 ■mROW-02 x1 ■LEW-01 x1
POW_R2 x2 ■SP111 x3
Patryk
Posts: 2944
Joined: Mon Jan 07, 2019 7:51 pm
Location: Rybnik

Post

Z ciekawości, gdyż jeszcze nie testowałem.
Czy w konfiguracji też jest opcja wyboru czasu ?:
You do not have the required permissions to view the files attached to this post.

Return to “Zagadnienia ogólne”