2.0.12 • Published 5 years ago

cricetulu v2.0.12

Weekly downloads
84
License
ISC
Repository
-
Last release
5 years ago

设备管理客户端

功能

  • 音箱刷机(暂时支持 naboo、Rokid-me(yodaos))
  • 状态上报(NOAMAL、RECOERVERING、FAILED、OFFLINE)
  • 音箱监控工具启动/停止

环境要求

  • 运行环境:mac 或 linux
  • 软件环境: node adb
  • 网络环境: 公司内网

npm库 使用说明

###  安装
- $ npm install cricetulu -g

### 配置(只需要一次)
- $ cricetulu config --ftpAccount xxx --ftpPassword xxx
- $ cricetulu config --wifiAccount xxx --wifiPassword xxx
- $ cricetulu config --show

### 日常使用(pc 任意地方)
- cricetulu

git库 使用说明

### 安装
- $ git clone git@gitlab.rokid-inc.com:Rokid-QA/marmot.git
- $ cd marmot

### 必要配置
- $ ./cricetulu config --ftpAccount xxx --ftpPassword xxx
- $ ./cricetulu config --wifiAccount xxx --wifiPassword xxx
- $ ./cricetulu config --show

### 依赖模块安装
- $ npm install

### 工程目录下执行
- $ ./cricetulu

### 更新监控工具
- npm run flush (工具自动会执行此命令, 写出来只是说明一下)

### 忽略指定设备(通用)
- config/config.json deviceIDList 字段中, 填写指定的设备

作者

  • chengwen.fan

其他

config/config.json 字段介绍

  • releaseEnv true代表线上环境, false代表测试环境
  • recovery 字段中,可以添加新类型的设备

和服务端交互协议

代码思路图

npm.io

设备在dispatch中上线逻辑

  1. 物理设备上线
  2. 不是被被忽略的设备
  3. sleep 1
  4. 获取产品类型成功
  5. sleep 0.5
  6. dispatch中上线

特定模块描述

  • deviceTrack.js 设备连接延迟500ms
  • cloudLog.js 日志连接延迟5000ms

约定

  • 消息发送都传递字符串(由于 redis 使用字符串传递, 统一会方便些)

调试

  • lib/log-origin.js 中可调整日志输出等级
  • debug 为单个模块信息
  • info 为 dispatch 调度信息
  • warn 为 与云端交互信息

monitor 存活周期

  • 刷机开始 结束监控(本地执行)
  • 刷机成功 拉起监控(云端执行)

已知问题

  • 刷机失败后重新插上, 状态变normal
  • 电脑关机,云端状态不会更新

添加新设备需要注意的问题

  • 监控工具地址修改
  • ps 类似的命令确认是否可以使用
2.0.12

5 years ago

2.0.11

5 years ago

2.0.10

5 years ago

2.0.9

5 years ago

2.0.8

5 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago