@@ -57,12 +57,20 @@ WebScreen> /help
5757/cat <file> - Display file contents
5858/rm <file> - Delete file
5959/load <script.js> - Load/switch to different JS app
60+ /wget <url> [file] - Download file from URL to SD card
61+ /ping <host> - Test network connectivity
62+ /backup [save|restore] - Backup/restore configuration
63+ /monitor [cpu|mem|net] - Live system monitoring
6064/reboot - Restart the device
6165
6266Examples:
6367/write hello.js
6468/config get wifi.ssid
6569/config set wifi.ssid MyNetwork
70+ /wget https://example.com/app.js
71+ /ping google.com
72+ /backup save production
73+ /monitor mem
6674/ls /
6775/cat webscreen.json
6876```
@@ -182,6 +190,157 @@ WebScreen> /load weather.js
182190- A/B testing of application variants
183191- Quick application switching for demonstrations
184192
193+ ### Network and System Commands
194+
195+ #### ` /wget <url> [filename] `
196+ Downloads files from HTTP/HTTPS URLs directly to the SD card.
197+
198+ ** Usage:**
199+ ```
200+ WebScreen> /wget https://example.com/config.json
201+ Downloading: https://example.com/config.json
202+ Saving to: /config.json
203+ Content-Length: 2.3 KB
204+ Progress: 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
205+ [OK] Downloaded 2.3 KB to /config.json
206+ ```
207+
208+ ** Features:**
209+ - ** Auto Filename** : Extracts filename from URL if not specified
210+ - ** Progress Display** : Shows download progress for known file sizes
211+ - ** HTTPS Support** : Handles both HTTP and HTTPS protocols
212+ - ** Error Handling** : Clear error messages for connection failures
213+
214+ ** Use Cases:**
215+ - Download JavaScript libraries or frameworks
216+ - Fetch configuration files from servers
217+ - Update application scripts from GitHub
218+ - Download assets like fonts or data files
219+
220+ #### ` /ping <host> `
221+ Tests network connectivity to a specified host.
222+
223+ ** Usage:**
224+ ```
225+ WebScreen> /ping google.com
226+ PING google.com
227+ Pinging google.com (142.250.185.78) with 32 bytes of data:
228+ Reply from 142.250.185.78: time=23ms
229+ Reply from 142.250.185.78: time=19ms
230+ Reply from 142.250.185.78: time=21ms
231+ Reply from 142.250.185.78: time=18ms
232+
233+ Ping statistics for 142.250.185.78:
234+ Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
235+ Approximate round trip times:
236+ Minimum = 18ms, Maximum = 23ms, Average = 20ms
237+ ```
238+
239+ ** Features:**
240+ - ** DNS Resolution** : Resolves hostnames to IP addresses
241+ - ** Statistics** : Provides min/max/average response times
242+ - ** Packet Loss** : Shows connection reliability
243+ - ** TCP-based** : Uses TCP connections for compatibility
244+
245+ ** Use Cases:**
246+ - Verify network connectivity before API calls
247+ - Test DNS resolution
248+ - Debug network issues
249+ - Monitor connection quality
250+
251+ #### ` /backup [save|restore|list] [name] `
252+ Manages configuration backups with metadata tracking.
253+
254+ ** Usage:**
255+ ```
256+ WebScreen> /backup save production
257+ [OK] Configuration backed up to /backups/production.json
258+
259+ WebScreen> /backup list
260+ Available backups:
261+ Name Size Date
262+ ----------------------------------------
263+ production 1.2 KB 45 sec ago
264+ dev_config 1.1 KB 3600 sec ago
265+ testing 1.3 KB 7200 sec ago
266+
267+ WebScreen> /backup restore production
268+ [OK] Configuration restored from production
269+ Please reboot for changes to take effect
270+ ```
271+
272+ ** Features:**
273+ - ** Auto Naming** : Generates timestamp-based names if not specified
274+ - ** Metadata Storage** : Saves timestamp, WiFi SSID, memory status
275+ - ** Directory Management** : Creates ` /backups ` directory automatically
276+ - ** Listing Support** : Shows all backups with age information
277+
278+ ** Operations:**
279+ - ` save [name] ` - Create a new backup
280+ - ` restore <name> ` - Restore a specific backup
281+ - ` list ` - Show all available backups
282+
283+ ** Use Cases:**
284+ - Save configuration before making changes
285+ - Create environment-specific configurations
286+ - Quick rollback to known-good settings
287+ - A/B testing different configurations
288+
289+ #### ` /monitor [cpu|mem|net|all] `
290+ Provides real-time system monitoring with auto-refresh.
291+
292+ ** Usage:**
293+ ```
294+ WebScreen> /monitor mem
295+ Live Monitor - Press any key to stop
296+ =====================================
297+ [14:23:45] Heap: 234.5KB/320.0KB (73.3%) | PSRAM: 7.2MB/8.0MB (90.0%)
298+ ```
299+
300+ ** Monitor Modes:**
301+
302+ ** Memory Mode (` mem ` or ` memory ` ):**
303+ ```
304+ [HH:MM:SS] Heap: FREE/TOTAL (%) | PSRAM: FREE/TOTAL (%)
305+ ```
306+ - Shows heap and PSRAM usage
307+ - Displays percentages for quick assessment
308+ - Updates every second
309+
310+ ** CPU Mode (` cpu ` ):**
311+ ```
312+ [HH:MM:SS] CPU: 240 MHz | Load: 45.2% | Temp: 42.3°C | Tasks: 12
313+ ```
314+ - CPU frequency and utilization
315+ - Core temperature monitoring
316+ - FreeRTOS task count
317+
318+ ** Network Mode (` net ` or ` network ` ):**
319+ ```
320+ [HH:MM:SS] WiFi: MyNetwork | IP: 192.168.1.100 | RSSI: -45 dBm | Channel: 6
321+ ```
322+ - Current WiFi connection
323+ - IP address assignment
324+ - Signal strength (RSSI)
325+ - WiFi channel number
326+
327+ ** All Mode (` all ` ):**
328+ - Cycles through all metrics
329+ - Shows different stat each second
330+ - Comprehensive system overview
331+
332+ ** Features:**
333+ - ** Real-time Updates** : Refreshes every second
334+ - ** Non-blocking** : Press any key to stop
335+ - ** Timestamped** : Each update shows current time
336+ - ** ANSI Formatting** : Clean single-line updates
337+
338+ ** Use Cases:**
339+ - Monitor memory during JavaScript execution
340+ - Track CPU temperature under load
341+ - Debug WiFi connectivity issues
342+ - Performance profiling during development
343+
185344### Configuration Management
186345
187346#### ` /config get <key> `
0 commit comments