HTTP Device Access
About 3 min
Overview
This page is the English counterpart of the Chinese HTTP Device Access guide. It summarizes device access protocol configuration and integration verification while keeping the document path aligned with the Chinese documentation structure.
How To Use This Page
- Follow the same operation order as the Chinese source page.
- Keep configuration values, topic names, ports, commands, and file paths consistent with your deployment environment.
- Screenshots and diagrams reuse the Chinese documentation image directory so assets are maintained in one place.
- For production changes, validate the operation in a test environment before applying it online.
Reference Commands And Configuration
The following snippets are preserved from the source guide because commands, configuration keys, and protocol examples should remain exact.
Digest: 说明是摘要认证
qop: =auth时说明需要认证,=auth-int时需要有完整性保护的认证,其他值忽略。(可选)
realm: 当前响应所在的域,根据域就知道该使用哪个用户名密码了,一般包含执行认证功能的主机名。
nonce: 服务器生成的随机字符串,用于加密使用,一般是Base64或十六进制数据,Get请求conce包含过期时间,Put或Post要求使用一次性nonce。
stale: 为true时说明nonce失效了,需要重新获取,为false是说明nonce仍然有效。
a1gorithm: 说明算法,没有该值时默认使用MD5算法1. 以格式 user:realm:password 进行MD5加密得到值 a1,如 fastbee:http-auth@fastbee.com:fastbee
2. 以格式 method:uri 进行MD5加密得到值 a2,如 post:/
3. 以格式 a1:nonce:nc:cnonce:qop:a2 进行MD5加密得到 response,如:a1:326435383a37323966343563663a3c2f55408da812d8509c09bb0574faff:00000001:0a4f113b:auth:a2Digest username="fastbee", realm="http-auth@fastbee.com",
nonce="353761313a62373364373163373a94eac188bbb9a6119d58f125dfad1c7a", uri="/",algorithm="MD5",
qop=auth,nc=1,cnonce="177783ecbdc88e14",response="c3a1lcf18elebc5f3b237dd4664169262" # 描述:1.设备上电后发布设备信息; 2.设备接收到设备信息指令后发布设备信息
# productId 产品ID
# serialNumber 设备编号
# rssi 设备信号(信号极好[-55— 0],信号好[-70— -55],信号一般[-85— -70],信号差[-100— -85])
# status 设备状态,固定为3,表示在线
# firmwareVersion 固件版本
# userId 用户的ID,可设置为用户ID为1(管理员),配网时会分配设备给具体的用户。
# longitude 可选,经度,使用设备定位时需要上传
# latitude 可选,纬度,使用设备定位时需要上传
# summary 可选,摘要,设备的配置信息等,json格式,对象可自定义
{
"productId": 145,
"serialNumber": "D1M267SH21TM",
"rssi": -43,
"firmwareVersion": 1.2,
"status": 3,
"userId": 2,
"longitude": 0,
"latitude": 0,
"summary": {
"name": "FastBee",
"chip": "ESP8266",
"author": "kerwincui",
"deliveryTime": "2023-06-06",
"activeTime": "2022-10-01"
}
} # 描述:属性、功能、事件都属于物模型,Json定义是一样的。`value` 的值如果是布尔类型,值为"0"或者"1",代表打开/关闭;枚举类型对应枚举项的键值(例如 "1",代表中速档位);数组类型是以英文逗号分隔的字符串。
# id 标识符,产品详情中查看物模型,对应物模型的标识符
# value 值,对应物模型中定义,以字符串类型传递
# remark 可以直接使用订阅到的备注信息,设备日志信息中查看到该备注
[{
"id": "gear",
"value": "1",
"remark": "档位设置成功"
}, {
"id": "switch",
"value": "0",
"remark": "开关已关闭"
}]Shared Screenshots
The English documentation reuses the screenshots from the Chinese source page. UI labels in screenshots may remain Chinese.








