supla-device 23.07 ze wsparciem dla "countdown timer"

User avatar
klew
Posts: 8357
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

krycha88 wrote: Tue Jul 18, 2023 7:17 pm

Code: Select all

Button[0]::setMulticlickTime: 500
Button[0]::setHoldTime: 3000
Button[1]::setMulticlickTime: 800
Supla - starting initialization
Storage initialization
readStorage: 8; Read: [53 55 50 4C 41 1 0 1 ]
Storage: Number of sections 1
Reading section: 0
readStorage: 7; Read: [3 5 0 24 0 24 0 ]
Section type: 3; size: 5
CRC1 36, CRC2 36, CRC calc 36
Config storage not configured
Validating storage state section with current device configuration
Storage state section validation completed. Loading elements state...
readStorage: 4; Read: [0 0 0 0 ]
readStorage: 1; Read: [0 ]
Relay[0]: restored relay state: OFF
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Pin 0, pullUp 1, invertLogic 1, state 1
Channel[1] setting func list: 1024
Channel[1] setting func list: 3072
Channel[1] setting func list: 7168
Channel[1] setting func list: 15360
Channel[1] setting func list: 31744
Channel[1] setting func list: 64512
Pin 0, pullUp 1, invertLogic 1, state 1
Device name: GUI Generic
Device software version: GG v7.2.0
Initializing network layer
Network AP/hostname: GUI-GENERIC-C8C9A35C79A4
Using Supla protocol version 16
Current status: [5] SuplaDevice initialized
Enter normal mode
WiFi: establishing connection with SSID: "Gargulec"
Connected BSSID: F8:1A:67:2E:FE:3D
local IP: 192.168.1.179
subnetMask: 255.255.255.0
gatewayIP: 192.168.1.1
Signal strength (RSSI): -64 dBm
Establishing NOT encrypted connection with: svr19.supla.org (port: 2015)
Connected to Supla Server
Current status: [10] Register in progress
Send: [53 55 50 4C 41 10 01 00 00 00 45 00 00 00 7A 02 00 00 6B 72 79 73 74 69 61 6E 2E 66 72 61 6E 69 65 63 7A 65 6B 40 67 6D 61 69 6C 2E 63 6F 6D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FC 23 EF 3F 4C 34 96 98 48 CF 1D 23 C8 F4 64 0E 61 6A D3 72 C1 2B B9 9E FC 6B 89 4E 96 86 C7 2A 47 55 49 20 47 65 6E 65 72 69 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 10 01 00 00 00 46 00 00 00 07 00 00 00 03 00 00 00 78 14 01 53 55 50 4C 41 ]
Device registered (activity timeout 120 s, server version: 20, server min version: 1)
Current status: [17] Registered and ready
Changing activity timeout to 30
Send: [53 55 50 4C 41 10 02 00 00 00 D2 00 00 00 01 00 00 00 1E ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 10 03 00 00 00 A8 02 00 00 06 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 10 04 00 00 00 A8 02 00 00 06 00 00 00 01 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 10 02 00 00 00 DC 00 00 00 03 00 00 00 1E 0A F0 53 55 50 4C 41 ]
Activity timeout set to 30 s
Recv: [53 55 50 4C 41 10 03 00 00 00 B2 02 00 00 08 00 00 00 00 82 00 00 00 00 00 00 53 55 50 4C 41 53 55 50 4C 41 10 04 00 00 00 B2 02 00 00 0C 00 00 00 01 BC 02 00 00 00 04 00 00 00 00 00 53 55 50 4C 41 ]
Relay::handleChannelConfig, func 130, configtype 0, configsize 0
AT[1] received config with active actions: 0x0
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Recv: [53 55 50 4C 41 10 05 00 00 00 6E 00 00 00 11 00 00 00 6C 18 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 53 55 50 4C 41 ]
Relay[0] turn ON (duration 0 ms)
 **** Digital write[0], gpio: 2; value 0
Channel(0) value changed to 1
Send: [53 55 50 4C 41 10 05 00 00 00 78 00 00 00 06 00 00 00 00 6C 18 00 00 01 ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 10 06 00 00 00 67 00 00 00 0E 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Wrote 1 bytes to storage at 19
Wrote 7 bytes to storage at 8
Commit
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Channel(0) value changed to 0
Send: [53 55 50 4C 41 10 07 00 00 00 67 00 00 00 0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Wrote 1 bytes to storage at 19
Wrote 7 bytes to storage at 8
Commit
Recv: [53 55 50 4C 41 10 06 00 00 00 6E 00 00 00 11 00 00 00 6C 18 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 53 55 50 4C 41 ]
Relay[0] turn ON (duration 0 ms)
 **** Digital write[0], gpio: 2; value 0
Channel(0) value changed to 1
Send: [53 55 50 4C 41 10 08 00 00 00 78 00 00 00 06 00 00 00 00 6C 18 00 00 01 ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 10 09 00 00 00 67 00 00 00 0E 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Channel(0) value changed to 0
Send: [53 55 50 4C 41 10 0A 00 00 00 67 00 00 00 0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Recv: [53 55 50 4C 41 10 07 00 00 00 6E 00 00 00 11 00 00 00 6C 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Send: [53 55 50 4C 41 10 0B 00 00 00 78 00 00 00 06 00 00 00 00 6C 18 00 00 01 ]
Send: [53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Recv: [53 55 50 4C 41 10 08 00 00 00 6E 00 00 00 11 00 00 00 6C 18 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 53 55 50 4C 41 ]
Relay[0] turn ON (duration 0 ms)
 **** Digital write[0], gpio: 2; value 0
Channel(0) value changed to 1
Send: [53 55 50 4C 41 10 0C 00 00 00 78 00 00 00 06 00 00 00 00 6C 18 00 00 01 ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 10 0D 00 00 00 67 00 00 00 0E 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Channel(0) value changed to 0
Send: [53 55 50 4C 41 10 0E 00 00 00 67 00 00 00 0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Recv: [53 55 50 4C 41 10 09 00 00 00 6E 00 00 00 11 00 00 00 6C 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Send: [53 55 50 4C 41 10 0F 00 00 00 78 00 00 00 06 00 00 00 00 6C 18 00 00 01 ]
Send: [53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Recv: [53 55 50 4C 41 10 0A 00 00 00 6E 00 00 00 11 00 00 00 6C 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Send: [53 55 50 4C 41 10 10 00 00 00 78 00 00 00 06 00 00 00 00 6C 18 00 00 01 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 10 0B 00 00 00 6E 00 00 00 11 00 00 00 6C 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Send: [53 55 50 4C 41 10 11 00 00 00 78 00 00 00 06 00 00 00 00 6C 18 00 00 01 ]
Send: [53 55 50 4C 41 ]
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Relay[0] turn OFF (duration 0 ms)
 **** Digital write[0], gpio: 2; value 1
Send: [53 55 50 4C 41 10 12 00 00 00 28 00 00 00 10 00 00 00 45 00 00 00 00 00 00 00 4E F7 0D 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 10 0C 00 00 00 32 00 00 00 10 00 00 00 E3 E3 B6 64 00 00 00 00 9D 4C 0B 00 00 00 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 10 13 00 00 00 28 00 00 00 10 00 00 00 5E 00 00 00 00 00 00 00 00 1E 0E 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 10 0D 00 00 00 32 00 00 00 10 00 00 00 FC E3 B6 64 00 00 00 00 8B 27 0C 00 00 00 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 10 14 00 00 00 28 00 00 00 10 00 00 00 77 00 00 00 00 00 00 00 03 5C 0E 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 10 0E 00 00 00 32 00 00 00 10 00 00 00 15 E4 B6 64 00 00 00 00 52 70 0C 00 00 00 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 10 15 00 00 00 28 00 00 00 10 00 00 00 90 00 00 00 00 00 00 00 FE 7F 0E 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 10 0F 00 00 00 32 00 00 00 10 00 00 00 2E E4 B6 64 00 00 00 00 89 8F 0C 00 00 00 00 00 53 55 50 4C 41 ]
Wgrałem wszystko ponownie i wszystko działało poprawnie. Ale jak zmieniłem Event dla przycisku to po restarcie urządzenia problem powrócił i z guzika można tylko wyłączać przekaźnik.
A jesteś pewien że z poprzednią wersją biblioteki to działało poprawnie? Bo o ile wtedy było dużo grzebane przy rzeczach w okolicy addAction, to w tym wydaniu nic tam nie było zmieniane.

Mogę prosić o info jaki minimalny config reprodukuje problem? Jaki event zmieniłeś? Rozumiem że sprawdzasz to u siebie na jakimś "wemosie", a nie na tym gniazdku?
Widzimy się na Supla Offline Party vol. 2 :!:
krycha88
Posts: 5208
Joined: Fri Nov 16, 2018 7:25 am

Post

klew wrote: Tue Jul 18, 2023 7:31 pm A jesteś pewien że z poprzednią wersją biblioteki to działało poprawnie? Bo o ile wtedy było dużo grzebane przy rzeczach w okolicy addAction, to w tym wydaniu nic tam nie było zmieniane.

Mogę prosić o info jaki minimalny config reprodukuje problem? Jaki event zmieniłeś? Rozumiem że sprawdzasz to u siebie na jakimś "wemosie", a nie na tym gniazdku?
Nie jestem na bieżąco więc nie wiem co i kiedy się zmieniało w addAction ale na wersji 23.05 działa poprawnie. Sprawdzam to na zwykłym nodemcu v2, przekaźnik ustawiam na GPIO2 przycisk na GPIO0 dodatkowo mam tylko dodane AT do przycisku.

Jak już pisałem po wrzuceniu wszystkiego na nowo przycisk działał poprawnie popsuł się prawdopodobnie po odpaleniu timera i zmianie ON_PRESS na ON_CHANGE (ale bym się tym nie sugerował :D)
https://gui-generic-builder.supla.io/
Patryk
Posts: 2704
Joined: Mon Jan 07, 2019 7:51 pm
Location: Rybnik

Post

Logi z gniazdka SP111 v1.1
Gniazdko zasilone z programatora.
Własne dane pozmieniałem w logu na "X"-y
Akcja lokalnego przycisku ustawiona na "PRZEŁĄCZ"
Naciskałem (lokalny) przycisk, a w logu (na końcu) widać, że otrzymywał polecenie "Relay[0] turn OFF (duration 0 ms)"

Code: Select all

23:16:40.915 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
23:16:40.962 -> ⸮@*r⸮⸮P⸮⸮⸮K⸮t⸮dr⸮-@⸮⸮.⸮Ѫ⸮Ko8a ⸮⸮*⸮T⸮⸮⸮⸮⸮⸮P⸮-⸮⸮⸮*⸮⸮⸮⸮nzAl )⸮m~⸮P'!⸮(P⸮+t׬X@j|⸮⸮⸮⸮*⸮⸮⸮r⸮(⸮8x⸮vA,PZ⸮r⸮(⸮+N⸮P⸮C⸮⸮⸮|'⸮rf cal sector: 252
23:16:41.009 -> freq trace enable 0
23:16:41.009 -> rf[112] Config read
23:16:41.103 -> Key: 0 Value: 6⸮@⸮ R⸮⸮U⸮$7F⸮
23:16:41.103 -> Key: 1 Value: `⸮⸮⸮Ms⸮>i⸮⸮⸮
23:16:41.103 -> Key: 2 Value: NAZWA
23:16:41.103 -> Key: 3 Value: XXXXXX
23:16:41.103 -> Key: 4 Value: admin
23:16:41.103 -> Key: 5 Value: pass
23:16:41.103 -> Key: 6 Value: GUI SP111_7
23:16:41.103 -> Key: 7 Value: svrXX.supla.org
23:16:41.103 -> Key: 8 Value: xxxxxx@xx.pl
23:16:41.103 -> Key: 9 Value: 1
23:16:41.103 -> Key: 10 Value: 1
23:16:41.103 -> Key: 11 Value: 0
23:16:41.103 -> Key: 12 Value: 
23:16:41.103 -> Key: 13 Value: 
23:16:41.103 -> Key: 14 Value: 
23:16:41.103 -> Key: 15 Value: 
23:16:41.103 -> Key: 16 Value: 
23:16:41.103 -> Key: 17 Value: 
23:16:41.103 -> Key: 18 Value: 
23:16:41.103 -> Key: 19 Value: 
23:16:41.103 -> Key: 20 Value: 19
23:16:41.103 -> Key: 21 Value: 1
23:16:41.103 -> Key: 22 Value: 
23:16:41.103 -> Key: 23 Value: 
23:16:41.103 -> Key: 24 Value: 1,21,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
23:16:41.150 -> Key: 25 Value: 
23:16:41.150 -> Key: 26 Value: ,,1,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,
23:16:41.150 -> Key: 27 Value: 
23:16:41.150 -> Key: 28 Value: 1,19,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
23:16:41.150 -> Key: 29 Value: 1,18,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
23:16:41.150 -> Key: 30 Value: 
23:16:41.150 -> Key: 31 Value: 
23:16:41.150 -> Key: 32 Value: 
23:16:41.150 -> Key: 33 Value: 
23:16:41.150 -> Key: 34 Value: 
23:16:41.150 -> Key: 35 Value: 
23:16:41.150 -> Key: 36 Value: 1,20,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
23:16:41.150 -> Key: 37 Value: 1,2,,1,,2,0,1,,,,,,,,,1,,,,,,,,,,,,,
23:16:41.150 -> Key: 38 Value: 
23:16:41.150 -> Key: 39 Value: 1,1,1,,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,
23:16:41.243 -> Key: 40 Value: 
23:16:41.243 -> Key: 41 Value: 
23:16:41.243 -> Key: 42 Value: 
23:16:41.243 -> Key: 43 Value: 
23:16:41.243 -> Key: 44 Value: 
23:16:41.243 -> Key: 45 Value: 0
23:16:41.243 -> Key: 46 Value: 
23:16:41.243 -> Key: 47 Value: 
23:16:41.243 -> Key: 48 Value: 
23:16:41.243 -> Key: 49 Value: 
23:16:41.243 -> Key: 50 Value: 
23:16:41.243 -> Key: 51 Value: 
23:16:41.243 -> Key: 52 Value: 
23:16:41.243 -> Key: 53 Value: 
23:16:41.243 -> Key: 54 Value: 
23:16:41.243 -> Key: 55 Value: 
23:16:41.243 -> Key: 56 Value: 
23:16:41.243 -> Key: 57 Value: 
23:16:41.243 -> Key: 58 Value: 1
23:16:41.243 -> Key: 59 Value: 0
23:16:41.243 -> Key: 60 Value: 
23:16:41.243 -> Key: 61 Value: 
23:16:41.243 -> Key: 62 Value: 
23:16:41.243 -> Key: 63 Value: 
23:16:41.243 -> Key: 64 Value: 0
23:16:41.243 -> Key: 65 Value: 
23:16:41.243 -> Key: 66 Value: 
23:16:41.243 -> Key: 67 Value: 
23:16:41.243 -> Key: 68 Value: 
23:16:41.243 -> Key: 69 Value: 
23:16:41.290 -> Key: 70 Value: 
23:16:41.290 -> Key: 71 Value: 
23:16:41.290 -> Key: 72 Value: 
23:16:41.290 -> Key: 73 Value: 
23:16:41.290 -> Key: 74 Value: 0.45
23:16:41.290 -> Key: 75 Value: 0.45
23:16:41.290 -> Key: 76 Value: 0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
23:16:41.290 -> Key: 77 Value: 
23:16:41.290 -> Key: 78 Value: 0,,,,,,,,,,,,,,,,,,,,,,,,
23:16:41.290 -> Key: 79 Value: 
23:16:41.290 -> Key: 80 Value: 0
23:16:41.290 -> Key: 81 Value: 
23:16:41.290 -> Key: 82 Value: 
23:16:41.290 -> Key: 83 Value: 
23:16:41.290 -> Key: 84 Value: 
23:16:41.290 -> Key: 85 Value: 
23:16:41.290 -> Key: 86 Value: 
23:16:41.290 -> Key: 87 Value: 0
23:16:41.290 -> Key: 88 Value: 1
23:16:41.290 -> Key: 89 Value: 
23:16:41.290 -> Key: 90 Value: 
23:16:41.290 -> Key: 91 Value: 
23:16:41.290 -> Key: 92 Value: 
23:16:41.290 -> addConditionsElement:functionClient: 0, nrClient: 0, functionSensor: 0, nrSensor : 0
23:16:41.337 -> addConditionsExecutive: functionClient: 0, nrClient: 0
23:16:41.337 -> Button[0]::setMulticlickTime: 450
23:16:41.337 -> Button[0]::setHoldTime: 450
23:16:41.337 -> Button[1]::setMulticlickTime: 800
23:16:41.337 -> Button[1]::setHoldTime: 5000
23:16:41.337 -> Supla - starting initialization
23:16:41.431 -> Storage initialization
23:16:41.431 -> readStorage: 8; Read: [53 55 50 4C 41 1 0 1 ]
23:16:41.431 -> Storage: Number of sections 1
23:16:41.431 -> Reading section: 0
23:16:41.431 -> readStorage: 7; Read: [3 26 0 D5 93 D5 93 ]
23:16:41.431 -> Section type: 3; size: 38
23:16:41.431 -> CRC1 37845, CRC2 37845, CRC calc 37845
23:16:41.431 -> Config storage not configured
23:16:41.431 -> Validating storage state section with current device configuration
23:16:41.431 -> Storage state section validation completed. Loading elements state...
23:16:41.431 -> readStorage: 4; Read: [0 0 0 0 ]
23:16:41.431 -> readStorage: 1; Read: [0 ]
23:16:41.431 -> Relay[0]: restored relay state: OFF
23:16:41.431 -> readStorage: 8; Read: [37 0 0 0 0 0 0 0 ]
23:16:41.478 -> readStorage: 8; Read: [0 0 0 0 0 F5 D1 40 ]
23:16:41.478 -> readStorage: 8; Read: [0 0 0 0 C0 3C E 41 ]
23:16:41.478 -> readStorage: 8; Read: [0 0 0 80 EB BB 43 41 ]
23:16:41.478 -> readStorage: 1; Read: [0 ]
23:16:41.478 -> Relay[0] turn OFF (duration 0 ms)
23:16:41.478 ->  **** Digital write[0], gpio: 15; value 0
23:16:41.478 -> Relay[0] turn OFF (duration 0 ms)
23:16:41.478 ->  **** Digital write[0], gpio: 15; value 0
23:16:41.478 -> Pin 13, pullUp 1, invertLogic 1, state 1
23:16:41.478 -> Channel[1] setting func list: 1024
23:16:41.478 -> Channel[1] setting func list: 3072
23:16:41.478 -> Channel[1] setting func list: 7168
23:16:41.478 -> Channel[1] setting func list: 15360
23:16:41.525 -> Channel[1] setting func list: 31744
23:16:41.525 -> Channel[1] setting func list: 64512
23:16:41.525 -> Pin 13, pullUp 1, invertLogic 1, state 1
23:16:41.525 -> Device name: GUI SP111_7
23:16:41.525 -> Device software version: GG vGUI 7.X.X.X
23:16:41.525 -> Initializing network layer
23:16:41.525 -> Network AP/hostname: GUI-SP111-7-XXXXXXXXXXXX
23:16:41.525 -> Using Supla protocol version 16
23:16:41.525 -> Current status: [5] SuplaDevice initialized
23:16:41.525 -> Enter normal mode
23:16:41.525 -> WiFi: establishing connection with SSID: "XXXXXX"
23:16:45.462 -> Connected BSSID: XX:XX:XX:XX:XX:XX
23:16:45.462 -> local IP: 192.168.0.164
23:16:45.462 -> subnetMask: 255.255.255.0
23:16:45.462 -> gatewayIP: 192.168.0.1
23:16:45.462 -> Signal strength (RSSI): -65 dBm
23:16:45.509 -> Establishing NOT encrypted connection with: svrXX.supla.org (port: 2015)
23:16:45.650 -> Connected to Supla Server
23:16:45.650 -> Current status: [10] Register in progress
23:16:45.697 -> Send: [53 55 50 4C 41 10 01 00 00 00 45 00 00 00 93 02 00 00 73 70 39 77 61 70 40 6F 70 2E 70 6C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 60 B0 84 83 4D 73 98 04 3E 69 B9 06 C4 E7 A5 36 BA 40 86 20 52 B8 83 05 55 A5 24 37 46 03 B1 47 55 49 20 53 50 31 31 31 5F 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:16:45.775 -> Send: [53 55 50 4C 41 ]
23:16:45.837 -> Recv: [53 55 50 4C 41 10 01 00 00 00 46 00 00 00 07 00 00 00 03 00 00 00 78 14 01 53 55 50 4C 41 ]
23:16:45.837 -> Device registered (activity timeout 120 s, server version: 20, server min version: 1)
23:16:45.837 -> Current status: [17] Registered and ready
23:16:45.837 -> Changing activity timeout to 30
23:16:45.837 -> Send: [53 55 50 4C 41 10 02 00 00 00 D2 00 00 00 01 00 00 00 1E ]
23:16:45.837 -> Send: [53 55 50 4C 41 ]
23:16:45.837 -> Send: [53 55 50 4C 41 10 03 00 00 00 A8 02 00 00 06 00 00 00 00 00 00 00 00 00 ]
23:16:45.837 -> Send: [53 55 50 4C 41 ]
23:16:45.931 -> Recv: [53 55 50 4C 41 10 02 00 00 00 DC 00 00 00 03 00 00 00 1E 0A F0 53 55 50 4C 41 ]
23:16:45.931 -> Activity timeout set to 30 s
23:16:45.931 -> Send: [53 55 50 4C 41 10 04 00 00 00 A8 02 00 00 06 00 00 00 01 00 00 00 00 00 ]
23:16:45.931 -> Send: [53 55 50 4C 41 ]
23:16:45.978 -> Recv: [53 55 50 4C 41 10 03 00 00 00 B2 02 00 00 08 00 00 00 00 82 00 00 00 00 00 00 53 55 50 4C 41 ]
23:16:45.978 -> Relay::handleChannelConfig, func 130, configtype 0, configsize 0
23:16:46.025 -> Recv: [53 55 50 4C 41 10 04 00 00 00 B2 02 00 00 0C 00 00 00 01 BC 02 00 00 00 04 00 00 00 00 00 53 55 50 4C 41 ]
23:16:46.025 -> AT[1] received config with active actions: 0x0
23:16:46.025 -> Send: [53 55 50 4C 41 10 05 00 00 00 67 00 00 00 0E 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:16:46.025 -> Send: [53 55 50 4C 41 ]
23:16:46.025 -> Send: [53 55 50 4C 41 10 06 00 00 00 69 00 00 00 CF 00 00 00 02 0C C9 00 00 00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7E 01 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 C9 C1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:16:46.072 -> Send: [53 55 50 4C 41 ]
23:16:51.040 -> Send: [53 55 50 4C 41 10 07 00 00 00 67 00 00 00 0E 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:16:51.040 -> Send: [53 55 50 4C 41 ]
23:16:51.040 -> Send: [53 55 50 4C 41 10 08 00 00 00 69 00 00 00 CF 00 00 00 02 0C C9 00 00 00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7E 01 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 E0 93 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:16:51.087 -> Send: [53 55 50 4C 41 ]
23:16:52.071 -> Relay[0] turn OFF (duration 0 ms)
23:16:52.071 ->  **** Digital write[0], gpio: 15; value 0
23:16:54.509 -> Relay[0] turn OFF (duration 0 ms)
23:16:54.509 ->  **** Digital write[0], gpio: 15; value 0
23:16:56.056 -> Send: [53 55 50 4C 41 10 09 00 00 00 67 00 00 00 0E 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:16:56.056 -> Send: [53 55 50 4C 41 ]
23:16:56.056 -> Send: [53 55 50 4C 41 10 0A 00 00 00 69 00 00 00 CF 00 00 00 02 0C C9 00 00 00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7E 01 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 E0 93 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:16:56.102 -> Send: [53 55 50 4C 41 ]
23:16:56.384 -> Relay[0] turn OFF (duration 0 ms)
23:16:56.384 ->  **** Digital write[0], gpio: 15; value 0
23:16:58.305 -> Relay[0] turn OFF (duration 0 ms)
23:16:58.305 ->  **** Digital write[0], gpio: 15; value 0
23:16:59.759 -> Relay[0] turn OFF (duration 0 ms)
23:16:59.759 ->  **** Digital write[0], gpio: 15; value 0
23:17:01.071 -> Send: [53 55 50 4C 41 10 0B 00 00 00 67 00 00 00 0E 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:17:01.071 -> Send: [53 55 50 4C 41 ]
23:17:01.071 -> Send: [53 55 50 4C 41 10 0C 00 00 00 69 00 00 00 CF 00 00 00 02 0C C9 00 00 00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7E 01 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:17:01.118 -> Send: [53 55 50 4C 41 ]
23:17:01.493 -> Relay[0] turn OFF (duration 0 ms)
23:17:01.493 ->  **** Digital write[0], gpio: 15; value 0
23:17:02.993 -> Relay[0] turn OFF (duration 0 ms)
23:17:02.993 ->  **** Digital write[0], gpio: 15; value 0
23:17:04.868 -> Relay[0] turn OFF (duration 0 ms)
23:17:04.868 ->  **** Digital write[0], gpio: 15; value 0
23:17:06.040 -> Send: [53 55 50 4C 41 10 0D 00 00 00 67 00 00 00 0E 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:17:06.040 -> Send: [53 55 50 4C 41 ]
23:17:06.040 -> Send: [53 55 50 4C 41 10 0E 00 00 00 69 00 00 00 CF 00 00 00 02 0C C9 00 00 00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7E 01 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 E0 93 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:17:06.086 -> Send: [53 55 50 4C 41 ]
23:17:07.118 -> Relay[0] turn OFF (duration 0 ms)
23:17:07.118 ->  **** Digital write[0], gpio: 15; value 0
23:17:11.008 -> Send: [53 55 50 4C 41 10 0F 00 00 00 28 00 00 00 10 00 00 00 1E 00 00 00 00 00 00 00 E4 4C 00 00 00 00 00 00 ]
23:17:11.008 -> Send: [53 55 50 4C 41 ]
23:17:11.055 -> Send: [53 55 50 4C 41 10 10 00 00 00 67 00 00 00 0E 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:17:11.055 -> Send: [53 55 50 4C 41 ]
23:17:11.055 -> Send: [53 55 50 4C 41 10 11 00 00 00 69 00 00 00 CF 00 00 00 02 0C C9 00 00 00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7E 01 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ]
23:17:11.102 -> Send: [53 55 50 4C 41 ]
23:17:11.102 -> Recv: [53 55 50 4C 41 10 05 00 00 00 32 00 00 00 10 00 00 00 56 01 B7 64 00 00 00 00 5F 24 00 00 00 00 00 00 53 55 50 4C 41
Patryk
Posts: 2704
Joined: Mon Jan 07, 2019 7:51 pm
Location: Rybnik

Post

Cd ...
@klew, @krycha88 coś odkryłem.

W konfiguracji "Przywróciłem ustawienia fabryczne".

Z uwagi, że kompiluje soft osobiście, korzystam dalej z "Szablon płytek"

Więc po wyborze w "Narzedzia" w "Szablon płytek" wybrałem "Gosund SP111" i standardowo "Zapisz".
Nastepnie w "KONFIGURACJA" zmieniłem "Ustawienie GPIO dla CONFIG" na "WCIŚNIĘTY 5 SEKUND" ( to akurat moje standartowe ustawienia ).
Uzupełniłem podstawowe dane, czyli:
Nazwa sieci, hasło, serwer, e-mail.

"Zapisz" i "Restart".

Zarejestrowalem gniazdko w CLUD-ie, i ( o dziwo ) wszystko działało ok.

ALE ...
W "Ustawienia przycisku nr.1"
Zauważyłem ,że "Akcja" jest ustawiona jako "ZAŁĄCZ" :shock: .
Więc zmieniłem na ( prawidłowo ) "PRZEŁĄCZ".
Dalej "Zapisz" i "Restart"
No i przycisk przestał poprawnie działać ( tak jak to wcześniej opisywałem ).
Więc wróciłem do Akcja "ZAŁĄCZ".
Ale teraz z przycisku lokalnego ( tak jak to opisalem w poprzednich postach ) mogę tylko załączyć przekaźnik.

Może ten opis pozwoli ( oby ) namierzyć bug-a.
local
Posts: 491
Joined: Mon Jan 27, 2020 11:33 am

Post

Zastanawia mnie jedna linijka z konfiguracji...

Code: Select all

23:16:41.290 -> Key: 78 Value: 0,,,,,,,,,,,,,,,,,,,,,,,,
Występuje kiedy w module nie działa przycisk.
Po wyczyszczeniu konfiguracji i ponownym ustawieniu modułu znika a wszystko działa.
4xShelly 1, Shelly 1L, 2xShelly 2.5, Sonoff T3, 2xSonoff Basic R2, 4xNeo 16A
User avatar
klew
Posts: 8357
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

krycha88 wrote: Tue Jul 18, 2023 7:51 pm
W jaki sposób przechowujesz typ akcji przypisany do przycisku w konfiguracji?

Nie jestem pewien, czy dobrze czytam kod generujący HTML, ale wydaje mi się, że tam na szytwno są wstawione wartości na liście 0, 1, 2, ... dla akcji przy buttonach.
Następnie konfigurując buttony zakładasz, że te liczby 0, 1, 2 odpowiadając "akcjom" w addAction:

Code: Select all

      button->addAction(ConfigESP->getAction(pinButton), relay[nrButton], ConfigESP->getEvent(pinButton));
i to na pewno by się wysypało, bo w action.h dodałem jako drugi element nową wartość, więc id akcji nie będą się zgadzać.

Code: Select all

namespace Supla {
enum Action {
  // Relays
  TURN_ON,
  TURN_ON_WITHOUT_TIMER,  // used with staircase timer function, when
                          // timer should not be used this time
  TURN_OFF,
  TOGGLE,
...
Potwierdź proszę, czy dobrze zrozumiałem co tam się w GG dzieje :).
Możesz spróbować usunąć tą akcję: TURN_ON_WITHOUT_TIMER i sprwadzić czy to naprawi problem.
Widzimy się na Supla Offline Party vol. 2 :!:
krycha88
Posts: 5208
Joined: Fri Nov 16, 2018 7:25 am

Post

klew wrote: Wed Jul 19, 2023 1:17 pm
krycha88 wrote: Tue Jul 18, 2023 7:51 pm
W jaki sposób przechowujesz typ akcji przypisany do przycisku w konfiguracji?

Nie jestem pewien, czy dobrze czytam kod generujący HTML, ale wydaje mi się, że tam na szytwno są wstawione wartości na liście 0, 1, 2, ... dla akcji przy buttonach.
Następnie konfigurując buttony zakładasz, że te liczby 0, 1, 2 odpowiadając "akcjom" w addAction:

Code: Select all

      button->addAction(ConfigESP->getAction(pinButton), relay[nrButton], ConfigESP->getEvent(pinButton));
i to na pewno by się wysypało, bo w action.h dodałem jako drugi element nową wartość, więc id akcji nie będą się zgadzać.

Code: Select all

namespace Supla {
enum Action {
  // Relays
  TURN_ON,
  TURN_ON_WITHOUT_TIMER,  // used with staircase timer function, when
                          // timer should not be used this time
  TURN_OFF,
  TOGGLE,
...
Potwierdź proszę, czy dobrze zrozumiałem co tam się w GG dzieje :).
Możesz spróbować usunąć tą akcję: TURN_ON_WITHOUT_TIMER i sprwadzić czy to naprawi problem.
Dokładnie tak to działa jak opisałeś. Założyłem, że ten enum jest przyrostowy i kolejność nie będzie się zmieniać :) Wg mnie był to strzał w dziesiątkę i działa jednak wszystko poprawnie. Wersję wrzuciłem na https://gui-generic-builder.supla.io/test.php
https://gui-generic-builder.supla.io/
robertklepacki94
Posts: 962
Joined: Thu Sep 02, 2021 1:06 pm

Post

Wgrałem na szybko do SP111, timer działa jak należy, lokalny przycisk też.
Włącza i wyłącza na akcji ,,przełącz".
Wziąłem udział w Supla Offline Party 2023
Patryk
Posts: 2704
Joined: Mon Jan 07, 2019 7:51 pm
Location: Rybnik

Post

SP111 + GG v7.3.0 ( własna kompilacja ) i przycisk lokalny działa prawidłowo.
Więc SP111 doczekały się TIMER-ów.
Są przeszczęśliwe :D :D :D .
Ps.
Jedna roszada w kodzie i tyle "problemów".
You do not have the required permissions to view the files attached to this post.
User avatar
klew
Posts: 8357
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

Lista nie jest przyrostowa. Raczej zależy mi na utrzymaniu podobnych akcji i eventów w podobnym tematycznie miejscu.
Jeśli w tych metodach pobierających event i akcję dodasz jakiegoś switch-case, który by tłumaczył int z config na enum, to będzie to działać zawsze, nawet jak enum się zmieni.
Widzimy się na Supla Offline Party vol. 2 :!:

Return to “supla-dev”