Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarik2142 committed Dec 26, 2022
1 parent c79b6ff commit ad9e5fc
Show file tree
Hide file tree
Showing 63 changed files with 3,453 additions and 5,398 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
.clang_complete
bin
commit
test.html
test.html
gzipped
webh
60 changes: 58 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,70 @@
# Changelog

All notable changes to this project will be documented in this file.

## [Unreleased] - Development

## [0.9.1.0] 20221025
## [0.9.8] 20221226
### Added
- NEW WIFI COORDINATOR MODE ARRIVED!;
- ZHA zeroconf discovery [PR 84111](https://github.com/home-assistant/core/pull/84111)
- Added visual confirmation of command execution success for all buttons in the interface;
- New feature "Keep network & web server" available in USB mode. This function allows you to leave one of the communication channels active and have access to the web interface. The device itself will select an available channel according to priority: WIFI, ETHERNET, WIFI AP;
- "Serial" page renamed to "Z2M and ZHA";
- Added Z2M and ZHA config generator on "Z2M and ZHA" page;
- Added a check of the success of connecting to Wi-Fi, after entering SSID and PASS;
- Added a check of operation and communication with the Zigbee module at startup. The blue LED flashes - waiting for a response. The green LED lit up - the check was successful. Blinking blue and yellow - there is no communication with the Zigbee module or the module is not working;
- New GET/SET API for settings;
- Added a new WIFI page;
- Added preloader. It is displayed during page loading;
- Added hard reset. To reset settings, turn on device with button pressed, when yellow and blue LEDs start flashing, release button and settings will be erased;
- Add favicon.ico;
- Card grid now have responsible height.

### Changed
- Now all buttons work through a single API;
- Zigbee socket is now available in access point mode. This means that you can now flash the Zigbee module in access point mode;
- All svg icons combined into one;
- "About" page rework;
- No more html.h all html code moved to separate page files;
- Coordinator modes logic rework - according to the [latest v0.9.8 scheme](https://github.com/smlight-dev/slzb-06-firmware/blob/main/images/mode-logic-v0.9.8.jpg);
- HUGE web interface update. Web interface now is "One Page App", no more senseless page refreshes;
- Completely reworked saving settings in web.cpp, now used ArduinoJson;
- Completely reworked transfering parameters from the device to the interface;
- Settings "Hostname" and "Console log refresh interval" moved to "System and Tools" page;
- Reworked "Logout" link;
- Code optimisations for reduce memory usage;
- Add margins between icons and text on tabs in page "System and Tools";
- Sidenav position improvements;
- Sidenav on mobile devices now hidden. Swipe from right screen corner to show sidenav;
- Center link on "About page";
- Link at the "About" page now opens in new tab;
- Merge "sys-tools" & "logs-browser" pages;

### Fixed
- Wi-Fi access point is no longer disabled during network scanning;
- Toast position fix;
- Link to the site has been corrected on "About" page;


### Removed
- Removed unnecessary server endpoints;
- Some of the parameters that are no longer used have been removed from the config;
- Removed all code from html.h;
- Cleaning unused files;


------------

## [0.9.1] 20221025
### Added
- Initial release

### Changed

### Fixed

### Removed
### Removed



Binary file removed images/main_emergency_mode.png
Binary file not shown.
Binary file added img/mode-logic-v0.9.8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
webh/
4 changes: 2 additions & 2 deletions src/Version.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

// AUTO GENERATED FILE, DO NOT EDIT
#ifndef VERSION
#define VERSION "0.9.1"
#define VERSION "0.9.8"
#endif
#ifndef BUILD_TIMESTAMP
#define BUILD_TIMESTAMP "2022-10-18 10:23:57.12345"
#define BUILD_TIMESTAMP __DATE__
#endif

52 changes: 24 additions & 28 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <CircularBuffer.h>
#include "version.h"

#define DEBUG
//ESP32 PINS TO CONTROL LAN8720
#define ETH_CLK_MODE_1 ETH_CLOCK_GPIO0_IN
#define ETH_POWER_PIN_1 16
Expand All @@ -17,29 +18,29 @@
#define CC2652P_FLSH 32
#define CC2652P_RXD 5
#define CC2652P_TXD 17
//ESP32 PINS TO CONTROL LEDs, BUTTON AND SWITCH
#define LED_BLUE 12
#define LED_YELLOW 14
#define BTN 35
#define MODE_SWITCH 4
#define DEBOUNCE_TIME 70


#define DEBOUNCE_TIME 70
#define PRODUCTION 1
#define FLASH 0

#define MAX_SOCKET_CLIENTS 5
#define BAUD_RATE 38400
#define TCP_LISTEN_PORT 9999
#define FORMAT_LITTLEFS_IF_FAILED true

#define ETH_ERROR_TIME 30
const int16_t overseerInterval = 5 * 1000; //check lan or wifi connection every 5sec
const uint8_t overseerMaxRetry = 12; //5x12 = 60sec delay for AP start
const uint8_t LED_BLUE = 12;
const uint8_t LED_YELLOW = 14;
const uint8_t MAX_SOCKET_CLIENTS = 5;

#define FORMAT_LITTLEFS_IF_FAILED true
enum COORDINATOR_MODE_t : uint8_t {COORDINATOR_MODE_LAN, COORDINATOR_MODE_WIFI, COORDINATOR_MODE_USB};

struct ConfigSettingsStruct
{
bool workMode; //0 - LAN, 1 - USB
bool enableWiFi;
// struct JsonConsts_t{
// char* str;
// };
// JsonConsts_t JsonConsts {
// "sadasd"
// };

struct ConfigSettingsStruct{
char ssid[50];
char password[50];
char ipAddressWiFi[18];
Expand All @@ -58,25 +59,20 @@ struct ConfigSettingsStruct
char hostname[50];
bool connectedSocket[10];
int connectedClients;
bool wifiModeAP;
unsigned long socketTime;
unsigned long disconnectEthTime;
int board;
char boardName[50];
bool emergencyWifi;
int tempOffset;
bool webAuth;
char webUser[50];
char webPass[50];
bool disableEmerg;
bool usbMode;
bool disableLedBlue;
bool disableLedYellow;
int wifiRetries;
bool disablePingCtrl;
int restarts;
unsigned long wifiAPenblTime;
bool disableLeds;
COORDINATOR_MODE_t coordinator_mode;
COORDINATOR_MODE_t prevCoordinator_mode;//for button
bool keepWeb;
bool apStarted;
bool wifiWebSetupInProgress;
};

struct InfosStruct
Expand All @@ -86,9 +82,9 @@ struct InfosStruct
char flash[8];
};

typedef CircularBuffer<char, 1024> LogConsoleType;
typedef CircularBuffer<char, 8024> LogConsoleType;

#define WL_MAC_ADDR_LENGTH 6
//#define WL_MAC_ADDR_LENGTH 6

#ifdef DEBUG
#define DEBUG_PRINT(x) Serial.print(x)
Expand Down
Loading

0 comments on commit ad9e5fc

Please sign in to comment.