代码参考sdk写法
GizDeviceSchedulerCenter.setListener(mListener);
GizDeviceScheduler scheduler = new GizDeviceScheduler();
scheduler.setDate("2018-06-22");
scheduler.setTime("06:30");
scheduler.setRemark("开灯任务111");
ConcurrentHashMap<String, Object> attrs = new ConcurrentHashMap<String, Object>();
attrs.put("onoff_1", true);
scheduler.setAttrs(attrs);
GizDeviceSchedulerCenter.createScheduler(uid, token, device, scheduler);
GizDeviceSchedulerCenterListener回调的didUpdateSchedulers中提示resul=GIZ_SDK_PARAM_INVALIDuid和token用4.2. 设备发现的接口调试是没问题的,我直接用6.3. 获取定时任务列表的接口只传uid和token及device也是同样的错误onoff_1数据点已经定义好,且调试接口控制功能是没问题的,网页管理平台数据也更新到了,用的虚拟设备调试的uid,token,device,scheduler及回调的打印如下
onClick: uid=96cb7f7e4c734635a5b63bac3abb1fe0token=f51f31a6f08743f5837b02f1510445d9,device=GizWifiDevice [macAddress=VIRTUAL:SITE, did=j9N5vb9tjxbLGkMVxnxKeS, isLAN=false, netStatus=GizDeviceControlled, productType=GizDeviceNormal, productKey=83700e7a82f84e0c9b4de61988f70d23, productName=relay, isBind=true, alias=],scheduler=GizSchedulerInfo [ createdDateTime=null, date=2018-06-22, time=06:30, remark=开灯任务111, startDate=null, endDate=null, enabled=true, weekdays=null, monthDays=null]
didUpdateSchedulers: resul=GIZ_SDK_PARAM_INVALID,result.getResult()=8006,result.name()=GIZ_SDK_PARAM_INVALID,schedulerOwner=null,schedulerList=[],schedulerList.size=0
|