Skip to content

Commit 72e001b

Browse files
committed
Bash and Wnindows CMD scripts for updating multiple WLEDs.
1 parent 3eb1fe0 commit 72e001b

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

tools/multi-update.cmd

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@echo off
2+
SETLOCAL
3+
SET FWPATH=c:\path\to\your\WLED\build_output\firmware
4+
GOTO ESPS
5+
6+
:UPDATEONE
7+
IF NOT EXIST %FWPATH%\%2 GOTO SKIP
8+
ping -w 1000 -n 1 %1 | find "TTL=" || GOTO SKIP
9+
ECHO Updating %1
10+
curl -s -F "update=@%FWPATH%/%2" %1/update >nul
11+
:SKIP
12+
GOTO:EOF
13+
14+
:ESPS
15+
call :UPDATEONE 192.168.x.x firmware.bin
16+
call :UPDATEONE ....

tools/multi-update.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
FWPATH=/path/to/your/WLED/build_output/firmware
3+
4+
update_one() {
5+
if [ -f $FWPATH/$2 ]; then
6+
ping -c 1 $1 >/dev/null
7+
PINGRESULT=$?
8+
if [ $PINGRESULT -eq 0 ]; then
9+
echo Updating $1
10+
curl -s -F "update=@${FWPATH}/$2" $1/update >/dev/null
11+
return 0
12+
fi
13+
return 1
14+
fi
15+
}
16+
17+
update_one 192.168.x.x firmware.bin
18+
update_one 192.168.x.x firmware.bin
19+
# ...

0 commit comments

Comments
 (0)