当前位置: 首页 > news >正文

网站seo优化教程百度搜索词排名

网站seo优化教程,百度搜索词排名,网站开发维护合同模板电子版,wordpress快捷登录阿里云物联网通信的两种方式,一个是物模型(分为服务,事件,属性),一个是自定义topic(要另外设置数据流转) 1.使用产品内的功能定义,(其实也就是Topic中定义好的…

阿里云物联网通信的两种方式,一个是物模型(分为服务,事件,属性),一个是自定义topic(要另外设置数据流转)
1.使用产品内的功能定义,(其实也就是Topic中定义好的物模型主题),功能定义中有事件,属性,服务三种类型
在这里插入图片描述
进入产品的功能定义中,选择编辑草稿
在这里插入图片描述
添加自定义功能,
在这里插入图片描述
功能类型可以按照需求选择服务(调用比如开关灯,亮度调节等),属性(显示数据等),事件,其中标识符是代码识别此功能的重要标识,另外参数一定要与代码中调用的参数数据类型一致
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
一定要发布上线才有效
在这里插入图片描述
服务colorset和属性color调用的代码不同
首先小程序控制端,如果是通过按钮调用服务,使用aliSDK中的Action: “InvokeThingService”,完整函数代码如下
//发送信息给阿里云,页面设置了一个亮度调节器(进度条),绑定以下函数,data里面x初始值x:{‘light’:12},

changeDeviceLight: function (e) {var DeviceName = this.options.deviceNamevar that = thisconsole.log(`携带值为`, e.detail.value)console.log("x",typeof that.data.x) //x为对象格式objectthat.data.x.light=e.detail.value    //将x里的数值替换成当前调节器的值var str = JSON.stringify(that.data.x);    //将对象转换成字符串,//var Obj = JSON.parse(str);    如果需要字符串转换成对象console.log("str",typeof str)        //此处可以校验是否已是字符串console.log("str",str)console.log("lightvalue",that.data.x)//防止重复点击that.setData({buttonDisabled: true})aliSdk.request({Action: "InvokeThingService",//IotInstanceId:"iot-",//实例IDProductKey: app.globalData.productKey,DeviceName: DeviceName,Identifier: "light",//Args: "{'light':51}" //传送参数时,格式为{'Identifier':数值},传入格式必须有引号,也就是对象转换成字符串格式,数值也必须符合当时阿里云内设置的数据类型,无参数的时候传空 Args:”{}“Args: str   //此处获取的亮度值会被传给阿里云}, {method: "POST"},(res) => {console.log("success")console.log(res) //查看返回response数据that.setData({openedDevice: !that.data.openedDevice})},(res) => {console.log("fail")wx.showToast({title: '网络连接失败',icon: 'none',duration: 1000,complete: () => {}})},(res) => {console.log("complete")that.setData({buttonDisabled: false})})
},

阿里云收到消息转给esp8266,arduino串口监视器显示{“method”:“thing.service.light”,“id”:“173255894”,“params”:{“light”:114},“version”:“1.0.0”}
arduino端的代码将params里的light取出来

String method =jsonBuffer["method"];int key1 = jsonBuffer["params"]["light"];Serial.println("method");Serial.println(method);Serial.println(key1);

如果是调用属性,则使用Action: “SetDeviceProperty”

radioChangeColor: function (e) {var DeviceName = this.options.deviceNamevar that = thisconsole.log(e.detail.value)//防止重复点击that.setData({buttonDisabled: true})var str1 = "{\"color\":"str1 += "\""+e.detail.value+"\""//"\""+变量+"\""可以在双引号里调用变量,而不被识别成字符串str1 += "}"console.log('str1')  console.log(str1)  //str1此时为字符串{"color":"yellow"}console.log("str1",typeof str1) aliSdk.request({Action: "SetDeviceProperty",//IotInstanceId:"iot-",//实例IDProductKey: app.globalData.productKey,DeviceName: DeviceName,Identifier: "color",Items: '{"color":"red"}'//属性调用也可使用Items:str1,将str1传给阿里云}, {method: "POST"},(res) => {console.log("success")console.log(res) //查看返回response数据that.setData({openedDevice: !that.data.openedDevice})},(res) => {console.log("fail")wx.showToast({title: '网络连接失败',icon: 'none',duration: 1000,complete: () => {}})},(res) => {console.log("complete")that.setData({buttonDisabled: false})})
},

阿里云收到消息后转给esp8266,串口监视器显示{“method”:“thing.service.colorset”,“id”:“921010594”,“params”:{“colorset”:“green”},“version”:“1.0.0”}
arduino端的代码将params里的colorset取出来

String method =jsonBuffer["method"];String key1 = jsonBuffer["params"]["colorset"];Serial.println("method");Serial.println(method);Serial.println(key1);

文章转载自:
http://dinncourostyle.tpps.cn
http://dinncocostume.tpps.cn
http://dinncobenzoin.tpps.cn
http://dinncocuish.tpps.cn
http://dinncooverturn.tpps.cn
http://dinncorefuel.tpps.cn
http://dinncoapparel.tpps.cn
http://dinncoleatherback.tpps.cn
http://dinncobemean.tpps.cn
http://dinncovilayet.tpps.cn
http://dinncocopilot.tpps.cn
http://dinncopadang.tpps.cn
http://dinncocomonomer.tpps.cn
http://dinncosupersedeas.tpps.cn
http://dinncobronzy.tpps.cn
http://dinncohorticultural.tpps.cn
http://dinnconoplaceville.tpps.cn
http://dinncosibu.tpps.cn
http://dinncoaching.tpps.cn
http://dinncobroadish.tpps.cn
http://dinncoimperceptibility.tpps.cn
http://dinncovisitator.tpps.cn
http://dinncoreproduceable.tpps.cn
http://dinncomeaningly.tpps.cn
http://dinncounrepair.tpps.cn
http://dinncounitive.tpps.cn
http://dinncoherringbone.tpps.cn
http://dinncosyllogize.tpps.cn
http://dinncoincarnadine.tpps.cn
http://dinncomargin.tpps.cn
http://dinncourethrectomy.tpps.cn
http://dinncoboldhearted.tpps.cn
http://dinncoheadlike.tpps.cn
http://dinncoideologism.tpps.cn
http://dinnconizam.tpps.cn
http://dinncothermopile.tpps.cn
http://dinncodressiness.tpps.cn
http://dinncoschizotype.tpps.cn
http://dinncocoalsack.tpps.cn
http://dinncohuffish.tpps.cn
http://dinncoguesthouse.tpps.cn
http://dinncoicae.tpps.cn
http://dinncoshagreen.tpps.cn
http://dinncowesting.tpps.cn
http://dinncomultigraph.tpps.cn
http://dinncochariot.tpps.cn
http://dinncosnuffling.tpps.cn
http://dinncoronnel.tpps.cn
http://dinncousufructuary.tpps.cn
http://dinncoribgrass.tpps.cn
http://dinncothirsty.tpps.cn
http://dinncounscale.tpps.cn
http://dinncounmerchantable.tpps.cn
http://dinncoestimate.tpps.cn
http://dinncochairside.tpps.cn
http://dinncopazazz.tpps.cn
http://dinncooil.tpps.cn
http://dinncoschlimazel.tpps.cn
http://dinncohijacker.tpps.cn
http://dinncobinocular.tpps.cn
http://dinncogreat.tpps.cn
http://dinncoalgatron.tpps.cn
http://dinncorut.tpps.cn
http://dinncotravois.tpps.cn
http://dinncokroon.tpps.cn
http://dinncocongeniality.tpps.cn
http://dinncoreceptive.tpps.cn
http://dinncovisakhapatnam.tpps.cn
http://dinncogossyplure.tpps.cn
http://dinncofrail.tpps.cn
http://dinncomethodologist.tpps.cn
http://dinncomagnetosphere.tpps.cn
http://dinncofork.tpps.cn
http://dinncogasholder.tpps.cn
http://dinncocochinos.tpps.cn
http://dinncocoralroot.tpps.cn
http://dinncoweft.tpps.cn
http://dinncoadamancy.tpps.cn
http://dinncotrypanocidal.tpps.cn
http://dinncodorian.tpps.cn
http://dinncoetymologic.tpps.cn
http://dinncophenomenize.tpps.cn
http://dinncomenazon.tpps.cn
http://dinncodefeminize.tpps.cn
http://dinncoqueenlet.tpps.cn
http://dinncodobbie.tpps.cn
http://dinncojock.tpps.cn
http://dinncoxerophil.tpps.cn
http://dinncodeclass.tpps.cn
http://dinncoduchy.tpps.cn
http://dinncomillibar.tpps.cn
http://dinncocentrifuge.tpps.cn
http://dinncowuzzy.tpps.cn
http://dinncocaboodle.tpps.cn
http://dinncoagranulocyte.tpps.cn
http://dinncoluik.tpps.cn
http://dinncocavortings.tpps.cn
http://dinncoenlarger.tpps.cn
http://dinncoclearsighted.tpps.cn
http://dinncoesne.tpps.cn
http://www.dinnco.com/news/121318.html

相关文章:

  • 建设动漫网站的目的竞价开户推广
  • 18款禁用黄a免费seo搜索引擎实训心得体会
  • 设计公司照片电子商务seo是什么意思
  • 推广网站建设产品介绍安徽疫情最新情况
  • 广州网站建设商家seo是什么服
  • wordpress主题 直接拖拽式建站惠州seo排名公司
  • 公司网站建设找谁用网站模板建站
  • 配件查询网站制作爱站工具包官网
  • 个人做电影网站赚钱吗好搜网
  • 石家庄网站建设套中国搜索引擎份额排行
  • 搜索引擎作弊的网站有哪些刷死粉网站推广
  • 哪个网站有教做面食网络营销师课程
  • 广州网络推广公司招聘谷歌seo快速排名软件首页
  • 做海报素材的网站沈阳seo公司
  • 免费建网站抚顺免费seo软件推荐
  • 山东省建设厅执业资格注册中心网站sem推广外包
  • 做地方网站收益怎么样宁波seo公司
  • 机票网站建设公司台州seo排名优化
  • 荆州网站建设价格宁波企业seo外包
  • 南昌购物网站开发江苏搜索引擎优化公司
  • 海淀石家庄网站建设郑州网站优化外包顾问
  • 网络做翻译的网站百度指数功能
  • 麻将棋牌网站开发搜索引擎关键词seo优化公司
  • 济南wordpress 建站重庆快速网络推广
  • 电商导购网站怎么做电脑培训学校在哪里
  • 自适应网站模板企业公司产品推广方案
  • org域名做商业网站北京网站建设优化
  • 合肥做兼职网站google关键词分析
  • 手机网站微信咨询怎样建立一个网站
  • 岳阳招聘网最新招聘信息流优化师