用linkkit sdk做的python发消息给云端。
rc, mid = lk.publish_topic("/sys/a1lwzoByVcy/HYMODBUS4G01A04/thing/model/up_raw", b'\x01\x04\x20\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\xD1\x8E')
云端在日志服务->物模型数据分析可以看到: 数据类型(上行错误),内容(result=code:6831,message:topic illegal,topic=),状态(6831)。
请问是那里错误,发送的数据有什么问题呢?文档里没有6831的处理建议。
物模型解析脚本需要什么样的topic呢?
完整的日志如下:
upstream-error - bizType=OTHER_MESSAGE,params={"aliyunPk":"1214184041343252","id":"1","iotId":"sZmU9tEpNjQDy9lCXnxE000100","method":"thing.service.property.post","params":{"prop_channel_7":2.092721713319411E-21,"prop_channel_6":7.967088090505125E-24,"prop_channel_5":3.03104765170168E-26,"prop_channel_4":1.1523248117382014E-28,"prop_addr":1,"prop_channel_3":4.377525916134508E-31,"prop_channel_2":1.6616339986002605E-33,"prop_channel_1":6.301941157072183E-36,"prop_channel_0":2.387939260590663E-38},"proxyName":"thing.service.property.post","topic":"/sys/a1lwzoByVcy/HYMODBUS4G01A04/thing/service/property/post","uniMsgId":"1161593480624018432","version":"1.0"},result=code:6831,message:topic illegal,topic=,response={},device={"aliyunCommodityCode":"iothub_senior","deviceKey":"sZmU9tEpNjQDy9lCXnxE","deviceSecret":"***","gmtCreate":1563962440000,"gmtModified":1563962440000,"id":47399502,"iotId":"sZmU9tEpNjQDy9lCXnxE000100","name":"HYMODBUS4G01A04","productKey":"a1lwzoByVcy","rbacTenantId":"0533C9F6CCD84FAFB3D1B199FC930DF9","region":"cn-shanghai","status":0,"statusLast":0,"thingType":"DEVICE"},scriptData={"upOriginalData":"0104200102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20d18e","upTransformedData":{"method":"thing.service.property.post","id":"1","params":{"prop_channel_7":2.092721713319411E-21,"prop_channel_6":7.967088090505125E-24,"prop_channel_5":3.03104765170168E-26,"prop_channel_4":1.1523248117382014E-28,"prop_addr":1,"prop_channel_3":4.377525916134508E-31,"prop_channel_2":1.6616339986002605E-33,"prop_channel_1":6.301941157072183E-36,"prop_channel_0":2.387939260590663E-38},"version":"1.0"}},useTime=69,
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。