[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-11719":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},11719,"KernelESP","hery-torrado\u002FKernelESP","hery-torrado","ESP8266 UNIX-like control system with serial shell, web UI, automation, mail alerts and diagnostics",null,"C++",196,11,5,3,0,22,3.24,"BSD 3-Clause \"New\" or \"Revised\" License",false,"main",true,[],"2026-06-12 02:02:33","# KernelESP\n\nKernelESP is a small ESP8266 firmware that turns the board into a tiny networked control system with a UNIX-like serial shell, a password-protected web console, LittleFS storage, relay control, scheduled jobs, sensor rules, scripts, logs, NTP time and a JSON API.\n\nCurrent firmware version: `0.10.0`.\n\n## Lineage, Attribution And License\n\nKernelESP is inspired by and includes source code copied\u002Fadapted from\n[KernelUNO](https:\u002F\u002Fgithub.com\u002FArc1011\u002FKernelUNO), a lightweight UNIX-like shell\nfor Arduino UNO created by\n[Arc1011](https:\u002F\u002Fgithub.com\u002FArc1011).\n\nKernelUNO established the original spirit of a tiny Arduino shell with familiar\nUNIX-style commands. KernelESP keeps that idea and extends it for ESP8266 with\npersistent LittleFS storage, Wi-Fi, a web UI, JSON API, automations, mail\nalerts, localized web help, diagnostics and release tooling.\n\nKernelUNO is distributed under the BSD 3-Clause License. KernelESP keeps the\nsame license family and preserves the original copyright notice for copied or\nadapted portions. See `LICENSE`, `NOTICE` and `THIRD_PARTY_NOTICES.md`.\n\n## Screenshots\n\n![KernelESP architecture](docs\u002Fassets\u002Farchitecture.svg)\n\n![Live UI dashboard](docs\u002Fassets\u002Flive-dashboard.png)\n\n![Command flow](docs\u002Fassets\u002Fcommand-flow.svg)\n\n![Serial console](docs\u002Fassets\u002Fserial-console.svg)\n\nMore screenshots and diagrams:\n\n```text\ndocs\u002FSCREENSHOTS.md\n```\n\n## What It Can Do\n\n- Interactive serial shell with commands such as `ls`, `cat`, `head`, `tail`, `grep`, `find`, `wc`, `du`, `df`, `mount`, `which`, `whoami`, `id`, `groups`, `who`, `w`, `ps`, `pgrep`, `pidof`, `kill`, `jobs`, `dmesg`, `free`, `uname`, `date`.\n- Lightweight pipes for common text workflows: `cmd | grep text | head -n 5 | tail -n 5 | wc -l | tee \u002Fpath\u002Ffile`.\n- LittleFS file system with `\u002Fetc`, `\u002Fhome`, `\u002Fvar\u002Flog`, `\u002Fwww`, `\u002Fetc\u002Fboot.sh` and `\u002Fetc\u002Fmotd`.\n- Web UI with login, dashboard, richer Live UI, command runner, script editor, diagnostics, setup wizard, profiles, logs, settings, backup and a Professional panel.\n- Static web assets served from `\u002Fwww`, so CSS\u002FJS can be changed without recompiling.\n- Relay control by name, GPIO and active-low\u002Factive-high mode.\n- Timers, cron jobs, scenes, persistent state, digital inputs and sensor rules for automation.\n- Tiny C-like automation language with `if (...)`, `&&`, `||`, `!`, blocks, `else`, persistent variables, constants and persistent functions.\n- Debian-like shell helpers: `test`, `basename`, `dirname`, `source`, `run`, `repeat`, `logger`, `onboot`, `pkg`, `printenv`, `setenv`, `crontab`, `systemctl`, `ifconfig`, `ip`.\n- RAM-generated pseudo `\u002Fproc`, `stat`, `journalctl`, `dryrun`, `profile` snapshots and module `export`.\n- Professional support commands: `diag` for read-only diagnostic bundles and `board` for profile\u002Fpin guidance.\n- Friendly automation wrappers: `schedule` and `climate`.\n- Native rule cooldown and range\u002Fhysteresis rules.\n- NTP time sync and `date`.\n- BME280\u002FBMP280 support for temperature, pressure and humidity where available.\n- Basic PCF8574 and MCP23017 I2C GPIO expander commands.\n- Non-blocking Wi-Fi save\u002Fautoconnect, hostname and simple TCP\u002FHTTP diagnostics.\n- Wi-Fi watchdog and fallback setup AP so serial remains usable while network recovery happens in the background.\n- Backup export of important LittleFS configuration files.\n- Flash-wear-aware logging: `dmesg` in RAM, persistent logs opt-in with `log flash on`.\n- Web authentication lockout after repeated failed attempts.\n\n## Project Layout\n\n```text\nKernelESP\u002F\n  KernelESP.ino              Firmware source\n  README.md                  Project overview\n  LICENSE                    BSD 3-Clause License\n  NOTICE                     KernelUNO attribution and project lineage\n  THIRD_PARTY_NOTICES.md     Third-party source-code notices\n  CONTRIBUTING.md            Contribution rules and verification workflow\n  SECURITY.md                Security assumptions and reporting guidance\n  CHANGELOG.md               Release history\n  docs\u002F\n    USER_MANUAL.md           End-user manual and command examples\n    COMMAND_REFERENCE.md     Full command reference\n    AUTOMATION_LANGUAGE.md   C-like automation language, variables, blocks and functions\n    PROFESSIONAL_OPERATIONS.md Release, support and production workflow\n    AUTOMATION_COOKBOOK.md   Relay, timer, cron, rule and sensor recipes\n    WEB_AND_API.md           Web UI, JSON API and static assets\n    PROGRAMMER_MANUAL.md     Architecture and contributor guide\n    HARDWARE.md              ESP8266 pins, relays, sensors and memory notes\n    GITHUB_RELEASE_CHECKLIST.md Pre-publish checklist for GitHub\n    SCREENSHOTS.md           Screenshot gallery and architecture diagrams\n    PROJECT_STATE.md         Current build, upload and continuation notes\n  book\u002F\n    KernelESP_Beginners_Book.pdf Beginner-friendly illustrated PDF guide\n    assets\u002Fcover-hero.png    Book cover image source\n  examples\u002F\n    boot.sh                  Example boot script\n    relay_pulse.sh           Example relay script\n    climate_rules.txt        Example sensor automation commands\n    cron_examples.txt        Example cron commands\n    mail_workflows.txt       Example SMTP alert and daily health workflows\n  data\u002Fwww\u002F\n    index.html               Live UI application shell\n    app.js                   Live UI JavaScript core, served from LittleFS\n    app2.js                  Live UI panel builder\n    app3.js                  Live UI cron\u002Fsystem\u002Flog panel builder\n    app3b.js                 Live UI refresh loop, API timeout and output routing\n    app3c.js                 Live UI form handlers and clock validation\n    app3d.js                 Live UI status cards, alerts and heap chart\n    app4.js                  Live UI relay rendering and command buttons\n    app4b.js                 Live UI automation builder and browser command history\n    app5.js                  Live UI network configuration panel\n    app6.js                  Live UI polish: online indicator, retro theme, copy buttons\n    app7.js                  Live UI ops panel, templates and console keyboard helpers\n    app8.js                  Live UI script editor improvements\n    app8b.js                 Live UI file browser and script save\u002Frun helpers\n    app9.js                  Live UI automation view and diagnostics\n    app10.js                 Live UI professional panel logic\n    app11.js                 Live UI professional panel markup\u002Fstyles\n    app12.js                 Live UI mail alerts panel markup\n    app13.js                 Live UI mail alerts actions and workflow builders\n    style.css                Current web stylesheet for LittleFS\n    style2.css               Additional responsive Live UI styling\n  tools\u002F\n    compile.sh               Compile with arduino-cli\n    upload.sh                Upload firmware to the ESP8266\n    upload-assets.sh         Upload \u002Fwww and \u002Fhelp LittleFS assets\n    verify.sh                Run local syntax, encoding and compile checks\n    smoke-http.sh            Run read-only HTTP\u002FAPI smoke tests\n    stability-http.sh        Run repeated HTTP\u002FAPI stability checks\n    wifi-sdkreset.sh         Send wifi sdkreset --yes over serial\n    release.sh               Build a release directory and tarball\n    diagnostic-bundle.sh     Export a support bundle from a running ESP\n    ota-preflight.sh         Check update readiness without enabling OTA\n    serial-monitor.sh        Open a serial monitor\n    build-beginners-book.py  Generate the PDF book\n    requirements-book.txt    Python dependencies for the PDF book\n  .github\u002Fworkflows\u002F         Lightweight static checks for pull requests\n```\n\n## Quick Start\n\nCompile:\n\n```sh\ntools\u002Fcompile.sh\n```\n\nUpload. The script auto-detects common ESP serial ports; pass a port only when\nauto-detection finds the wrong adapter:\n\n```sh\ntools\u002Fupload.sh\ntools\u002Fupload.sh \u002Fdev\u002Fcu.usbserial-02094OMK\n```\n\nAfter a successful serial upload, `tools\u002Fupload.sh` automatically sends\n`wifi sdkreset --yes` to clear stale ESP8266 SDK Wi-Fi state before the board\nreconnects. Set `POST_UPLOAD_WIFI_SDKRESET=0` only when you explicitly want to\nskip that recovery step.\n\nOpen the web UI. Get the current address from serial with `wifi status` or `web status`.\n\n```text\nhttp:\u002F\u002F\u003Cesp-ip>\u002F\n```\n\nIf station Wi-Fi fails and fallback AP is enabled, connect to `KernelESP-Setup` and use:\n\n```text\nhttp:\u002F\u002F192.168.4.1\u002F\n```\n\nRun a command over the API:\n\n```sh\ncurl -G 'http:\u002F\u002F\u003Cesp-ip>\u002Fapi\u002Fcmd' \\\n  --data-urlencode 'key=admin' \\\n  --data-urlencode 'c=uname'\n```\n\nTry pipes from serial, the web command runner or `\u002Fapi\u002Fcmd`:\n\n```text\nhealth | grep wifi\ndmesg | tail -n 5\nhealth | wc -l\nhealth | tee \u002Fhome\u002Fhealth.txt\n```\n\n## Useful First Commands\n\n```text\nhelp\nhelp relay\nuname\nfree\ndf\nwifi status\ndate\nls \u002F\ncat \u002Fetc\u002Fmotd\nboot show\njobs\nhealth\ndiag\nboard\n```\n\n## Documentation\n\nRead these in order:\n\n1. `docs\u002FUSER_MANUAL.md`\n2. `docs\u002FCOMMAND_REFERENCE.md`\n3. `docs\u002FAUTOMATION_COOKBOOK.md`\n4. `docs\u002FWEB_AND_API.md`\n5. `docs\u002FHARDWARE.md`\n6. `docs\u002FPROFESSIONAL_OPERATIONS.md`\n7. `docs\u002FPROGRAMMER_MANUAL.md`\n8. `docs\u002FGITHUB_RELEASE_CHECKLIST.md`\n\n## Before Publishing To GitHub\n\n- Keep the BSD 3-Clause License, KernelUNO attribution notice and third-party\n  notices.\n- Do not commit `.venv\u002F`, `build\u002F`, `dist\u002F`, `diagnostics\u002F`, `.DS_Store`,\n  `.env` or generated logs.\n- Search for real Wi-Fi keys, web keys, private SMTP details and local network\n  addresses before pushing.\n- Run:\n\n```sh\ntools\u002Fverify.sh\nSKIP_COMPILE=1 tools\u002Fverify.sh\n```\n\n## Current Memory Profile\n\nLast verified build for `0.10.0`:\n\n```text\nRAM global: 42816 \u002F 80192 bytes, 53%\nIRAM:       62567 \u002F 65536 bytes, 95%\nFlash app: 489440 \u002F 1048576 bytes, 46%\nLittleFS:  about 1.00 MB free after web\u002Fhelp assets on the tested 4 MB module\nRuntime heap: around 30-33 KB free in normal web use\n```\n\nIRAM is the tightest resource. Prefer LittleFS-hosted CSS\u002FJS\u002FHTML and compact firmware functions. Persistent logging is disabled by default to avoid unnecessary flash wear; enable it only when needed.\n","KernelESP 是一个基于 ESP8266 的小型固件，将开发板转变为具有类 UNIX 串行 shell、密码保护的 Web 控制台、LittleFS 存储、继电器控制、定时任务、传感器规则、脚本、日志、NTP 时间同步和 JSON API 的微型网络控制系统。该项目使用 C++ 编写，提供了丰富的命令行工具如 `ls`、`cat` 等，并支持轻量级管道操作以实现文本处理工作流。此外，它还具备自动化语言、邮件警报及诊断功能。适用于需要远程管理和自动化控制的小型物联网项目场景。",2,"2026-06-11 03:32:25","CREATED_QUERY"]