XIAOMI LYWSD03MMC - odczyt przez ESP32

zzrr
Posts: 1864
Joined: Wed Oct 26, 2022 7:35 pm
Has thanked: 76 times
Been thanked: 119 times

Post

veeroos wrote: Thu Dec 28, 2023 3:13 pm
Pietras81 wrote: Thu Dec 28, 2023 2:57 pm
Czyli co brać N16R8 będzie działać poprawnie ??
Ja mam tego i w miarę to chodzi
veeroos a możesz powiedzieć lub może masz możliwość sprawdzić...
N16R8 ma w danych katalogowych podane że ma SPI Voltage 1.8V
N8R2 ma standardowo 3.3V
N16R8 ma tylko na Pinach SPI 1,8V czy jakoś więcej GPIO posiada takie napięcia? A może wszystkie?
User avatar
veeroos
Posts: 1081
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów
Has thanked: 1 time
Been thanked: 9 times

Post

zzrr wrote: Wed Jan 03, 2024 4:46 pm
veeroos wrote: Thu Dec 28, 2023 3:13 pm
Pietras81 wrote: Thu Dec 28, 2023 2:57 pm
Czyli co brać N16R8 będzie działać poprawnie ??
Ja mam tego i w miarę to chodzi
veeroos a możesz powiedzieć lub może masz możliwość sprawdzić...
N16R8 ma w danych katalogowych podane że ma SPI Voltage 1.8V
N8R2 ma standardowo 3.3V
N16R8 ma tylko na Pinach SPI 1,8V czy jakoś więcej GPIO posiada takie napięcia? A może wszystkie?
Powiedz jak to sprawdzę 😉, bo w sumie w kodzie nie używam żadnych wyjść, oprócz tego na LED, ale i tak to nie działa, bo chyba na innym pinie niż 2 ma LED.
Zamel Mew-01, Zamel PEW-01, Zamel SBW-01, Zamel THW-01, Zamel SRW-01, Zamel mSLW-02, Auraton BOX + Indor Sensor, Airly Gate By Veeroos, Zigbee to Supla Gateway + sensors, Zamel SGW-01 and more

https://github.com/v33r005
zzrr
Posts: 1864
Joined: Wed Oct 26, 2022 7:35 pm
Has thanked: 76 times
Been thanked: 119 times

Post

veeroos wrote: Wed Jan 03, 2024 5:51 pm Powiedz jak to sprawdzę 😉, bo w sumie w kodzie nie używam żadnych wyjść, oprócz tego na LED, ale i tak to nie działa, bo chyba na innym pinie niż 2 ma LED.
No jeśli masz do niego dostęp to normalnie multimetrem jakie jest napięcie na jakichś losowych GPIO. takich które masz w jakimś programie skonfigurowane na HIGH. Bo też nie wiem szczerze mówiąc o co chodzi do końca z tym 1,8V na SPI. Czy to tylko jak się wyjść używa jako SPI czy jak się je skonfiguruje jako wyjścia cyfrowe ze stanem HIGH też np GPIO 36,37,38,12,10
Wczoraj kupowałem i nie wiedziałem o co chodzi i wziąłem tak asekuracyjnie te N8R2 żeby nie mieć problemu. Ale wolałbym jednak te z większą pamięcią
tak teraz zerknąłem na rysunek że LEDA ma na pinie 45 GPIO48
Michał P.
Posts: 26
Joined: Wed Jan 03, 2024 2:24 pm

Post

veeroos wrote: Wed Jan 03, 2024 3:16 pm Podłącz ESP32 po USB do komputera i sprawdź logi, ja miałem takie dziury jak mi ESP nie nawiązywało połączenia z czujnikiem Xiaomi. Możesz też w kodzie zablokować licznik nieudanych prób połączenia, bo ja tam dałem chyba po 5 skanowaniu jak nie odnajdzie urządzenia to wyłącza wpisywanie wartości do Clouda. Jak to wyłączysz, to nawet jak nie znajdzie czujnika, to będziesz miał cały czas odczyt, no chyba że ESP nie połączy się z siecią wtedy będziesz miał dziury w odczucie. Sprawdź jeszcze to i będziesz wiedział z czym masz problem
Podłączyłem, poniżej wrzucam wycinki z serial monitora, nie znam się za bardzo ale chyba wartości z czujników są odczytywane prawidłowo. Problemem jest połączenie z serwerami supla, sygnał wi-fi jest wystarczający do stabilnego połączenia. W pierwszej konfiguracji esp wyłączyłem certyfikaty supla. Coś powienieniem zmienić w ustawieniach? Zasotsować inne wersje bibliotek? Może ktoś mógłby rzucić okiem i podpowiedzieć.

Code: Select all

Send: [53 55 50 4C 41 14 06 00 00 00 28 00 00 00 10 00 00 00 1D 00 00 00 00 00 00 00 0B 56 04 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 03 00 00 00 32 00 00 00 10 00 00 00 7D 98 95 65 00 00 00 00 EA 37 08 00 00 00 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 07 00 00 00 28 00 00 00 10 00 00 00 36 00 00 00 00 00 00 00 48 61 04 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 04 00 00 00 32 00 00 00 10 00 00 00 96 98 95 65 00 00 00 00 37 3F 08 00 00 00 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 08 00 00 00 28 00 00 00 10 00 00 00 4F 00 00 00 00 00 00 00 31 6D 04 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 05 00 00 00 32 00 00 00 10 00 00 00 AF 98 95 65 00 00 00 00 96 A9 08 00 00 00 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 09 00 00 00 28 00 00 00 10 00 00 00 68 00 00 00 00 00 00 00 64 78 04 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 06 00 00 00 32 00 00 00 10 00 00 00 C8 98 95 65 00 00 00 00 D2 4F 08 00 00 00 00 00 53 55 50 4C 41 ]
Urządzenie:1 MAC: A4:C1:38:AD:5F:0D Temp: 21.9stC. Wilgotnosc: 54%. Bateria: 89%.
Urządzenie:2 MAC: A4:C1:38:3C:D6:4E Temp: 21.1stC. Wilgotnosc: 54%. Bateria: 88%.
Urządzenie:3 MAC: A4:C1:38:77:74:8D Temp: 21.6stC. Wilgotnosc: 54%. Bateria: 90%.
Channel(0) value changed to temp(21.900000), humi(54.000000)
Channel(1) value changed to temp(21.100000), humi(54.000000)
Channel(2) value changed to temp(21.600000), humi(54.000000)
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 0B 00 00 00 32 00 00 00 10 00 00 00 45 99 95 65 00 00 00 00 0F D0 08 00 00 00 00 00 53 55 50 4C 41 ]
Urządzenie:3 MAC: A4:C1:38:77:74:8D Temp: 21.6stC. Wilgotnosc: 54%. Bateria: 90%.
Urządzenie:1 MAC: A4:C1:38:AD:5F:0D Temp: 22.0stC. Wilgotnosc: 54%. Bateria: 89%.
Urządzenie:2 MAC: A4:C1:38:3C:D6:4E Temp: 21.2stC. Wilgotnosc: 54%. Bateria: 88%.
Channel(0) value changed to temp(22.000000), humi(54.000000)
Send: [53 55 50 4C 41 14 12 00 00 00 67 00 00 00 0E 00 00 00 00 00 00 00 00 00 F0 55 00 00 F0 D2 00 00 ]
Send: [53 55 50 4C 41 ]
Channel(1) value changed to temp(21.200001), humi(54.000000)
Send: [53 55 50 4C 41 14 13 00 00 00 67 00 00 00 0E 00 00 00 01 00 00 00 00 00 D0 52 00 00 F0 D2 00 00 ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 29 00 00 00 32 00 00 00 10 00 00 00 BA 9B 95 65 00 00 00 00 67 91 0C 00 00 00 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 36 00 00 00 28 00 00 00 10 00 00 00 73 03 00 00 00 00 00 00 A6 18 09 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 2A 00 00 00 32 00 00 00 10 00 00 00 D3 9B 95 65 00 00 00 00 D3 B0 0C 00 00 00 00 00 53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 2B 00 00 00 F4 01 00 00 08 00 00 00 22 05 00 00 00 0D 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 37 00 00 00 FE 01 00 00 32 00 00 00 22 05 00 00 00 00 00 00 BF 01 00 00 00 00 00 00 C0 A8 01 AA FC B4 67 4F 54 BC 59 01 C6 54 00 00 79 03 00 00 76 03 00 00 00 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 2C 00 00 00 F4 01 00 00 08 00 00 00 22 05 00 00 00 0D 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 38 00 00 00 FE 01 00 00 32 00 00 00 22 05 00 00 00 00 00 00 BF 01 00 00 00 00 00 00 C0 A8 01 AA FC B4 67 4F 54 BC 59 01 C6 54 00 00 7F 03 00 00 7C 03 00 00 00 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 39 00 00 00 28 00 00 00 10 00 00 00 98 03 00 00 00 00 00 00 59 76 07 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 2D 00 00 00 32 00 00 00 10 00 00 00 F8 9B 95 65 00 00 00 00 B5 F2 0A 00 00 00 00 00 53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 2E 00 00 00 F4 01 00 00 08 00 00 00 22 05 00 00 00 0D 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 3A 00 00 00 FE 01 00 00 32 00 00 00 22 05 00 00 00 00 00 00 BF 01 00 00 00 00 00 00 C0 A8 01 AA FC B4 67 4F 54 BC 59 01 C3 4E 00 00 9B 03 00 00 98 03 00 00 00 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 2F 00 00 00 F4 01 00 00 08 00 00 00 22 05 00 00 00 0D 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 3B 00 00 00 FE 01 00 00 32 00 00 00 22 05 00 00 00 00 00 00 BF 01 00 00 00 00 00 00 C0 A8 01 AA FC B4 67 4F 54 BC 59 01 C6 54 00 00 9F 03 00 00 9C 03 00 00 00 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 30 00 00 00 F4 01 00 00 08 00 00 00 22 05 00 00 00 0D 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 3C 00 00 00 FE 01 00 00 32 00 00 00 22 05 00 00 00 00 00 00 BF 01 00 00 00 00 00 00 C0 A8 01 AA FC B4 67 4F 54 BC 59 01 C2 4C 00 00 B4 03 00 00 B1 03 00 00 00 00 00 00 00 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Urządzenie:3 MAC: A4:C1:38:77:74:8D Temp: 21.6stC. Wilgotnosc: 54%. Bateria: 89%.
Urządzenie:2 MAC: A4:C1:38:3C:D6:4E Temp: 21.3stC. Wilgotnosc: 54%. Bateria: 88%.
Urządzenie:1 MAC: A4:C1:38:AD:5F:0D Temp: 22.2stC. Wilgotnosc: 54%. Bateria: 89%.
Channel(2) value changed to temp(21.600000), humi(54.000000)
Urządzenie:2 MAC: A4:C1:38:3C:D6:4E Temp: 21.3stC. Wilgotnosc: 54%. Bateria: 88%.
Send: [53 55 50 4C 41 14 4B 00 00 00 28 00 00 00 10 00 00 00 BE 04 00 00 00 00 00 00 12 0E 01 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 3E 00 00 00 32 00 00 00 10 00 00 00 1E 9D 95 65 00 00 00 00 02 6F 04 00 00 00 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 4C 00 00 00 28 00 00 00 10 00 00 00 D7 04 00 00 00 00 00 00 8E 1D 01 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 3F 00 00 00 32 00 00 00 10 00 00 00 37 9D 95 65 00 00 00 00 0B 92 04 00 00 00 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 4D 00 00 00 28 00 00 00 10 00 00 00 F0 04 00 00 00 00 00 00 FE 28 01 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 40 00 00 00 32 00 00 00 10 00 00 00 50 9D 95 65 00 00 00 00 61 82 04 00 00 00 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 4E 00 00 00 28 00 00 00 10 00 00 00 09 05 00 00 00 00 00 00 7C 34 01 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 41 00 00 00 32 00 00 00 10 00 00 00 69 9D 95 65 00 00 00 00 4B 8A 04 00 00 00 00 00 53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 4F 00 00 00 28 00 00 00 10 00 00 00 22 05 00 00 00 00 00 00 6E 40 01 00 00 00 00 00 ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 42 00 00 00 32 00 00 00 10 00 00 00 82 9D 95 65 00 00 00 00 C6 51 05 00 00 00 00 00 53 55 50 4C 41 ]
Urządzenie:3 MAC: A4:C1:38:77:74:8D Temp: 21.6stC. Wilgotnosc: 54%. Bateria: 89%.
Urządzenie:2 MAC: A4:C1:38:3C:D6:4E Temp: 21.4stC. Wilgotnosc: 54%. Bateria: 88%.
Channel(1) value changed to temp(21.400000), humi(54.000000)
Send: [53 55 50 4C 41 14 50 00 00 00 67 00 00 00 0E 00 00 00 01 00 00 00 00 00 97 53 00 00 F0 D2 00 00 ]
Send: [53 55 50 4C 41 ]
Deinitializing SRPC
Supla server connection lost. Trying to reconnect
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
LAST STATE ADDED: SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
LAST STATE ADDED: Not connected to Supla server
Current status: [6] Not connected to Supla server
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Network layer restart requested. Trying to setup network interface again
WiFi: resetting WiFi connection
WiFi: establishing connection with SSID: "dd-wrt"
WiFi Station disconnected
E (2211643) wifi:sta is connecting, return error
E (2211664) wifi:sta is connecting, return error
Connected BSSID: D4:5D:64:DF:D0:58
local IP: 192.168.1.170
subnetMask: 255.255.255.0
gatewayIP: 192.168.1.1
Signal strength (RSSI): -60 dBm
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Network layer restart requested. Trying to setup network interface again
WiFi: resetting WiFi connection
WiFi: establishing connection with SSID: "dd-wrt"
WiFi Station disconnected
E (2262917) wifi:sta is connecting, return error
E (2262938) wifi:sta is connecting, return error
Connected BSSID: D4:5D:64:DF:D0:58
local IP: 192.168.1.170
subnetMask: 255.255.255.0
gatewayIP: 192.168.1.1
Signal strength (RSSI): -65 dBm
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
SSL error: -32512, SSL - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Urządzenie:1 MAC: A4:C1:38:AD:5F:0D Temp: 22.4stC. Wilgotnosc: 54%. Bateria: 89%.
Urządzenie:2 MAC: A4:C1:38:3C:D6:4E Temp: 21.5stC. Wilgotnosc: 54%. Bateria: 88%.
Urządzenie:3 MAC: A4:C1:38:77:74:8D Temp: 21.5stC. Wilgotnosc: 54%. Bateria: 89%.
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -16, BIGNUM - Memory allocation failed
LAST STATE ADDED: BIGNUM - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Channel(0) value changed to temp(22.400000), humi(54.000000)
Channel(2) value changed to temp(21.500000), humi(54.000000)
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -16, BIGNUM - Memory allocation failed
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -78, UNKNOWN ERROR CODE (004E)
LAST STATE ADDED: UNKNOWN ERROR CODE (004E)
Connection fail (0). Server: svr108.supla.org
WiFi Station disconnected
E (2319089) wifi:sta is connecting, return error
Connected BSSID: D4:5D:64:DF:D0:58
local IP: 192.168.1.170
subnetMask: 255.255.255.0
gatewayIP: 192.168.1.1
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -30592, SSL - A fatal alert message was received from our peer
LAST STATE ADDED: SSL - A fatal alert message was received from our peer
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: -30592, SSL - A fatal alert message was received from our peer
Connection fail (0). Server: svr108.supla.org
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: 48, PADLOCK - Input data should be aligned
LAST STATE ADDED: PADLOCK - Input data should be aligned
Connected to Supla Server
Initializing SRPC
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400da412  PS      : 0x00060530  A0      : 0x800e12fc  A1      : 0x3ffd02f0  
A2      : 0x00000000  A3      : 0x00000014  A4      : 0x00000c00  A5      : 0x3ffd02e0  
A6      : 0x00000008  A7      : 0x3fffbb84  A8      : 0x800d9b57  A9      : 0x3ffd02d0  
A10     : 0x00000000  A11     : 0x00000000  A12     : 0x00000020  A13     : 0x3ffd0330  
A14     : 0x00000008  A15     : 0x00000002  SAR     : 0x00000019  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000cf8  LBEG    : 0x40091150  LEND    : 0x4009115b  LCOUNT  : 0x00000000  


Backtrace: 0x400da40f:0x3ffd02f0 0x400e12f9:0x3ffd0310 0x400e13f7:0x3ffd0350 0x400d95e6:0x3ffd05c0 0x400d4506:0x3ffd06b0 0x400eca01:0x3ffd06f0

ELF file SHA256: 6db7b33f921e7977

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
Button[0]::configureAsConfigButton
Button[0]::setHoldTime: 5000
Button[0]::setMulticlickTime: 300
Supla - starting initialization
Main storage not configured
LittleFsConfig: config file size 457
LittleFsConfig: initializing storage from file...
LittleFsConfig: init result 1
Security level: 2
RemoteDeviceConfig: Registering field 0x00000001
Button[0]::onLoadConfig: skip
Channel[0] temperature correction 0.000000
Channel[0] humidity correction 0.000000
Channel[1] temperature correction 0.000000
Channel[1] humidity correction 0.000000
Channel[2] temperature correction 0.000000
Channel[2] humidity correction 0.000000
Pin 0, pullUp 1, invertLogic 1, state 1
Channel(0) value changed to temp(-275.000000), humi(-1.000000)
Channel(1) value changed to temp(-275.000000), humi(-1.000000)
Channel(2) value changed to temp(-275.000000), humi(-1.000000)
GUID: 6CF09D3737D5CA862A5C973E2C70A5DC
Device name: Supla Xiaomi
Device software version: SDK 23.12-dev
Initializing network layer
Network AP/hostname: SUPLA-XIAOMI-FCB4674F54BC
Using Supla protocol version 20
Current status: [5] SuplaDevice initialized
Enter normal mode
WiFi: establishing connection with SSID: "dd-wrt"
E (3362) wifi:sta is connecting, return error
Connected BSSID: D4:5D:64:DF:D0:58
local IP: 192.168.1.170
subnetMask: 255.255.255.0
gatewayIP: 192.168.1.1
Signal strength (RSSI): -62 dBm
Connecting without certificate validation (INSECURE)
Establishing encrypted connection with: svr108.supla.org (port: 2016)
SSL error: 48, PADLOCK - Input data should be aligned
LAST STATE ADDED: PADLOCK - Input data should be aligned
Connected to Supla Server
Initializing SRPC
LAST STATE ADDED: Register in progress
Current status: [10] Register in progress
CH #0, type: 3038, FuncList: 0x0, default: 45, flags: 0x801000C, value: [c8 cd fb ff 18 fc ff ff]
CH #1, type: 3038, FuncList: 0x0, default: 45, flags: 0x801000C, value: [c8 cd fb ff 18 fc ff ff]
CH #2, type: 3038, FuncList: 0x0, default: 45, flags: 0x801000C, value: [c8 cd fb ff 18 fc ff ff]
Send: [53 55 50 4C 41 14 01 00 00 00 45 00 00 00 93 02 00 00 6D 69 63 68 61 6C 2E 70 6F 67 6F 72 7A 65 6C 73 6B 69 30 30 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 CD D4 39 6E 9C 16 17 9D 97 BD 07 D0 0F 06 3E 44 6C F0 9D 37 37 D5 CA 86 2A 5C 97 3E 2C 70 A5 DC 53 75 70 6C 61 20 58 69 61 6F 6D 69 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 14 01 00 00 00 46 00 00 00 07 00 00 00 03 00 00 00 78 16 01 53 55 50 4C 41 ]
Device registered (activity timeout 120 s, server version: 22, server min version: 1)
LAST STATE ADDED: Registered and ready
Current status: [17] Registered and ready
Changing activity timeout to 30
Send: [53 55 50 4C 41 14 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 14 03 00 00 00 67 00 00 00 0E 00 00 00 00 00 00 00 00 00 C8 CD FB FF 18 FC FF FF ]
Send: [53 55 50 4C 41 ]
Recv: [53 55 50 4C 41 14 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
Send: [53 55 50 4C 41 14 04 00 00 00 67 00 00 00 0E 00 00 00 01 00 00 00 00 00 C8 CD FB FF 18 FC FF FF ]
Send: [53 55 50 4C 41 ]
Send: [53 55 50 4C 41 14 05 00 00 00 67 00 00 00 0E 00 00 00 02 00 00 00 00 00 C8 CD FB FF 18 FC FF FF ]
Send: [53 55 50 4C 41 ]
User avatar
klew
Posts: 13911
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław
Has thanked: 136 times
Been thanked: 137 times

Post

Pamięci brakuje. To esp8266?
Najlepsze suple dla Twojego domu :mrgreen:
Michał P.
Posts: 26
Joined: Wed Jan 03, 2024 2:24 pm

Post

To ESP32 wroom 32U, z dołączoną antenką. Z drugiej strony płytce napisane esp32 devkitC v4. Jak wgrywałem wybrałem board esp32-> esp32 dev module, partycje Huge app(3MB no dta/1MB SPIFFS).
User avatar
veeroos
Posts: 1081
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów
Has thanked: 1 time
Been thanked: 9 times

Post

Ja zrobiłem teraz kod na bibliotece NimBLE musi on testy przejść i umieszczę go na forum, program zajmuje po kompilacji niecałe 1,4 MB, ale to może parę dni potrwać, więc uzbrójcie się troszkę w cierpliwość. @klew mi podpowiedział to około rok temu, żeby spróbować z tą zoptymalizowaną biblioteką, jakoś nie mogłem sobie wtedy z tym poradzić, ale dzisiaj pojawiła się żaróweczka jak u "Pomysłowego Dobromira" i kod skompilował się poprawnie. 😉
Zamel Mew-01, Zamel PEW-01, Zamel SBW-01, Zamel THW-01, Zamel SRW-01, Zamel mSLW-02, Auraton BOX + Indor Sensor, Airly Gate By Veeroos, Zigbee to Supla Gateway + sensors, Zamel SGW-01 and more

https://github.com/v33r005
zzrr
Posts: 1864
Joined: Wed Oct 26, 2022 7:35 pm
Has thanked: 76 times
Been thanked: 119 times

Post

Michał P. wrote: Wed Jan 03, 2024 8:37 pm To ESP32 wroom 32U, z dołączoną antenką. Z drugiej strony płytce napisane esp32 devkitC v4. Jak wgrywałem wybrałem board esp32-> esp32 dev module, partycje Huge app(3MB no dta/1MB SPIFFS).
Ja ten moduł Devkit C_V4 u siebie mam ustawiony jako Wemos LOLIN32 Lite. Wgrywałem na Lolina i na ten Devkit zamiennie i wszystko grało. Możesz spróbować.
User avatar
klew
Posts: 13911
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław
Has thanked: 136 times
Been thanked: 137 times

Post

Michał P. wrote: Wed Jan 03, 2024 8:37 pm To ESP32 wroom 32U, z dołączoną antenką. Z drugiej strony płytce napisane esp32 devkitC v4. Jak wgrywałem wybrałem board esp32-> esp32 dev module, partycje Huge app(3MB no dta/1MB SPIFFS).
Nie chodzi o rozmiar binarki, czy flasha, tylko o pamięć RAM.

W ESP32 z reguły jest około 200 kB wolnego RAM-u. Nawiązanie szyfrowanego połączenia wymaga około 20 kB wolnego RAM-u, z tym, że po nawiązaniu połączenia, większa część tej pamięci jest zwalniana.

W logach widać, że połączenie SSL się nie powiodło z powodu braku pamięci, to znaczy, że tam było mniej niż 20 kB wolnej pamięci, albo nie było ciągłego obszaru wolnej pamięci o odpowiednim rozmiarze.
Tak czy siak, coś tam strasznie zjadło pamięć.

Potem jakoś udało się nawiązać połączenie, ale coś dalej pewnie się nie udało, tylko nie było sprwadzone, czy allokowanie pamięci się powiodło i poleciał crash. Pewnie ten crash, to moja wina, ale sytuacja braku RAM-u jest na tyle beznadziejna, że nie wiem czy jest sens się w to zagłębiać i poprawiać ;)
Najlepsze suple dla Twojego domu :mrgreen:
User avatar
veeroos
Posts: 1081
Joined: Sun Mar 20, 2022 9:30 am
Location: Głogów
Has thanked: 1 time
Been thanked: 9 times

Post

klew wrote: Wed Jan 03, 2024 9:06 pm
Krzysztof a pamiętasz może którą pamięć optymalizowała biblioteka NimBLE? O zajmowaną przez program czy też RAM? W sumie w opisie jest napisane że zmniejsza zużycie zasobów i poprawia wydajność. Więc może to będzie rozwiązaniem
Zamel Mew-01, Zamel PEW-01, Zamel SBW-01, Zamel THW-01, Zamel SRW-01, Zamel mSLW-02, Auraton BOX + Indor Sensor, Airly Gate By Veeroos, Zigbee to Supla Gateway + sensors, Zamel SGW-01 and more

https://github.com/v33r005

Return to “Zagadnienia ogólne”