Tryb konfiguracyjny i różne inputy do wprowadzania parametrów

zzrr
Posts: 556
Joined: Wed Oct 26, 2022 7:35 pm

Post

klew wrote: Thu May 30, 2024 4:30 pm Offset eeproma suplowego na pewno może kolidować z Twoimi danymi, ale nie będzie kolidował z konfiguracją webinterface.
Znowu skasowało flash... przy wyłączeniu i włączeniu zasilania. Coś przy starcie jakby...
zzrr
Posts: 556
Joined: Wed Oct 26, 2022 7:35 pm

Post

@klew teraz sprawdziłem wersję supla-device. Na Github jest już 24.5.1 a z tym kodem pracowałem na 24.3. To że zaraz podłącze nową wersję to oczywiste. Ale to że akurat biblioteka była 24.3 mogło być przyczyną?
User avatar
klew
Posts: 10965
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

Raczej to nie kwestia biblioteki.
Zostaw urządzenie i zbieraj logi.
Pokaż też otwarte menu z Arduino z ustawieniami boarda
zzrr
Posts: 556
Joined: Wed Oct 26, 2022 7:35 pm

Post

klew wrote: Thu May 30, 2024 5:16 pm Pokaż też otwarte menu z Arduino z ustawieniami boarda
No niestety tego nie da rady. Nie używam ArduinoIDE
Ale gdybym wiedział co sugerowałbyś zmienić na przykładzie ArduinoIDE to ja sobie w odpowiednim pliku konfiguracyjnym w PlatformIO bym ustawił. Tylko jesli chodzi o Wemosa to tam raczej jakiejś filozofii nie pamietam żeby było. No chyba że to tak działa że się właśnie lekceważny coś z czym sie pracuje od dłuższego czasu i jakiś "czeski błąd" :?
User avatar
klew
Posts: 10965
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

To pokaż wszystko co pojawia się na konsoli w trakcie wgrywania softu na esp
zzrr
Posts: 556
Joined: Wed Oct 26, 2022 7:35 pm

Post

klew wrote: Thu May 30, 2024 5:39 pm To pokaż wszystko co pojawia się na konsoli w trakcie wgrywania softu na esp
ok
zzrr
Posts: 556
Joined: Wed Oct 26, 2022 7:35 pm

Post

klew wrote: Thu May 30, 2024 5:39 pm To pokaż wszystko co pojawia się na konsoli w trakcie wgrywania softu na esp

Code: Select all

<������
       ��������Button[0]::setHoldTime: 5000
Button[0]::setMulticlickTime: 500
GPM[3]: DefaultValueDivider 0
GPM[3]: DefaultValueMultiplier 0
GPM[3]: DefaultValueAdded 0
GPM[3]: DefaultUnitBeforeValue "before"
GPM[3]: DefaultUnitAfterValue "after"
GPM[3]: DefaultValuePrecision 3
Notification: registered - context -1
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 A 0 70 7 70 7 ]
Section type: 3; size: 10
storedCRC 1904, CRC calc 1904
LittleFsConfig: config file size 786
LittleFsConfig: initializing storage from file...
LittleFsConfig: init result 1
RemoteDeviceConfig: Registering field 0x00000010
Clock: automaticTimeSync: 1
Channel[0] function missing. Using SW defaults
Channel[1] function missing. Using SW defaults
Channel[2] function missing. Using SW defaults
Binary[2] setServerInvertLogic 0
Binary[2] config serverInvertLogic 0
Button[0]::onLoadConfig: btnType: 0
Button[0]::setButtonType: 0
Button[0]::setMulticlickTime: 500
Button[0]::setHoldTime: 5000
Button[0] enabling IN as config button
GPM[3]: config loaded successfully
GPM[3]: RefreshIntervalMs 5000 ms
Validating storage state section with current device configuration
Storage state section validation successful
readStorage: 4; Read: [0 0 0 0 ]
readStorage: 1; Read: [0 ]
readStorage: 4; Read: [0 0 0 0 ]
readStorage: 1; Read: [0 ]
Relay[0] turn OFF (duration 0 ms)
Relay[1] turn OFF (duration 0 ms)
Button[0]: Initialized: pin 14, pullUp 1, invertLogic 1, state 1
Channel(3) value changed to NaN
GUID: 1.............95A...........................C83.......
Device name: ALARM_Zam
Device software version: SDK 24.05.01-dev
Initializing network layer
[Wi-Fi] Network AP/hostname: ALARM-ZAM-E098061F557D
Using Supla protocol version 21
Current status: [5] SuplaDevice initialized
Enter normal mode
Relay[1] turn ON (duration 0 ms)
24120                                                          // to jest   ESP.getFreeHeap()
Channel(1) value changed to 1
 **** Param[param1]: a.......svx......wic2t.....8
 **** Param[param2]: u7.......3xa.....b8j...bis7j
 **** Param[param3]: Syrena
 **** Param[param4]: Garaż Alarm
 **** Param[param5]: av......gy1im.....1a......c
 **** Param[param6]: Gamelan
WiFi: establishing connection with SSID: "ZTE_T5400_ABF5"
Channel(3) value changed to -18.00
Connected BSSID: 10:3C:59:E7:AB:F5
local IP: 192.168.18.9
subnetMask: 255.255.254.0
gatewayIP: 192.168.18.1
Signal strength (RSSI): -45 dBm
Establishing NOT encrypted connection with: svr69.supla.org (port: 2015)
Connected via IP 192.168.18.9
Connected to Supla Server
Initializing SRPC
LAST STATE ADDED: Register in progress (8)
Current status: [10] Register in progress
CH #0, type: 2900, FuncList: 0xEF, default: 130, flags: 0x1010000, value: [00 00 00 00 00 00 00 00]
CH #1, type: 2900, FuncList: 0xEF, default: 130, flags: 0x1010000, value: [01 00 00 00 00 00 00 00]
CH #2, type: 1000, FuncList: 0x0, default: 100, flags: 0x8010000, value: [00 00 00 00 00 00 00 00]
CH #3, type: 9000, FuncList: 0x0, default: 520, flags: 0x8010000, value: [00 00 00 00 00 00 32 c0]
Send: [53 55 50 4C 41 15 01 00 00 00 45 00 00 00 AC 02 00 00 7A 7A 72 72 40 77 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 00 00 EA 3E 00 E9 1E 65 EE 07 67 79 A2 38 27 B4 34 42 1E 44 A9 5A F7 1F C0 3D 43 28 E8 9F 50 C8 32 19 41 4C 41 52 4D 5F 5A 61 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 ]
Send: [53 55 50 4C 41 ]
Relay[0] turn ON (duration 0 ms)
17760
Channel(0) value changed to 1
Recv: [53 55 50 4C 41 15 01 00 00 00 46 00 00 00 07 00 00 00 03 00 00 00 78 18 01 53 55 50 4C 41 ]
Device registered (activity timeout 120 s, server version: 24, server min version: 1)
LAST STATE ADDED: Registered and ready (10)
Current status: [17] Registered and ready
Changing activity timeout to 30
Send: [53 55 50 4C 41 15 02 00 00 00 D2 00 00 00 01 00 00 00 1E ]
Send: [53 55 50 4C 41 ]
Notification: sending registration for context -1
Send: [53 55 50 4C 41 15 03 00 00 00 4C 04 00 00 0B 00 00 00 04 FF FF 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 15 04 00 00 00 E0 01 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 15 02 00 00 00 AD 02 00 00 1C 00 00 00 01 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 01 00 01 53 55 50 4C 41 53 55 50 4C 41 15 03 00 00 00 AA 02 00 00 08 00 00 00 02 64 00 00 00 00 00 00 53 55 50 4C 41 53 55 50 4C 41 15 04 00 00 00 AB 02 00 00 01 00 00 00 02 53 55 50 4C 41 53 55 50 4C 41 15 05 00 00 00 AA 02 00 00 74 00 00 00 03 08 02 00 00 00 6C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 53 53 49 00 00 00 00 00 00 00 00 00 00 00 64 42 6D 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 62 65 66 6F 72 65 00 00 00 00 00 00 00 00 00 61 66 74 65 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 53 55 50 4C 41 53 55 50 4C 41 15 06 00 00 00 AB ]
Received new device config
Processing AutomaticTimeSync config
Sending device config result OK (1)
Send: [53 55 50 4C 41 15 05 00 00 00 B7 02 00 00 0A 00 00 00 01 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Relay[0]: updating timer value: remainingTime=0 state=0
SRPC sedning: remaining time 0, channel 0, state 0
Send: [53 55 50 4C 41 15 06 00 00 00 69 00 00 00 E3 00 00 00 00 32 DD 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 ]
Send: [53 55 50 4C 41 15 07 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 ]
Send: [53 55 50 4C 41 15 08 00 00 00 A8 02 00 00 06 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [02 00 00 01 00 00 00 03 53 55 50 4C 41 53 55 50 4C 41 15 07 00 00 00 DC 00 00 00 03 00 00 00 1E 0A F0 53 55 50 4C 41 53 55 50 4C 41 15 08 00 00 00 EA 01 00 00 1A 00 00 00 E8 07 05 1E 05 13 29 31 0E 00 00 00 45 75 72 6F 70 65 2F 57 61 72 73 61 77 00 53 55 50 4C 41 ]
Received SetChannelConfig for channel 2, function 100, config type 0, config size 0
Binary[2]: processing channel config
Sending channel config result DATA_ERROR (2)
Send: [53 55 50 4C 41 15 09 00 00 00 B4 02 00 00 03 00 00 00 02 00 02 ]
Send: [53 55 50 4C 41 ]
Relay[1]: updating timer value: remainingTime=0 state=0
SRPC sedning: remaining time 0, channel 1, state 0
Send: [53 55 50 4C 41 15 0A 00 00 00 69 00 00 00 E3 00 00 00 01 32 DD 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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 ]
Send: [53 55 50 4C 41 15 0B 00 00 00 67 00 00 00 0E 00 00 00 01 00 00 00 00 00 01 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 15 0C 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 15 09 00 00 00 B2 02 00 00 08 00 00 00 00 82 00 00 00 00 00 00 53 55 50 4C 41 ]
Received ChannelConfigFinished for channel 2
Binary[2]: setting default channel config
Binary[2]: processing local channel config
Binary[2] setServerInvertLogic 0
Send: [53 55 50 4C 41 15 0D 00 00 00 A8 02 00 00 06 00 00 00 02 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 15 0A 00 00 00 B2 02 00 00 08 00 00 00 01 82 00 00 00 00 00 00 53 55 50 4C 41 ]
Received SetChannelConfig for channel 3, function 520, config type 0, config size 108
Channel[3]: handleChannelConfig, func 520, configtype 0, configsize 108
GPM[3]: RefreshIntervalMs 5000 ms
Sending channel config result OK (1)
Send: [53 55 50 4C 41 15 0E 00 00 00 B4 02 00 00 03 00 00 00 01 00 03 ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 15 0F 00 00 00 67 00 00 00 0E 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 32 C0 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 15 0B 00 00 00 B2 02 00 00 08 00 00 00 02 64 00 00 00 00 00 00 53 55 50 4C 41 ]
Received ChannelConfigFinished for channel 3
Activity timeout set to 30 s
Current local time: 1970-1-1 0:0:16
Clock: time diff (system-new): -1717098093 s
Clock: new local time: 2024-5-30 19:41:49
Relay::handleChannelConfig, func 130, configtype 0, configsize 0
Relay::handleChannelConfig, func 130, configtype 0, configsize 0
Binary[2]: processing channel config
Channel(3) value changed to -32.00
Send: [53 55 50 4C 41 15 10 00 00 00 67 00 00 00 0E 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 40 C0 ]
Send: [53 55 50 4C 41 ]
Channel(3) value changed to -19.00
Send: [53 55 50 4C 41 15 11 00 00 00 67 00 00 00 0E 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 33 C0 ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 15 12 00 00 00 28 00 00 00 10 00 00 00 29 00 00 00 00 00 00 00 96 80 06 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 15 0C 00 00 00 32 00 00 00 10 00 00 00 7C BA 58 66 00 00 00 00 BE F8 03 00 00 00 00 00 53 55 50 4C 41 ]
User avatar
klew
Posts: 10965
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

To są logi ze startu urządzenia. Prześlij jeszcze te widoczne w trakcie flashowania softu.
Natomiast rozmiar pliku z konfiguracją ma ponad 750 B. Z tego co pamiętam, to ten config był mocno ograniczony i jeśli jego rozmiar przekroczy 1 kB, to cała konfiguracja przepadała.
Może to się dzieje też u Ciebie, choć w tych logach tego nie widać. Lukfud też miał kiedyś z tym problem i tam chyba dodałem parametr pozwalający na zwiększenie tego maksymalnego rozmiaru. Wieczorem jak będę przy kompie to odszukam jak się to robiło
zzrr
Posts: 556
Joined: Wed Oct 26, 2022 7:35 pm

Post

klew wrote: Thu May 30, 2024 6:10 pm Prześlij jeszcze te widoczne w trakcie flashowania softu.
Flashowania??? Nie wiem jakie.
Bo dziwne jest to że wszystko chodzi dobrze. Cały czas logi obserwuje i nic niepokojącego. A przy którymś tam wyłaczeniu i włączeniu zasilania w flashu pusto.
Logi z flashowania to chodzi Ci o te które mam przy wgrywaniu softu na urządzenie?
Tutaj sa logi z wgrywania softu

Code: Select all

Processing d1_mini (platform: espressif8266; board: d1_mini; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1_mini.html
PLATFORM: Espressif 8266 (4.1.0) > WeMos D1 R2 and mini
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 @ 3.30101.0 (3.1.1)  
 - tool-esptool @ 1.413.0 (4.13)
 - tool-esptoolpy @ 1.30000.201119 (3.0.0)
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 1.200.0 (2.0)
 - toolchain-xtensa @ 2.100300.220621 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 40 compatible libraries
Scanning dependencies...
Dependency Graph
|-- SuplaDevice @ 24.3.0+sha.00dcbe5
|-- arduino-timer @ 3.0.1
|-- EEPROM @ 1.0
|-- Pushover
|-- EspSoftwareSerial @ 7.0.0
Building in release mode
Retrieving maximum program size .pio\build\d1_mini\firmware.elf
Checking size .pio\build\d1_mini\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [======    ]  59.1% (used 48420 bytes from 81920 bytes)
Flash: [======    ]  55.4% (used 578395 bytes from 1044464 bytes)
Configuring upload protocol...
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port...
Using manually specified: COM10
Uploading .pio\build\d1_mini\firmware.bin
esptool.py v3.0
Serial port COM10
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: e0:98:06:1f:55:7d
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Compressed 582544 bytes to 405109...
Writing at 0x00000000... (4 %)
Writing at 0x00004000... (8 %)
Writing at 0x00008000... (12 %)
Writing at 0x0000c000... (16 %)
Writing at 0x00010000... (20 %)
Writing at 0x00014000... (24 %)
Writing at 0x00018000... (28 %)
Writing at 0x0001c000... (32 %)
Writing at 0x00020000... (36 %)
Writing at 0x00024000... (40 %)
Writing at 0x00028000... (44 %)
Writing at 0x0002c000... (48 %)
Writing at 0x00030000... (52 %)
Writing at 0x00034000... (56 %)
Writing at 0x00038000... (60 %)
Writing at 0x0003c000... (64 %)
Writing at 0x00040000... (68 %)
Writing at 0x00044000... (72 %)
Writing at 0x00048000... (76 %)
Writing at 0x0004c000... (80 %)
Writing at 0x00050000... (84 %)
Writing at 0x00054000... (88 %)
Writing at 0x00058000... (92 %)
Writing at 0x0005c000... (96 %)
Writing at 0x00060000... (100 %)
Wrote 582544 bytes (405109 compressed) at 0x00000000 in 5.9 seconds (effective 790.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
============================================================== [SUCCESS] Took 15.24 seconds ============================================================== *  Terminal zostanie ponownie użyty przez zadania. Naciśnij dowolny klawisz, aby go zamknąć. 
User avatar
vajera
Posts: 1561
Joined: Wed Oct 31, 2018 7:58 am

Post

klew wrote: Thu May 30, 2024 6:10 pm To są logi ze startu urządzenia. Prześlij jeszcze te widoczne w trakcie flashowania softu.
Natomiast rozmiar pliku z konfiguracją ma ponad 750 B. Z tego co pamiętam, to ten config był mocno ograniczony i jeśli jego rozmiar przekroczy 1 kB, to cała konfiguracja przepadała.
Może to się dzieje też u Ciebie, choć w tych logach tego nie widać. Lukfud też miał kiedyś z tym problem i tam chyba dodałem parametr pozwalający na zwiększenie tego maksymalnego rozmiaru. Wieczorem jak będę przy kompie to odszukam jak się to robiło
Też miałem z tym problem przy zapisywaniu adresów czujników Xiaomi.
W pliku

Code: Select all

supladevice/src/supla/storage/littlefs_config.h
trzeba poprawić:

Code: Select all

#define SUPLA_LITTLEFS_CONFIG_BUF_SIZE
I zwiększyć wartość z 1024 na np. 2048.
Bramka Zigbee <=> SUPLA
Więcej informacji tutaj:
https://forum.supla.org/viewforum.php?f=127

Return to “Arduino IDE”