检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
加属性”,填写相关信息后,单击“确定”。 “属性名称”:dailyActivityTime “数据类型”:int(整型) “访问权限”:可读 “取值范围”:0~65535 “步长”:1 “单位”:s 图5 新增属性-dailyActivityTime 新增服务类型“Battery”。
( pack.ag/amqp v0.12.5 // 本示例使用v0.12.5,根据实际需要选择版本 ) 代码示例 package main import ( "context" "crypto/tls" "fmt" "pack.ag/amqp" "time" )
选择左侧导航栏的“产品”,在搜索框中选择新建产品所属的资源空间。 单击左侧的“创建产品”,创建恒温空调产品,填写参数后,单击“确定”。 基本信息 产品名称 自定义,如aircondition 协议类型 选择“MQTT” 数据格式 选择“JSON” 所属行业 自定义 设备类型 产品创建成功后,单击对应的产品进入产品详情页面。
"paras": { "areaIds": [ 1 ] } } 请求参数 paras字段同协议中消息的映射关系 表23 参数描述 字段名 类型 协议字段 参数描述 areaIds stringList 区域ID列表 /
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
参数说明:条件中简单定时类型的信息,当type为SIMPLE_TIMER时,为必选参数。 daily_timer_condition 否 DailyTimerType object 参数说明:条件中每日定时类型的信息,当type为DAILY_TIMER时,为必选参数。 device_linkage_status_condition
regionId String 备选接入点的区域ID。 accessPointId String 备选接入点的接入点ID。 authorizingDomainId String 备选接入点的接入点授权租户,仅在授权场景下使用。 表6 AuthInfoPara 名称 类型 说明 authType
参数说明:条件中简单定时类型的信息,当type为SIMPLE_TIMER时,为必选参数。 daily_timer_condition DailyTimerType object 参数说明:条件中每日定时类型的信息,当type为DAILY_TIMER时,为必选参数。 device_linkage_status_condition
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
public void onFailure(Object context, Throwable var2) { log.warn("device={} reportProperties failed: {}", deviceId, var2
设备向物联网平台上报数据,设备携带物联网平台下发/19/0/0订阅时的token进行属性上报。 Operation CoAP Method URI Success Failure Notify Asynchronous Response 不涉及 2.05 Content with {value} 不涉及 设
必选/可选 类型 参数描述 successful_devices 必选 List<DeviceInfo> 参数解释: 成功新增的子设备列表详情。 failed_devices 必选 List<Reason> 参数解释: 新增子设备失败的原因。 DeviceInfo定义表 字段名 必选/可选
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great