Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GL-S10 #386

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ As an alternative to Wi-Fi (which is available on any supported ESP32), the foll
- [M5Stack Atom POE](https://docs.m5stack.com/en/atom/atom_poe)
- [M5Stack PoESP32 Unit](https://docs.m5stack.com/en/unit/poesp32)
- [LilyGO-T-ETH-POE](https://github.com/Xinyuan-LilyGO/LilyGO-T-ETH-POE)
- [GL-S10](https://www.gl-inet.com/products/gl-s10/)

<b>Note for users upgrading from Nuki Hub 8.21 or lower:</b><br>
Please go to "MQTT and Network Configuration" and select "Wi-Fi only" as the network device (unless you use other network hardware).
Expand Down
7 changes: 7 additions & 0 deletions src/Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ void Network::setupDevice()
Log->println(F("LilyGO T-ETH-POE"));
_networkDeviceType = NetworkDeviceType::LilyGO_T_ETH_POE;
break;
case 8:
Log->println(F("GL-S10"));
_networkDeviceType = NetworkDeviceType::GL_S10;
break;
default:
Log->println(F("Unknown hardware selected, falling back to Wi-Fi."));
_networkDeviceType = NetworkDeviceType::WiFi;
Expand All @@ -130,6 +134,9 @@ void Network::setupDevice()
case NetworkDeviceType::M5STACK_PoESP32_Unit:
_device = new EthLan8720Device(_hostname, _preferences, _ipConfiguration, "M5STACK PoESP32 Unit", 1, 5, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_IP101);
break;
case NetworkDeviceType::GL_S10:
_device = new EthLan8720Device(_hostname, _preferences, _ipConfiguration, "GL-S10", 1, 5, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_IP101, ETH_CLOCK_GPIO0_IN);
break;
case NetworkDeviceType::LilyGO_T_ETH_POE:
_device = new EthLan8720Device(_hostname, _preferences, _ipConfiguration, "LilyGO T-ETH-POE", 0, -1, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLOCK_GPIO17_OUT);
break;
Expand Down
3 changes: 2 additions & 1 deletion src/Network.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ enum class NetworkDeviceType
Olimex_LAN8720,
WT32_LAN8720,
M5STACK_PoESP32_Unit,
LilyGO_T_ETH_POE
LilyGO_T_ETH_POE,
GL_S10
};

#define JSON_BUFFER_SIZE 1024
Expand Down
3 changes: 2 additions & 1 deletion src/WebCfgServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,8 @@ const std::vector<std::pair<String, String>> WebCfgServer::getNetworkDetectionOp
options.push_back(std::make_pair("5", "WT32-ETH01"));
options.push_back(std::make_pair("6", "M5STACK PoESP32 Unit"));
options.push_back(std::make_pair("7", "LilyGO T-ETH-POE"));

options.push_back(std::make_pair("8", "GL-S10"));

return options;
}

Expand Down