Wsparcie dla liczników z nakładką wM-Bus

krycha88
Posts: 5575
Joined: Fri Nov 16, 2018 7:25 am
Been thanked: 5 times

Post

[email protected] wrote: Fri Dec 22, 2023 11:05 am No to poszukałem głębiej:
1. @krycha88 Pytanie: czy jak zmienię w pliki *.ini jakąś flagę np. : KEY_ENABLE_GUI to po przebudowaniu wartość zapisana w pamięci powinna się zmienić automatycznie?
Przywrócenie ustawień fabrycznych powinno ją ustawić jeżeli dodałeś do kompilacji.
[email protected] wrote: Fri Dec 22, 2023 11:05 am 2. Zakomentowanie https://github.com/krycha88/GUI-Generic ... 34-L111C34

Code: Select all

Supla::GUI::crateWebServer();
załatwia sprawę, wpadłem na wyłączenie GUI już wcześniej ale nie zwróciłem uwagi, że wartość zapisana w pamięci pozostała jako włączona.
Zobacz czy zakomentowanie tego rozwiązuje problem
https://github.com/krycha88/GUI-Generic ... er.cpp#L50

Jak dla mnie to nie jest rozwiązanie problemu a tylko obejście :(
[email protected] wrote: Fri Dec 22, 2023 11:05 am 3. Jest możliwość ustawienia jakiejś flagi do GG żeby za każdym "Upload" w VS Code czyścił pamięć?
pio run --target erase
https://gui-generic-builder.supla.io/
[email protected]
Posts: 1585
Joined: Mon Feb 06, 2023 8:56 am
Has thanked: 18 times
Been thanked: 26 times

Post

krycha88 wrote: Fri Dec 22, 2023 11:14 am
Zobacz czy zakomentowanie tego rozwiązuje problem
https://github.com/krycha88/GUI-Generic ... er.cpp#L50

Jak dla mnie to nie jest rozwiązanie problemu a tylko obejście :(
Dzięki, musze zobaczyć czy dam radę przestawić polecenie które się wykonuje pod "Upload".

Może i obejście, ale tak na dobrą sprawę, to GUI podczas pracy to jest fanaberia, konfigurujesz i powinno działać.

TAK, zakomentowanie tego również "rozwiązuje problem"

Gdzie są źródła do dokumentacji https://gui-generic-builder.supla.io/guide/ ? Dodał bym i aktualizował opis jak to uruchomić i sparametryzować
krycha88
Posts: 5575
Joined: Fri Nov 16, 2018 7:25 am
Been thanked: 5 times

Post

Przerób to na przerwania i wg mnie będzie dobrze. Masz pin gdo0Pin który z tego co się orientuje może być do tego właśnie wykorzystany. Jak nie chcesz to mogę spróbować to przerobić po swojemu.
https://gui-generic-builder.supla.io/
[email protected]
Posts: 1585
Joined: Mon Feb 06, 2023 8:56 am
Has thanked: 18 times
Been thanked: 26 times

Post

krycha88 wrote: Fri Dec 22, 2023 11:32 am Przerób to na przerwania i wg mnie będzie dobrze. Masz pin gdo0Pin który z tego co się orientuje może być do tego właśnie wykorzystany. Jak nie chcesz to mogę spróbować to przerobić po swojemu.
Mogę spróbować, ale nie jestem pewien czy moja znajomość C++ jest wystarczająca :D

najpierw jednak bym chciał udokumentować chociaż to co mamy, bo w sumie fakt, że trzeba GUI zostawić wyłączone to nie jest wg mnie bloker aby to upublicznić.

Jak będzie czas pomiędzy jednym żarciem a drugim to może uda mi się dodać możliwość konfiguracji kilku liczników i wyboru który parametr z telegramu bo w sumie to nie tylko liczniki wody można tym czytać.
[email protected]
Posts: 1585
Joined: Mon Feb 06, 2023 8:56 am
Has thanked: 18 times
Been thanked: 26 times

Post

@krycha88

A możesz sprawdzić czy ta flaga: SUPLA_ENABLE_GUI na pewno się ustawia poprawnie po wgraniu?

Zrobiłem erase, wygląda na to że się wykasowało wszystko, w *.ini mam zakomentowaną a efekt jest taki:

Code: Select all

12:47:38.840 > Config read
12:47:38.843 > Key: 0 Value: 
12:47:38.843 > Key: 1 Value: 
12:47:38.844 > Key: 2 Value: 
12:47:38.847 > Key: 3 Value: 
12:47:38.847 > Key: 4 Value: admin
12:47:38.849 > Key: 5 Value: pass
12:47:38.851 > Key: 6 Value: GUI Generic
12:47:38.853 > Key: 7 Value: svrX.supla.org
12:47:38.856 > Key: 8 Value: [email protected]
12:47:38.859 > Key: 9 Value: 
12:47:38.860 > Key: 10 Value: 
12:47:38.861 > Key: 11 Value: 
12:47:38.863 > Key: 12 Value: 
12:47:38.864 > Key: 13 Value:
12:47:38.866 > Key: 14 Value:
12:47:38.867 > Key: 15 Value:
12:47:38.869 > Key: 16 Value:
12:47:38.870 > Key: 17 Value:
12:47:38.872 > Key: 18 Value:
12:47:38.873 > Key: 19 Value:
12:47:38.875 > Key: 20 Value:
12:47:38.877 > Key: 21 Value:
12:47:38.879 > Key: 22 Value:
12:47:38.879 > Key: 23 Value:
12:47:38.881 > Key: 24 Value: ,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,
12:47:38.886 > Key: 25 Value:
12:47:38.888 > Key: 26 Value: ,,0,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,
12:47:38.892 > Key: 27 Value: 
12:47:38.893 > Key: 28 Value:
12:47:38.894 > Key: 29 Value:
12:47:38.896 > Key: 30 Value:
12:47:38.897 > Key: 31 Value:
12:47:38.899 > Key: 32 Value:
12:47:38.900 > Key: 33 Value:
12:47:38.902 > Key: 34 Value:
12:47:38.903 > Key: 35 Value:
12:47:38.905 > Key: 36 Value:
12:47:38.906 > Key: 37 Value:
12:47:38.906 > Key: 38 Value: 
12:47:38.909 > Key: 39 Value:
12:47:38.910 > Key: 40 Value:
12:47:38.912 > Key: 41 Value:
12:47:38.912 > Key: 42 Value:
12:47:38.915 > Key: 43 Value:
12:47:38.916 > Key: 44 Value:
12:47:38.918 > Key: 45 Value:
12:47:38.919 > Key: 46 Value:
12:47:38.921 > Key: 47 Value:
12:47:38.922 > Key: 48 Value:
12:47:38.924 > Key: 49 Value:
12:47:38.926 > Key: 50 Value:
12:47:38.928 > Key: 51 Value:
12:47:38.928 > Key: 52 Value:
12:47:38.930 > Key: 53 Value:
12:47:38.932 > Key: 54 Value:
12:47:38.933 > Key: 55 Value:
12:47:38.935 > Key: 56 Value:
12:47:38.936 > Key: 57 Value:
12:47:38.937 > Key: 58 Value:
12:47:38.938 > Key: 59 Value: 
12:47:38.940 > Key: 60 Value:
12:47:38.942 > Key: 61 Value:
12:47:38.943 > Key: 62 Value:
12:47:38.944 > Key: 63 Value:
12:47:38.947 > Key: 64 Value:
12:47:38.947 > Key: 65 Value:
12:47:38.949 > Key: 66 Value:
12:47:38.950 > Key: 67 Value:
12:47:38.953 > Key: 68 Value:
12:47:38.953 > Key: 69 Value:
12:47:38.955 > Key: 70 Value:
12:47:38.956 > Key: 71 Value:
12:47:38.958 > Key: 72 Value:
12:47:38.959 > Key: 73 Value:
12:47:38.961 > Key: 74 Value:
12:47:38.962 > Key: 75 Value:
12:47:38.965 > Key: 76 Value:
12:47:38.965 > Key: 77 Value:
12:47:38.966 > Key: 78 Value:
12:47:38.968 > Key: 79 Value:
[b]12:47:38.969 > Key: 80 Value: 1[/b]
12:47:38.971 > Key: 81 Value: 0
12:47:38.973 > Key: 82 Value:
12:47:38.974 > Key: 83 Value:
12:47:38.976 > Key: 84 Value:
12:47:38.977 > Key: 85 Value:
12:47:38.978 > Key: 86 Value:
12:47:38.980 > Key: 87 Value:
12:47:38.981 > Key: 88 Value:
12:47:38.983 > Key: 89 Value:
12:47:38.984 > Key: 90 Value: 
12:47:38.986 > Key: 91 Value:
12:47:38.987 > Key: 92 Value:
12:47:38.989 > Key: 93 Value:
12:47:38.990 > Key: 94 Value:
12:47:38.992 > Key: 95 Value:
12:47:38.993 > Key: 96 Value:
12:47:38.995 > Key: 97 Value:
12:47:38.996 > Key: 98 Value:
12:47:38.998 > Key: 99 Value:
12:47:38.999 > Key: 100 Value:
12:47:39.001 > Key: 101 Value: 
12:47:39.003 > Key: 102 Value: 0
12:47:39.004 > Key: 103 Value:
12:47:39.005 > Key: 104 Value:
12:47:39.007 > Key: 105 Value:
12:47:39.009 > Key: 106 Value:
12:47:39.010 > Key: 107 Value:
12:47:39.012 > Key: 108 Value:
12:47:39.013 > Key: 109 Value:
12:47:39.015 > Key: 110 Value:
12:47:39.016 > Key: 111 Value: 
12:47:39.018 > Key: 112 Value:
12:47:39.020 > Key: 113 Value:
12:47:39.021 > Key: 114 Value:
12:47:39.023 > Key: 115 Value:
12:47:39.024 > Key: 116 Value:
12:47:39.026 > Key: 117 Value:
12:47:39.027 > Key: 118 Value:
12:47:39.029 > Key: 119 Value:
12:47:39.030 > Key: 120 Value:
12:47:39.032 > Key: 121 Value: 
12:47:39.034 > Key: 122 Value:
12:47:39.036 > Key: 123 Value:
12:47:39.037 > SET DEVICE CONFIGURATION!
12:47:39.064 > Save key: 4 Value: admin
12:47:39.067 > Save key: 5 Value: pass
12:47:39.069 > Save key: 6 Value: GUI Generic
12:47:39.072 > Save key: 7 Value: svrX.supla.org
12:47:39.074 > Save key: 8 Value: [email protected]
12:47:39.079 > Save key: 24 Value: ,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,
12:47:39.083 > Save key: 26 Value: ,,0,,,,,,,,,,,,,,,1,,,,,,,,,,,,,,,,,
[b]12:47:39.088 > Save key: 80 Value: 1[/b]
12:47:39.090 > Save key: 81 Value: 0
12:47:39.092 > Save key: 102 Value: 0
12:47:39.121 > Supla - starting initialization
12:47:39.140 > Storage initialization
12:47:39.143 > readStorage: 8; Read: [3 0 0 FF FF FF FF 0 ]
12:47:39.147 > Storage: missing Supla tag. Rewriting...
12:47:39.150 > Wrote 8 bytes to storage at 0
12:47:39.158 > Commit
12:47:39.159 > Config incomplete: missing Wi-Fi SSID
12:47:39.162 > LAST STATE ADDED: Missing Wi-Fi SSID
12:47:39.166 > Config incomplete: missing Wi-Fi password
12:47:39.169 > LAST STATE ADDED: Missing Wi-Fi password
12:47:39.173 > Validating storage state section with current device configuration
12:47:39.180 > Storage state section validation completed. Loading elements state...
12:47:39.186 > Config incomplete: deviceMode = CONFIG
12:47:39.189 > GUID: 846BD410E36E470CE8744B71FD79CD35
12:47:39.193 > Device name: GUI Generic
12:47:39.194 > Device software version: GG v7.8.9
12:47:39.197 > Initializing network layer
12:47:39.200 > Network AP/hostname: GUI-GENERIC-CCDBA715F118
12:47:39.204 > Using Supla protocol version 21
12:47:39.207 > Current status: [5] SuplaDevice initialized
12:47:39.211 > Wi-Fi SSID missing
12:47:39.213 > WiFi: enter config mode with SSID: "SUPLA-GUI-Generic-CCDBA715F118"
12:47:39.218 > WiFi: WIFI_AP_STA
12:47:39.314 > [   521][E][WiFiSTA.cpp:232] begin(): SSID too long or missing!
12:47:39.323 > LAST STATE ADDED: Config mode
12:47:39.327 > Current status: [40] Config mode
12:47:39.329 > WiFi: enter config mode with SSID: "SUPLA-GUI-Generic-CCDBA715F118"
12:47:39.336 > WiFi: WIFI_AP_STA
12:47:39.338 > [   537][E][WiFiSTA.cpp:232] begin(): SSID too long or missing!
12:47:43.794 > Wrote 7 bytes to storage at 0
12:47:43.800 > Commit
12:49:06.389 > Save key: 0 Value: �k��nG
�tKq�y�5
12:49:06.393 > Save key: 1 Value: ��?���/�(    �
...
[b]12:49:06.426 > Save key: 80 Value: 1[/b]
EDIT:
po resecie jak już skonfigurowałem nadal to samo, ale GUI się nie ładuje po za trybem konfiguracyjnym, wygląda to tak jakby wartość z trybu konfiguracyjnego zostawała w pamięci
Last edited by [email protected] on Fri Dec 22, 2023 12:06 pm, edited 1 time in total.
krycha88
Posts: 5575
Joined: Fri Nov 16, 2018 7:25 am
Been thanked: 5 times

Post

Chyba się nie ustawia, bo wczoraj to mi zgłaszali :)

tak z ciekawości zobacz te źródła
https://github.com/krycha88/GUI-Generic/tree/WmbusMeter
https://gui-generic-builder.supla.io/
[email protected]
Posts: 1585
Joined: Mon Feb 06, 2023 8:56 am
Has thanked: 18 times
Been thanked: 26 times

Post

krycha88 wrote: Fri Dec 22, 2023 12:05 pm Chyba się nie ustawia, bo wczoraj to mi zgłaszali :)

tak z ciekawości zobacz te źródła
https://github.com/krycha88/GUI-Generic/tree/WmbusMeter
Jeśli dobrze zrozumiałem co zrobiłeś to nie ma racji bytu bo reagujesz na jedno GPIO i wywołujesz pełną funkcję, a tam reakcja na stan GPIO jest w tej funkcji w określonym miejscu i przy określonym stanie.

Sprawdzę później.
krycha88
Posts: 5575
Joined: Fri Nov 16, 2018 7:25 am
Been thanked: 5 times

Post

Dla CC1101 pin GDO0 z tego co czytam może być wykorzystany właśnie do tego i będzie on reagować na odbieranie danych.
https://gui-generic-builder.supla.io/
[email protected]
Posts: 1585
Joined: Mon Feb 06, 2023 8:56 am
Has thanked: 18 times
Been thanked: 26 times

Post

krycha88 wrote: Fri Dec 22, 2023 12:44 pm Dla CC1101 pin GDO0 z tego co czytam może być wykorzystany właśnie do tego i będzie on reagować na odbieranie danych.
Próbowałem ale błąd kompilacji :

Code: Select all

src/src/sensor/WmbusMeter.cpp: In constructor 'Supla::Sensor::WmbusMeter::WmbusMeter(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)':
src/src/sensor/WmbusMeter.cpp:7:7: error: 'class EspClass' has no member named 'wdtDisable'
   ESP.wdtDisable();
       ^~~~~~~~~~
src/src/sensor/WmbusMeter.cpp:8:7: error: 'class EspClass' has no member named 'wdtEnable'
   ESP.wdtEnable(WDTO_8S);
       ^~~~~~~Generating partitions .pio\build\GUI_Generic_ESP32\partitions.bin
~~
*** [.pio\build\GUI_Generic_ESP32\src\src\sensor\WmbusMeter.cpp.o] Error 1
krycha88
Posts: 5575
Joined: Fri Nov 16, 2018 7:25 am
Been thanked: 5 times

Post

Zakomentuj te dwie opcje.
https://gui-generic-builder.supla.io/

Return to “GUI Generic”