OneNet__网络助手模拟设备自动注册创建与删除
如何在OneNet自动注册创建设备?『OneNET设备云平台』云平台对接服务_智能设备 (10086.cn)
//183.230.40.33",80 HTTP协议接入OneNet
1. 注册设备:需要注册码和MAC或SN(2选1)用于鉴权,就是设备新增中的auth_info
POST http://api.heclouds.com/register_de?register_code=wHk******08qU HTTP/1.1
Host: api.heclouds.com
Content-Length:43
{"sn":"double12345","title":"AutoRegister"}
2. 更新设备注册属性,是否允许重复提交相同的设备sn, 默认true,api-key必须为masterkey
PUT /register_attr HTTP/1.1
api-key:Fc6q9wvF*******qivt1W4=
Host:api.heclouds.com
Content-Length:19
{"allow_dup": true} //重复注册设备
3.删除设备
DELETE http://api.heclouds.com/devices/762513341 HTTP/1.1
api-key:Fc6q9wvF*******qivt1W4=
Host:api.heclouds.com
看一下OneNet页面效果: