2
follow
5670
views

阿里云设备的物模型数据里面始终没有值!

Why is it folded? 0 个回复被折叠
记忆的双手 核心会员 User from: 四川省成都市
2025-02-27 10:46

用下面的代码试下呢?只上报测点和数值。看实时日志数据是上报到阿里云平台了,但是没有被阿里云识别成属性上报。如果只上报测点和数值还不行,可以咨询下阿里云那边

# Enter your python code.
import json
import random
from common.Logger import logger
from quickfaas.aliyuniot import thing_post_property


def main(message):
logger.info("*************************属性上报***********************************")
logger.info(message)
key_list = []
value_list = []

for list_id,message_value in enumerate(message["measures"]): 

    key_list.append(message_value.get("name")) 

    value_list.append(message_value.get("value")) 


dic_value = dict(zip(key_list,value_list))
logger.info("*************************查看字典是否正确***********************************")
logger.info(dic_value)
thing_post_property(__topic__, dic_value)

About the author

limingde99 核心会员

This guy is lazy,Introduction has not been set

Problem dynamics

Release time
2024-04-08 10:56
Update time
2025-02-27 10:46
Focused
2 people pay attention to

Related issues

IG902网关连接sql server 数据库
IG900系列数据上传
InDTU IHDMP协议使用的CRC校验使用的什么参数模型?
关于映翰通-设备云网页端-设备控制器-安装现场下拉框选择功能非常难用!!!
DCTCP与DCUDP 的登录数据包和心跳数据包与服务器端是如何交互的?
使用映瀚通IR915L设备如果实现以下功能
IR615怎么禁止设备访问外网
DTU的设备号都在什么情况下需要填写,填写的规则是什么?
InConnect 维护设备的流量大概是多少?
设备云帐户被锁定怎么办