# MinnaESP8266 **Repository Path**: manykit/minnaesp8266 ## Basic Information - **Project Name**: MinnaESP8266 - **Description**: MinnaESP8266 是 Minna 小宇宙 里的“Wifi联网小精灵”,让任何ESP8266的Wifi设备都能听懂 AI 的话,例如变成一个会联网的智能开关! - **Primary Language**: C++ - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2025-05-13 - **Last Updated**: 2025-08-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Minna Switch Box A simple WiFi + MQTT switch box firmware for ESP8266. Supports SoftAP WiFi configuration, MQTT control, local button control, and LED status indication. ## Features - SoftAP + WebServer WiFi configuration - Persistent configuration using SPIFFS - MQTT client with reconnect logic - Local button control for manual switching - Long press button (6 seconds) to clear WiFi and enter config mode - LED indicator for connection and status - Clean serial debug logs ## Pin Mapping | Pin | Function | |------|----------------| | D4 | Relay SW A | | D1 | Relay SW B | | D7 | Button input | | D13 | LED indicator | ## LED Status Indication - On boot: LED flashes 4 times to indicate system start - Normal operation: LED stays ON (WiFi + MQTT connected) - MQTT reconnecting: LED blinks slowly - Entering SoftAP config mode: LED blinks 4 times slowly - Button long press 2 sec: LED blinks quickly before reboot ## MQTT Topics - `home/device/info` → report device info - `home/device/status_rep/` → report current switch state - `home/device/status_req/` → request current state - `home/device/set/` → set switch state (`{"state":1}`) ## Usage 1. Flash this firmware to an ESP8266 board. 2. On first boot or long press 6 seconds → device enters SoftAP mode. 3. Connect to WiFi `minna-setup` and open `192.168.4.1` in browser. 4. Configure WiFi SSID, password, deviceID, and MQTT server. 5. Device will auto connect and work. ## Requirements - ESP8266 core for Arduino - Libraries: - ESP8266WiFi - ESP8266WebServer - FS - ArduinoJson - PubSubClient - OneButton ## License MIT License. (c) 2024 ManyKit