很早之前抓的了,我现在只有请求的代码. 是nodejs写在云主机上的.
async function requestGree(sceneId) {
operation.api.t=moment.utc().format('YYYY-MM-DD HH:mm:ss');
operation.api.vc=md5('5686063144437916735_d15cb842b7fd704ebcf8276f34cbd771_'+operation.api.t+'_'+operation.api.r);
if(sceneId){
operation.sceneId=sceneId;
}
operation.datVc=md5("d15cb842b7fd704ebcf8276f34cbd771_" + operation.token + "_" + operation.uid + "_" + operation.homeId + "_" + operation.sceneId + "_" + operation.opt);
log("请求格力:"+JSON.stringify(operation));
const result = await httpUtil.post('https://grih.gree.com/App/StartOrCancelScene',
operation
);
log("格力返回:"+JSON.stringify(result));
return result&&result.r&&result.r===200;
}
|