Skip to content
Open
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,643 changes: 1,639 additions & 4 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
"dependencies": {
"clean-css": "^5.3.3",
"html-minifier-terser": "^7.2.0",
"web-resource-inliner": "^7.0.0",
"nodemon": "^3.1.9"
"inliner": "^1.13.1",
"nodemon": "^3.1.9",
"web-resource-inliner": "^7.0.0"
Comment on lines +28 to +30
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for references to 'inliner' in the codebase (excluding node_modules)
echo "=== Searching for 'inliner' references ==="
rg -i "inliner" -g '!node_modules' --type-list | head -20

echo -e "\n=== Checking JavaScript/TypeScript files ==="
rg -n "inliner" -t js -t ts -g '!node_modules' 2>/dev/null || echo "No matches found in .js/.ts files"

echo -e "\n=== Checking configuration files ==="
rg -n "inliner" -t json -t yaml -t toml -g '!node_modules' 2>/dev/null || echo "No matches in config files"

echo -e "\n=== All references to 'inliner' (case-insensitive) ==="
rg -i "inliner" --type-list 2>/dev/null | head -5 || rg -i "inliner" -g '!node_modules' 2>/dev/null || echo "No references found"

Repository: MoonModules/WLED-MM

Length of output: 1539


🏁 Script executed:

#!/bin/bash
# Check npm scripts section in package.json
echo "=== Checking npm scripts in package.json ==="
jq '.scripts' package.json 2>/dev/null || cat package.json | grep -A 50 '"scripts"' | head -60

echo -e "\n=== Checking if 'inliner' is called as CLI in any scripts ==="
grep -r "inliner" package.json || echo "No 'inliner' found in package.json scripts"

Repository: MoonModules/WLED-MM

Length of output: 402


Remove unused inliner dependency.

The inliner package was added to package.json but is not used anywhere in the codebase. The build scripts reference only web-resource-inliner, which is the actual dependency being imported in tools/cdata.js. Remove inliner from both package.json and package-lock.json.

🤖 Prompt for AI Agents
In `@package.json` around lines 28 - 30, Remove the unused "inliner" dependency
declaration from package.json and also remove its entry from package-lock.json;
verify that tools/cdata.js imports only "web-resource-inliner" (not "inliner")
and then run npm install (or npm ci) to regenerate the lockfile so
package-lock.json no longer contains "inliner". Ensure package.json still lists
"web-resource-inliner" and that no other files import or require "inliner"
before committing.

},
"engines": {
"node": ">=20.0.0"
Expand Down
5 changes: 4 additions & 1 deletion wled00/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
#define BTN_TYPE_TOUCH_SWITCH 9 //WLEDMM not yet supported

//Ethernet board types
#define WLED_NUM_ETH_TYPES 15 //WLEDMM +1 for Olimex ESP32-Gateway
#define WLED_NUM_ETH_TYPES 18 //WLEDMM +1 for Olimex ESP32-Gateway + 3 for W5500

#define WLED_ETH_NONE 0
#define WLED_ETH_WT32_ETH01 1
Expand All @@ -326,6 +326,9 @@
#define WLED_ETH_LILYGO_T_POE_PRO 12
#define WLED_ETH_GLEDOPTO 13
#define WLED_ETH_OLIMEX_GTW 14
#define WLED_ETH_TTGO_T_ETH_LITE_S3 15
#define WLED_ETH_WAVESHARE_ESP32_S3_ETH 16
#define WLED_ETH_W5500_GENERIC 17

//Hue error codes
#define HUE_ERROR_INACTIVE 0
Expand Down
3 changes: 3 additions & 0 deletions wled00/data/settings_wifi.htm
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ <h3>Ethernet Type</h3>
<option value="3">WESP32</option>
<option value="1">WT32-ETH01</option>
<option value="13">Gledopto</option>
<option value="15">TTGO T-ETH-Lite S3 (W5500) ☾</option> <!-- WLEDMM -->
<option value="16">WaveShare ESP32-S3-ETH (W5500) ☾</option> <!-- WLEDMM -->
<option value="17">W5500 Generic ☾</option> <!-- WLEDMM -->
</select><br><br>
</div>
<hr>
Expand Down
145 changes: 144 additions & 1 deletion wled00/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// The following six pins are neither configurable nor
// can they be re-assigned through IOMUX / GPIO matrix.
// See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit-v1.1.html#ip101gri-phy-interface

#ifdef CONFIG_ETH_PHY_INTERFACE_RMII
const managed_pin_type esp32_nonconfigurable_ethernet_pins[WLED_ETH_RSVD_PINS_COUNT] = {
{ 21, true }, // RMII EMAC TX EN == When high, clocks the data on TXD0 and TXD1 to transmitter
{ 19, true }, // RMII EMAC TXD0 == First bit of transmitted data
Expand All @@ -17,6 +19,9 @@ const managed_pin_type esp32_nonconfigurable_ethernet_pins[WLED_ETH_RSVD_PINS_CO
{ 26, false }, // RMII EMAC RXD1 == Second bit of received data
{ 27, true }, // RMII EMAC CRS_DV == Carrier Sense and RX Data Valid
};
#else
const managed_pin_type esp32_nonconfigurable_ethernet_pins[] = {};
#endif

const ethernet_settings ethernetBoards[] = {
// None
Expand All @@ -33,6 +38,12 @@ const ethernet_settings ethernetBoards[] = {
16, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO0_IN // eth_clk_mode
},
Expand All @@ -43,6 +54,12 @@ const ethernet_settings ethernetBoards[] = {
12, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
},
Expand All @@ -53,6 +70,12 @@ const ethernet_settings ethernetBoards[] = {
-1, // eth_power,
16, // eth_mdc,
17, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO0_IN // eth_clk_mode
},
Expand All @@ -63,6 +86,12 @@ const ethernet_settings ethernetBoards[] = {
5, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
},
Expand All @@ -73,6 +102,12 @@ const ethernet_settings ethernetBoards[] = {
5, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
},
Expand All @@ -83,6 +118,12 @@ const ethernet_settings ethernetBoards[] = {
-1, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
},
Expand All @@ -93,6 +134,12 @@ const ethernet_settings ethernetBoards[] = {
5, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_IP101, // eth_type,
ETH_CLOCK_GPIO0_IN // eth_clk_mode
},
Expand All @@ -103,6 +150,12 @@ const ethernet_settings ethernetBoards[] = {
-1, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
},
Expand All @@ -113,6 +166,12 @@ const ethernet_settings ethernetBoards[] = {
5, // eth_power,
23, // eth_mdc,
33, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
},
Expand All @@ -123,6 +182,12 @@ const ethernet_settings ethernetBoards[] = {
5, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
},
Expand All @@ -133,6 +198,12 @@ const ethernet_settings ethernetBoards[] = {
12, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO0_OUT // eth_clk_mode
},
Expand All @@ -144,6 +215,12 @@ const ethernet_settings ethernetBoards[] = {
5, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO0_OUT // eth_clk_mode
},
Expand All @@ -154,19 +231,78 @@ const ethernet_settings ethernetBoards[] = {
5, // eth_power,
23, // eth_mdc,
33, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO0_IN // eth_clk_mode
},


//WLEDMM: Olimex-ESP32-Gateway (like QuinLed-ESP32-Ethernet
{
0, // eth_address,
5, // eth_power,
23, // eth_mdc,
18, // eth_mdio,
GPIO_NUM_NC, // eth_miso_pin,
GPIO_NUM_NC, // eth_mosi_pin,
GPIO_NUM_NC, // eth_cs_pin,
GPIO_NUM_NC, // eth_rst_pin,
GPIO_NUM_NC, // eth_int_pin;
GPIO_NUM_NC, // eth_sclk_pin;
ETH_PHY_LAN8720, // eth_type,
ETH_CLOCK_GPIO17_OUT // eth_clk_mode
},

// WLEDMM: TTGO T-ETH-Lite S3 (W5500) ☾
{
1, // eth_address,
GPIO_NUM_NC, // eth_power,
GPIO_NUM_NC, // eth_mdc,
GPIO_NUM_NC, // eth_mdio,
11, // eth_miso_pin,
12, // eth_mosi_pin,
9, // eth_cs_pin,
14, // eth_rst_pin,
13, // eth_int_pin;
10, // eth_sclk_pin;
ETH_PHY_W5500, // eth_type,
ETH_CLOCK_GPIO0_OUT // eth_clk_mode (ignored for W5500)
},

// WaveShare ESP32-S3-ETH (W5500) ☾
{
1, // eth_address,
GPIO_NUM_NC, // eth_power,
GPIO_NUM_NC, // eth_mdc,
GPIO_NUM_NC, // eth_mdio,
12, // eth_miso_pin,
11, // eth_mosi_pin,
14, // eth_cs_pin,
9, // eth_rst_pin,
10, // eth_int_pin;
13, // eth_sclk_pin;
ETH_PHY_W5500, // eth_type,
ETH_CLOCK_GPIO0_OUT // eth_clk_mode (ignored for W5500)
},

// W5500 Generic, based on some ESP32 Troy had lying around ☾
{
1, // eth_address,
GPIO_NUM_NC, // eth_power,
GPIO_NUM_NC, // eth_mdc,
GPIO_NUM_NC, // eth_mdio,
12, // eth_miso_pin,
13, // eth_mosi_pin,
25, // eth_cs_pin,
26, // eth_rst_pin,
27, // eth_int_pin;
14, // eth_sclk_pin;
ETH_PHY_W5500, // eth_type,
ETH_CLOCK_GPIO0_OUT // eth_clk_mode (ignored for W5500)
}

};
Expand Down Expand Up @@ -233,6 +369,12 @@ void WiFiEvent(WiFiEvent_t event)
prepareHostname(hostname);
ETH.setHostname(hostname);
showWelcomePage = false;
USER_PRINTF("Ethernet link is %sup. Speed is %u mbit and link is %sfull duplex! (MAC: ", ETH.linkUp() ? "" : "not ", ETH.linkSpeed(), ETH.fullDuplex() ? "" : "not ");
USER_PRINT(ETH.macAddress());
USER_PRINTLN(")");
escapedMac = ETH.macAddress();
escapedMac.replace(":", "");
escapedMac.toLowerCase();
break;
}
case SYSTEM_EVENT_ETH_DISCONNECTED:
Expand All @@ -246,6 +388,7 @@ void WiFiEvent(WiFiEvent_t event)
break;
#endif
default:
DEBUG_PRINTF("Unhandled Network event: %d\n", (int)event);
break;
}
}
Expand Down
4 changes: 3 additions & 1 deletion wled00/src/dependencies/network/Network.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#include <ESP8266WiFi.h>
#else // ESP32
#include <WiFi.h>
#include <ETH.h>
// #include <ETH.h>
#include "ETHClass2.h"
extern ETHClass2 ETH;
#endif

#ifndef Network_h
Expand Down
Loading
Loading