Skip to content

Commit

Permalink
Merge pull request #154 from technyon/lilygo
Browse files Browse the repository at this point in the history
LilyGO-T-ETH-POE support
  • Loading branch information
technyon authored Mar 24, 2023
2 parents 0758df2 + b9dc0ff commit 07b3cb7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#define NUKI_HUB_VERSION "8.19-pre-2"
#define NUKI_HUB_VERSION "8.19-pre-3"

#define MQTT_QOS_LEVEL 1
#define MQTT_CLEAN_SESSIONS false
7 changes: 7 additions & 0 deletions Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ void Network::setupDevice()
Log->println(F("M5STACK PoESP32 Unit"));
_networkDeviceType = NetworkDeviceType::M5STACK_PoESP32_Unit;
break;
case 7:
Log->println(F("LilyGO T-ETH-POE"));
_networkDeviceType = NetworkDeviceType::LilyGO_T_ETH_POE;
break;
default:
Log->println(F("Unknown hardware selected, falling back to Wifi."));
_networkDeviceType = NetworkDeviceType::WiFi;
Expand All @@ -113,6 +117,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::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;
case NetworkDeviceType::WiFi:
_device = new WifiDevice(_hostname, _preferences, _ipConfiguration);
break;
Expand Down
3 changes: 2 additions & 1 deletion Network.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ enum class NetworkDeviceType
W5500,
Olimex_LAN8720,
WT32_LAN8720,
M5STACK_PoESP32_Unit
M5STACK_PoESP32_Unit,
LilyGO_T_ETH_POE
};

#define JSON_BUFFER_SIZE 1024
Expand Down
1 change: 1 addition & 0 deletions WebCfgServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ const std::vector<std::pair<String, String>> WebCfgServer::getNetworkDetectionOp
options.push_back(std::make_pair("4", "Olimex ESP32-POE / ESP-POE-ISO"));
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"));

return options;
}
Expand Down

0 comments on commit 07b3cb7

Please sign in to comment.