PLC专题 工业4.0 ·

Node-red Funciton 节点封装数据上传到阿里云IOT

var Temperature=msg.payload.Temperature
var RelativeHumidity=msg.payload.RelativeHumidity
var RelativeHumidity2={payload:msg.payload.RelativeHumidity}
var Id=Date.now()
var payload = { id:Id, params:{ Temperature:Temperature, RelativeHumidity:RelativeHumidity }, method:"thing.event.property.post" };
msg.payload=payload;
return msg

参考

https://blog.csdn.net/geek_monkey/article/details/80751151

参与评论