Skip to content

Releases: Mi-Bee-Studio/seeed-esp32s3-cam

v0.3.0

13 Jun 05:28

Choose a tag to compare

v0.3.0 — ONVIF, MJPEG Port Separation, Frame Broadcaster, Stability

New Features

  • ONVIF auto-discovery (WS-Discovery) — MiBee Cam appears automatically in NVR software (Synology Surveillance Station, Milestone XProtect, ONVIF-compatible NVRs) without manual IP entry
  • ONVIF SOAP services — Probe, DeviceInfo, GetServices, GetScopes, GetHostname, GetEndpointReference, GetProfiles, StreamURI (returns HTTP MJPEG URI)
  • Frame broadcaster — camera frame buffer (FB) copied to PSRAM and returned immediately; recording and streaming never block each other on FB access
  • MJPEG on independent TCP server (port 81) — separate from HTTP web server (port 80), eliminates stream blocking web UI
  • Instant frame delivery — cached last frame sent immediately to new MJPEG clients, no wait for next capture
  • Prometheus /metrics — node_exporter-compatible format (15+ metrics: heap, PSRAM, temperature, recording stats, storage, WiFi)
  • Auto-optimized timelapse config — segment_sec and fps auto-computed from interval; user only sets resolution/interval/JPEG quality
  • 1-second timelapse interval — new minimum interval option for near-real-time capture
  • Camera graceful degradation — firmware boots without camera if init fails; /api/camera/availability endpoint reports status; web UI shows camera offline
  • Thread-safe config access — mutex-protected reads/writes, input validation on all config fields
  • Product rename — MiBeeHomeCam → MiBee Cam (firmware, docs, configs, all references)

Bug Fixes

  • 🔴 Camera FB contention — frame broadcaster eliminates FB conflict between recording and streaming (root cause of stream freezes)
  • 🔴 MJPEG stream blocking web UI — moved to independent port 81 with separate TCP server task
  • 🔴 Camera capture 20s timeout — safety abort via xTaskAbortDelay, prevents indefinite block on dead/hung camera sensor
  • 🔴 NAS upload TWDT crash — WDT feed in retry loops, upload timeout reduced 60s→20s, URL encoding for spaces
  • 🔴 Recorder zero-interval busy loop — timelapse interval=0 no longer spin-locks the recording task
  • 🔴 WiFi power save causing DHCP/HTTP issues — power save disabled for reliable network connectivity
  • 🔴 WiFi reconnect race condition — flexible auth mode, DHCP hostname set, race condition in reconnection logic
  • 🔴 WiFi multicast reception — lowered listen_interval for reliable ONVIF WS-Discovery
  • 🔴 Timer stack overflow — increased stack size, prevents silent crash in timer callbacks
  • Batch delete TWDT — WDT feed in delete loop, fixed relative vs absolute path comparison
  • Zero-byte file accumulation — cleanup_dir_recursive checks st_size==0, safety net at boot and segment rotation
  • Device stable past 240s uptime — was 30-60s TWDT resets
  • RTSP removed from codebase — replaced by ONVIF HTTP MJPEG; all RTSP server code and documentation removed

Documentation

  • Complete ONVIF discovery guide with flowcharts and FAQ (en+zh)
  • Port separation architecture design note (en+zh)
  • Architecture diagram updated (remove RTSP, add ONVIF/frame_broadcaster, update partition table)
  • User guide updated (remove RTSP, fix timelapse range, update port 81 references)
  • API docs updated (remove RTSP, add ONVIF endpoints)
  • Troubleshooting guide updated with ONVIF discovery FAQ
  • MiBeeNVR recommended as companion NVR software

Packaging

  • Full flash assets: bootloader, partition-table, mibee_cam, ota_data_initial, spiffs
  • Complete flash_command.txt with all partitions + app-only upgrade command

Full Changelog: v0.2.0...v0.3.0

v0.2.0

05 Jun 15:33

Choose a tag to compare

MiBeeHomeCam v0.2.0

新增功能

  • 智能延时摄影:3 种模式 — 定时间隔拍摄、运动触发录制(灵敏度可调)、混合模式
  • 运动检测模块:基于 JPEG 解码 + 帧差分析,灵敏度 1-5 级可调,检测到运动自动开始录制
  • RTSP 实时视频流:554 端口提供 MJPEG-over-RTP,VLC 兼容,最多 2 客户端同时连接
  • OTA 固件更新:分区表重构支持双 OTA 插槽(ota_0 + ota_1),Web 界面一键升级
  • Webhook 告警通知:录制完成 / 运动检测触发时向指定 URL 推送 HTTP POST
  • WebSocket 实时状态推送:浏览器端实时显示录制状态、运动检测结果、存储空间变化
  • Prometheus 指标扩展/metrics 端点提供 15 项系统指标(堆内存、PSRAM、温度、录制统计等)
  • 首次配置向导页面:新设备开箱引导,设置 WiFi、密码、NAS 等
  • 批量文件操作 API/api/files/batch 支持多文件批量删除
  • Web UI 功能完善:6 个页面全面更新 — 仪表盘优化、配置页延时/运动/Webhook 控件、OTA 页面、首次配置页
  • SD 卡配置覆盖:开机自动读取 /sdcard/config/wifi.txtnas.txt(KEY=VALUE 格式),覆盖 NVS 配置
  • 结构化 JSON 日志:统一 API 错误响应格式 {"ok":false,"error":"..."}
  • 智能丢帧策略:内存压力下自动丢帧保活,防止 OOM 崩溃
  • 上传队列持久化:NAS 上传任务队列断电恢复,不丢失待传文件

关键修复

  • 🔴 修复流媒体断流问题:摄像头帧缓存(fb)在录制期间被长时间占用导致 MJPEG 流断连。现改为将 JPEG 数据拷贝到 PSRAM 堆后立即归还 fb,流和录制互不干扰
  • 🔴 修复大量 0 字节视频文件:录制因丢帧等原因未写入任何帧时产生空 AVI 文件。close_segment() 现在自动删除 frame_count==0 的文件
  • 🔴 修复录制停止后下载崩溃:录制运行 30 秒以上后 DRAM 堆内存被破坏,fopen() 直接崩溃。改为使用 POSIX open()/read() 将文件整体读入 PSRAM 缓冲区再发送(~130 KB/s),完全绕过损坏的 DRAM 堆
  • 🔴 修复延时模式下全部丢帧:运动检测增加 ~500ms 处理时间,旧 500ms 丢帧阈值导致所有帧被丢弃。动态调整为 2000ms(运动检测模式)
  • 修复看门狗超时重启:长时间 vTaskDelay 无法喂狗导致 TWDT 超时 panic。改为 5 秒分段延时 + 每段喂狗
  • 修复 SD 卡满时崩溃:存储空间不足时未优雅处理,现自动清理最老文件(低于 20% 时触发,30% 时停止清理)
  • 修复 Web UI 多处 JS/HTML 错误:files.html 解析错误、配置页保存按钮被底部导航遮挡、认证不一致等问题
  • 修复 ESP-IDF v6.0 API 兼容性esp_vfs_fat_sdmmc_unmountesp_vfs_fat_sdcard_unmountconfig.timeout_sec 拆分、移除 HTTPD_503 等多项 API 变更适配
  • 修复内存泄漏和线程安全:Patch 多处内存泄漏、添加 mutex 保护共享状态
  • 修复安全漏洞:XSS 防护、路径遍历攻击防御(.. 检查)、API 响应统一

已知问题

  • DRAM 堆内存损坏(根本原因未明):录制 30 秒以上后 DRAM 堆元数据损坏,影响所有后续 fopen()/malloc() 调用。PSRAM 不受影响。当前通过 PSRAM 缓冲下载规避,根本原因仍在排查中
  • 下载需停止录制:为安全起见,录制期间下载返回 409 Conflict
  • SHA256 文件校验已禁用:录制后重新打开文件会触发堆损坏崩溃

硬件要求

  • XIAO ESP32-S3 Sense 开发板(OV2640/OV3660 摄像头 + MicroSD 卡槽)
  • MicroSD 卡(FAT32 格式)
  • ESP-IDF v6.0 或 v6.0.1

烧录方法

idf.py -p COM8 flash

首次烧录或更换 IDF 版本后需先 idf.py erase-flash,然后 idf.py -p COM8 flash


Full Changelog: v0.1.0...v0.2.0

v0.1.0

28 Apr 04:49

Choose a tag to compare