用getDeviceInfo查询子设备信息的时候dpcodes的数据有滞后

小程序开发相关产品技术讨论,包括面板、智能小程序、React Native、Ray跨端框架、Panel SDK、微信小程序、小程序开发工具(IDE)及其他开发技术相关等话题


Post Reply
laizj@venztech.com
Posts: 42

  • 问题描述:用getDeviceInfo查询子设备信息的时候dpcodes的数据有滞后
crisiron
Posts: 153

Re: 用getDeviceInfo查询子设备信息的时候dpcodes的数据有滞后

获取最新的dp状态不要使用 dpCodes , 使用 https://developer.tuya.com/cn/miniapp/d ... s/useProps

crisiron
Posts: 153

Re: 用getDeviceInfo查询子设备信息的时候dpcodes的数据有滞后

如果需要监测多个设备 dp 变化,使用 https://developer.tuya.com/cn/miniapp/d ... datachange

laizj@venztech.com
Posts: 42

Re: 用getDeviceInfo查询子设备信息的时候dpcodes的数据有滞后

useProps只能主设备用吧,子设备用不了吧

crisiron
Posts: 153

Re: 用getDeviceInfo查询子设备信息的时候dpcodes的数据有滞后

crisiron 2025年 Jun 10日 16:39

如果需要监测多个设备 dp 变化,使用 https://developer.tuya.com/cn/miniapp/d ... datachange

那就用这个

laizj@venztech.com
Posts: 42

Re: 用getDeviceInfo查询子设备信息的时候dpcodes的数据有滞后

用这个方法getDpsInfos能实时获取dp点

Post Reply