开发者社区> 问答> 正文

result=code:6831,message:topic illegal,topic=,resp

用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,

展开
收起
1214184041343252 2019-08-15 09:12:00 828 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
How to Build a Successful Data 立即下载
AutoAlerts-From Data to Action 立即下载
低代码开发师(初级)实战教程 立即下载