Page 1 of 1

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

Posted: 2025年 Jun 10日 16:25
by laizj@venztech.com
  • 问题描述:用getDeviceInfo查询子设备信息的时候dpcodes的数据有滞后

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

Posted: 2025年 Jun 10日 16:37
by crisiron

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


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

Posted: 2025年 Jun 10日 16:39
by crisiron

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


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

Posted: 2025年 Jun 10日 17:34
by laizj@venztech.com

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


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

Posted: 2025年 Jun 10日 17:38
by crisiron
crisiron 2025年 Jun 10日 16:39

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

那就用这个


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

Posted: 2025年 Jun 11日 11:07
by laizj@venztech.com

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