Commit Graph

13 Commits

Author SHA1 Message Date
831412f063 config: enable auto_pull and set gateway URL/token in edge.yaml 2026-05-09 11:19:05 +08:00
6ff71fded0 feat: implement token-based auto stream pulling 2026-05-09 11:03:27 +08:00
966ef512ab feat: add stream_enabled config to control ffmpeg pulling and optimize infer startup script 2026-05-09 09:48:43 +08:00
97a77d4745 fix: 修复6个边缘侧问题 + 单元测试
1. 删除 ConfigAgent (与 MQTT 配置更新重叠且未启用)
2. OTA 完整安装流程: 解压tar.gz -> 校验ELF -> 替换二进制 -> systemctl重启
3. StreamManager stopAll 添加 Wait() 防止僵尸进程
4. InferClient socket 读写添加 timeout 防止永久阻塞
5. Heartbeat 集成 NPU 监控 (npu-smi + fallback 脚本)
6. 配置更新时动态重启 ffmpeg 以应用新 fps
2026-05-08 23:58:08 +08:00
88b2e71a77 fix(event): add 401 handling to prevent infinite retry loop on auth failure
- UploadError struct to distinguish fatal auth errors from network errors
- Clear buffer and throttle on 401/403 to save bandwidth
- Prevent dead-loop retry when token is invalid or expired
2026-05-08 21:00:14 +08:00
78427b2e33 docs: add deployment guide for edge agent
- Prerequisites (hardware, software, versions)
- Step-by-step deployment instructions
- Configuration examples
- Troubleshooting table
- OTA update workflow
2026-05-08 17:12:36 +08:00
b4572022dc fix: update edge-agent.service with correct paths, env vars, and logging
- Change After dependency to telegraf.service
- Add LD_LIBRARY_PATH for Ascend CANN libraries
- Fix ExecStart path (bin/ -> /opt/tianyan-edge/)
- Change Restart to on-failure with rate limiting
- Add journal logging with SyslogIdentifier
2026-05-08 17:10:13 +08:00
9a7cd7702f fix: update systemd service config and edge.yaml with runtime settings
- Add LD_LIBRARY_PATH and proper env vars to edge-agent.service
- Add device UUID and RTSP URL to edge.yaml
- Update infer_fps (5->2) and conf_threshold (0.5->0.2)
- Add journal logging configuration
2026-05-08 17:09:26 +08:00
6e88d2392f feat: add dynamic config reload, unique device identity (UUID), and MQTT support
- New StreamManager for dynamic RTSP/FLV stream lifecycle
- Dynamic worker scaling for inference
- Device UUID generation and persistence
- Telegraf config and NPU monitoring scripts
- .gitignore for build artifacts
2026-05-08 16:26:10 +08:00
2e7245d62e feat: 边缘侧服务代码初始化与配置同步准备 2026-05-08 11:33:43 +08:00
ee9be85292 fix: ACL bytes_to_ptr GC bug + 添加 NPU 模型转换指南
python/infer_server.py:
- 修复 acl.util.bytes_to_ptr() 后 bytes 被 GC 回收导致全零输出的 bug
- 保持 bytes 引用直到 memcpy 完成
- 正确解析 FP16 模型输出 (half precision -> float32)

docs/CONVERSION_GUIDE.md:
- 完整的 YOLOv8 ONNX->OM 转换流程文档
- ATC 转换参数详解及低内存设备配置
- 已知问题排查表 (OOM/全零输出/算子不支持)
- 其他 YOLOv8 尺寸模型参考

start.sh: 一键启动脚本
2026-05-06 23:30:49 +08:00
c69d9b1457 feat: add YOLOv8n ONNX model and ATC conversion script
- yolov8n.onnx (13MB) exported from ultralytics YOLOv8n
- scripts/atc_convert.sh for ONNX->OM conversion on Ascend 310B4
- Use FP16 precision for faster inference on edge device
2026-05-06 22:49:13 +08:00
f6a85d7dfc init: tianyan-edge edge agent with Ascend NPU inference backend
- Go main process: stream ingestor, infer client, event uploader,
  heartbeat, config agent, OTA agent
- Python inference server rewritten to use CANN ACL (acl module)
  replacing ultralytics/PyTorch; supports YOLOv8 raw and YOLOv10
  NMS-free output formats via OUTPUT_FORMAT env var
- systemd services for edge-agent and edge-infer
- build/install/package scripts targeting arm64

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-05-06 21:49:04 +08:00