检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
设备联动 概述 设备联动指通过条件触发,基于预设的规则,引发多设备的协同反应,实现设备联动、智能控制。例如:设置水表的电池电量阈值为小于等于20%时,上报电池电量过低的告警,用户就能及时了解设备的供电情况,以便及时更换电池。 图1 设备联动架构图 若您想要进一步体验设备联动功能,可参考设备触发告警并邮件或短信通知
__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks.
__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks.
are hard-coded or stored in plaintext, which has great security risks.
are hard-coded or stored in plaintext, which has great security risks.
daily_timer_condition 否 DailyTimerType object 参数说明:条件中每日定时类型的信息,当type为DAILY_TIMER时,为必选参数。
authorizingDomainId String 备选接入点的接入点授权租户,仅在授权场景下使用。 表6 AuthInfoPara 名称 类型 说明 authType String 认证类型。可选 SECRET 和 CERTIFICATES。
are hard-coded or stored in plaintext, which has great security risks.
are hard-coded or stored in plaintext, which has great security risks.
daily_timer_condition DailyTimerType object 参数说明:条件中每日定时类型的信息,当type为DAILY_TIMER时,为必选参数。
are hard-coded or stored in plaintext, which has great security risks.
SUCCESSFUL/FAILED。
// The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks.
are hard-coded or stored in plaintext, which has great security risks.
项目结构说明 项目结构说明 图1 项目结构图 表1 类相关说明 类名称 描述 Main 主启动类。 BridgeService 网桥初始化:初始化同IoT平台的连接,设置平台下行数据监听 TcpServer TCP协议服务端启动类。
Operation CoAP Method URI Success Failure Notify Asynchronous Response 不涉及 2.05 Content with {value} 不涉及 设备通过LwM2M协议上报的数据都是二进制报文数据,一般都需要通过编解码插件进行解析
are hard-coded or stored in plaintext, which has great security risks.
or stored in plaintext, which has great security risks.
Session session; static ReceiverLink receiverLink; static DateTime lastConnectTime = DateTime.Now; static void Main
图6 新建联动规则-BatteryProperty 表4 创建联动规则参数填写说明 参数名称 说明 规则名称 自定义,例如“Battery_Low_Mail”或“Battery_Low_SMS”。 激活规则 勾选“激活规则” 生效时间 选择“一直生效”。