update: delete quechting docs.

This commit is contained in:
JackSun 2023-04-10 19:03:52 +08:00
parent 15e27edbaf
commit 318c31ad62
7 changed files with 8 additions and 2506 deletions

View File

@ -1,354 +0,0 @@
{
"properties": [
{
"identifier": "GeoLocation",
"dataType": {
"type": "struct",
"specs": [
{
"identifier": "Longitude",
"dataType": {
"type": "double"
}
},
{
"identifier": "Latitude",
"dataType": {
"type": "double"
}
},
{
"identifier": "Altitude",
"dataType": {
"type": "double"
}
},
{
"identifier": "CoordinateSystem",
"dataType": {
"type": "enum"
}
}
]
}
},
{
"identifier": "power_switch",
"dataType": {
"type": "bool"
}
},
{
"identifier": "energy",
"dataType": {
"type": "int"
}
},
{
"identifier": "phone_num",
"dataType": {
"type": "text"
}
},
{
"identifier": "loc_method",
"dataType": {
"type": "struct",
"specs": [
{
"identifier": "gps",
"dataType": {
"type": "bool"
}
},
{
"identifier": "cell",
"dataType": {
"type": "bool"
}
},
{
"identifier": "wifi",
"dataType": {
"type": "bool"
}
}
]
}
},
{
"identifier": "work_mode",
"dataType": {
"type": "enum"
}
},
{
"identifier": "work_cycle_period",
"dataType": {
"type": "int"
}
},
{
"identifier": "local_time",
"dataType": {
"type": "date"
}
},
{
"identifier": "low_power_alert_threshold",
"dataType": {
"type": "int"
}
},
{
"identifier": "low_power_shutdown_threshold",
"dataType": {
"type": "int"
}
},
{
"identifier": "sw_ota",
"dataType": {
"type": "bool"
}
},
{
"identifier": "sw_ota_auto_upgrade",
"dataType": {
"type": "bool"
}
},
{
"identifier": "sw_voice_listen",
"dataType": {
"type": "bool"
}
},
{
"identifier": "sw_voice_record",
"dataType": {
"type": "bool"
}
},
{
"identifier": "sw_fault_alert",
"dataType": {
"type": "bool"
}
},
{
"identifier": "sw_low_power_alert",
"dataType": {
"type": "bool"
}
},
{
"identifier": "sw_over_speed_alert",
"dataType": {
"type": "bool"
}
},
{
"identifier": "sw_sim_abnormal_alert",
"dataType": {
"type": "bool"
}
},
{
"identifier": "sw_disassemble_alert",
"dataType": {
"type": "bool"
}
},
{
"identifier": "sw_drive_behavior_alert",
"dataType": {
"type": "bool"
}
},
{
"identifier": "drive_behavior_code",
"dataType": {
"type": "enum"
}
},
{
"identifier": "power_restart",
"dataType": {
"type": "enum"
}
},
{
"identifier": "over_speed_threshold",
"dataType": {
"type": "int"
}
},
{
"identifier": "device_module_status",
"dataType": {
"type": "struct",
"specs": [
{
"identifier": "net",
"dataType": {
"type": "enum"
}
},
{
"identifier": "location",
"dataType": {
"type": "enum"
}
},
{
"identifier": "temp_sensor",
"dataType": {
"type": "enum"
}
},
{
"identifier": "light_sensor",
"dataType": {
"type": "enum"
}
},
{
"identifier": "move_sensor",
"dataType": {
"type": "enum"
}
},
{
"identifier": "mike",
"dataType": {
"type": "enum"
}
}
]
}
},
{
"identifier": "gps_mode",
"dataType": {
"type": "enum"
}
},
{
"identifier": "user_ota_action",
"dataType": {
"type": "enum"
}
},
{
"identifier": "ota_status",
"dataType": {
"type": "struct",
"specs": [
{
"identifier": "sys_current_version",
"dataType": {
"type": "text"
}
},
{
"identifier": "sys_target_version",
"dataType": {
"type": "text"
}
},
{
"identifier": "app_current_version",
"dataType": {
"type": "text"
}
},
{
"identifier": "app_target_version",
"dataType": {
"type": "text"
}
},
{
"identifier": "upgrade_module",
"dataType": {
"type": "enum"
}
},
{
"identifier": "upgrade_status",
"dataType": {
"type": "enum"
}
}
]
}
},
{
"identifier": "voltage",
"dataType": {
"type": "int"
}
},
{
"identifier": "current_speed",
"dataType": {
"type": "float"
}
},
{
"identifier": "work_mode_timeline",
"dataType": {
"type": "int"
}
},
{
"identifier": "loc_gps_read_timeout",
"dataType": {
"type": "int"
}
},
{
"identifier": "temperature",
"dataType": {
"type": "double"
}
},
{
"identifier": "humidity",
"dataType": {
"type": "double"
}
}
],
"events": [
{
"identifier": "sos_alert",
"type": "alert"
},
{
"identifier": "fault_alert",
"type": "error"
},
{
"identifier": "low_power_alert",
"type": "alert"
},
{
"identifier": "sim_abnormal_alert",
"type": "alert"
},
{
"identifier": "drive_behavior_alert",
"type": "alert"
},
{
"identifier": "disassemble_alert",
"type": "alert"
},
{
"identifier": "over_speed_alert",
"type": "alert"
}
]
}

@ -1 +1 @@
Subproject commit 6cbaed9ea93bf5de4807d8f242d3683ec4b3e248
Subproject commit 118d052324b7eb42b83d64229224772f7932cc47

File diff suppressed because it is too large Load Diff

View File

@ -149,8 +149,6 @@
| Battery | 电池模块,获取电池电量与电压 |
| LowEnergyManage | 低功耗唤醒模块,用于设置不同级别的低功耗模型,定时唤醒模块进行业务工作。 |
| Location | 定位模块可获取GPS基站WIFI三种定位方式的定位信息。 |
| QuecThing | 移远云模块主要用于与云端的消息交互与OTA升级 |
| QuecObjectModel | 移远云物模型抽象类将移远云导出的物模型json格式抽象为一个类进行功能使用 |
| AliYunIot | 阿里云模块主要用于与云端的消息交互与OTA升级 |
| AliObjectModel | 阿里云物模型抽象类将阿里云导出的精简物模型json格式抽象为一个类进行功能使用 |
| RemotePublish | 云端消息发布类用于兼容不同云的消息发布与OTA升级检测与确认 |

View File

@ -7,7 +7,7 @@
## 内置功能模块
- [x] 阿里云(aliyunIot): 提供阿里云物联网物模型的消息发布与订阅OTA升级功能。
- [x] 移远云(quecthing): 提供移远云物联网物模型的消息发布与订阅OTA升级功能。
- [x] ThingsBoard(thingsboard): 提供ThingsBoard平台物联网物模型的消息发布与订阅OTA升级功能。
- [x] 电池模块(battery): 提供设电池电量,电压数据查询,充电状态查询功能。
- [x] LED模块(led): 提供LED开关控制功能周期性闪烁功能。
- [x] 定位模块(location): 提供内置/外置GPS基站WIFI定位查询功能。
@ -23,19 +23,11 @@
|--code
|--aliyun_object_model.json
|--main.py
|--quec_object_model.json
|--settings.py
|--settings_alicloud.py
|--settings_jtt808.py
|--settings_cloud.py
|--settings_loc.py
|--settings_queccloud.py
|--settings_sys.py
|--settings_user.py
|--test_tracker.py
|--tracker.py
|--tracker_collector.py
|--tracker_controller.py
|--tracker_devicecheck.py
|--tracker_tb.py
|--modules
|--aliyunIot.py
|--battery.py
@ -45,10 +37,10 @@
|--location.py
|--logging.py
|--mpower.py
|--quecthing.py
|--remote.py
|--temp_humidity_sensor.py
|--sensor.py
|--thingsboard.py
```
## 项目配置
@ -87,25 +79,6 @@
![](./media/aliyun_export_lite_mode_object_model.png)
#### 移远云
1. [创建产品与设备](https://iot-cloud-docs.quectelcn.com/quickStart/ProductDevelop.html)
![](./media/quec_create_project.png)
![](./media/quec_create_device.png)
2. [为产品定义物模型](https://iot-cloud-docs.quectelcn.com/quickStart/ProductDevelop.html)
![](./media/quec_create_object_model.png)
3. 项目提供了[物模型demo](https://gitee.com/qpy-solutions/tracker-v2/blob/dev/object_model_demo/quec_cloud_object_model.json), 可直接导入生成,无需手动创建
![](./media/quec_import_object_model.png)
4. 导出JSON格式的物模型, 重命名后, 放入项目根目录`code`下, 建议命名`quec_object_model.json`
![](./media/quec_export_object_model.png)
### 设置项目配置参数
#### 项目基础配置(settings_sys)
@ -135,17 +108,6 @@ life_time = 120 # 通信之间允许的最长时间段(以秒为单位), 范围
burning_method = _burning_method.one_machine_one_secret # 一机一密,一型一密
```
#### 移远云配置(settings_queccloud)
```python
PK = "{ProductKey}" # 产品KEY
PS = "{ProductSecret}" # 产品密钥
DK = "{DeviceKey}" # 设备名称
DS = "{DeviceSecret}" # 设备密钥
SERVER = "iot-south.quectel.com:1883" # 连接的服务器名称
life_time = 120 # 通信之间允许的最长时间段(以秒为单位), 范围(60-1200)
```
#### 定位功能配置(settings_loc)
```python
@ -328,62 +290,6 @@ ota_status = {
![](./media/aliyun_ota_sota_upgrade_process.png)
### 移远云
> **项目文件升级包,建议以压缩包的形式打包多个项目文件上传云端**
#### 固件升级
1. 制作固件升级差分包(联系固件开发人员);
2. 创建OTA升级模型添加固件组件MCU组件(用于项目升级)
+ 固件类型的组件标识以设备平台名称命名,如: `EC600N-CNLC`.
+ MCU类型的组件标识以`settings.py``PROJECT_NAME`命名,如: `QuecPython-Tracker`.
![](./media/quec_ota_model.png)
3. 创建固件版本升级包
![](./media/quec_ota_fota_version_package.png)
4. 创建固件升级计划
![](./media/quec_ota_fota_plain.png)
5. 等待设备升级,查看升级结果
+ 当设备开启OTA升级和OTA自动升级则等待设备升级完成查看升级结果;
+ 当设备开启OTA升级但未开启自动升级时可通过在线调试模块下发`user_ota_action=1`的物模型设置指令进行OTA升级。
![](./media/quec_ota_fota_upgrade_process.png)
#### 项目升级
1. 将项目文件打包成压缩包,打包指令: `tar -zcvf sotaFile.tar.gz *.py`;
2. 创建OTA升级模型添加固件组件MCU组件(用于项目升级)
+ 固件类型的组件标识以设备平台名称命名,如: `EC600N-CNLC`.
+ MCU类型的组件标识以`settings.py``PROJECT_NAME`命名,如: `QuecPython-Tracker`.
![](./media/quec_ota_model.png)
3. 如果在创建OTA模型时未创建MCU组件可在模型中添加组件
![](./media/quec_ota_model_add_mcu_module.png)
4. 创建项目版本升级包
![](./media/quec_ota_sota_version_package.png)
4. 创建项目升级计划
![](./media/quec_ota_sota_plain.png)
5. 等待设备升级,查看升级结果
+ 当设备开启OTA升级和OTA自动升级则等待设备升级完成查看升级结果;
+ 当设备开启OTA升级但未开启自动升级时可通过在线调试模块下发`user_ota_action=1`的物模型设置指令进行OTA升级。
![](./media/quec_ota_sota_upgrade_process.png)
## 功能模块注册流程
### 功能注册说明流程图
@ -417,20 +323,7 @@ devicecheck.add_module(sensor)
### 云模块初始化 ###
cloud_init_params = current_settings["cloud"]
if current_settings["sys"]["cloud"] & SYSConfig._cloud.quecIot:
cloud = QuecThing(
cloud_init_params["PK"],
cloud_init_params["PS"],
cloud_init_params["DK"],
cloud_init_params["DS"],
cloud_init_params["SERVER"],
mcu_name=PROJECT_NAME,
mcu_version=PROJECT_VERSION
)
# Cloud object model init
cloud_om = QuecObjectModel()
cloud.set_object_model(cloud_om)
elif current_settings["sys"]["cloud"] & SYSConfig._cloud.AliYun:
if current_settings["sys"]["cloud"] & SYSConfig._cloud.AliYun:
client_id = cloud_init_params["client_id"] if cloud_init_params.get("client_id") else modem.getDevImei()
cloud = AliYunIot(
cloud_init_params["PK"],
@ -596,22 +489,7 @@ locator = Location(current_settings["LocConfig"]["gps_mode"], current_settings["
### 云模块初始化 ###
cloud_init_params = current_settings["cloud"]
if current_settings["sys"]["cloud"] & SYSConfig._cloud.quecIot:
# 初始化移远云服务模块
cloud = QuecThing(
cloud_init_params["PK"],
cloud_init_params["PS"],
cloud_init_params["DK"],
cloud_init_params["DS"],
cloud_init_params["SERVER"],
mcu_name=PROJECT_NAME,
mcu_version=PROJECT_VERSION
)
# 转化物模型json为对象
cloud_om = QuecObjectModel()
# 将物模型实例对象注册到云服务对象中
cloud.set_object_model(cloud_om)
elif current_settings["sys"]["cloud"] & SYSConfig._cloud.AliYun:
if current_settings["sys"]["cloud"] & SYSConfig._cloud.AliYun:
client_id = cloud_init_params["client_id"] if cloud_init_params.get("client_id") else modem.getDevImei()
# 初始化阿里云服务模块
cloud = AliYunIot(

File diff suppressed because it is too large Load Diff

View File

@ -48,7 +48,7 @@
### 产品能力
- **通道支持移远云、阿里云、腾讯云多种云平台(目前暂只支持移远云,其他平台正在开发中)**
- **通道支持阿里云、腾讯云、ThingsBoard等多种云平台(目前暂只支持ThingsBoard,其他平台正在开发中)**
- **支持本地和远程参数配置**
- **支持OTA升级**
- **支持数据离线存储**