花了一些时间,但在我阅读后我想通了。
我附上了 Node-Red 的工作流程供您参考:
[{"id":"f87e7bab.1b7b68","type":"inject","z":"96dd1da4.97f65","name":"","topic":"","payload" :"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":120, "wires":[["b301afc2.5e844"]]},{"id":"1a565e01.dc29b2","type":"debug","z":"96dd1da4.97f65","name":"检索表条目","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload.value","x":810,"y":120, "wires":[]},{"id":"b301afc2.5e844","type":"change","z":"96dd1da4.97f65","name":"Set Headers","rules": [{"t":"set","p":"headers","pt":"msg","to":"{}","tot":"json"},{"t":" set","p":"headers.content-type","pt":"msg","to":"application/json","tot":"str"},{"t":"set" ,"p":"headers.accept","pt":"msg","to":"application/json;odata=nometadata","tot":"str"}],"action":"", "property":"","from":"","to":"","reg":false,"x":410,"y":120,"wires":[["764f1dd1.c44564" ]]},{"id":"764f1dd1.c44564","type":"www-request","z":"96dd1da4.97f65","name":"","method":"GET", "ret":"obj","url":"https://iotcdatastorage.table.core.windows.net/Table1?sv=2018-03-28&ss=t&srt=sco&sp=rwdlacu&se=2019-09-26T13:35:37Z&st=2019-09-24T05:35:37Z&spr=https&sig=7ogTJRILvYLKce%2B5aiePdBJ%2BXys4pc5%2FH8DmbgBvovk%3Z","follow-re指导":true,"persistent-http":true,"tls":"","x":590,"y":120,"wires":[["1a565e01.dc29b2"]]},{"id ":"f62f1d4e.52b8a","type":"comment","z":"96dd1da4.97f65","name":"检索添加到 Azure 表存储表","info":"","x ":330,"y":60,"wires":[]},{"id":"cd48e5e9.beeac8","type":"inject","z":"96dd1da4.97f65","name" :"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay": 0.1,"x":220,"y":160,"wires":[["31d9e715.0cb738"]]},{"id":"ad13b55b.042e78","type":"change","z ":"96dd1da4.97f65","name":"设置标题","rules":[{"t":"set","p":"headers","pt":"msg","to" :"{}","tot":"json"},{"t":"set","p":"headers.content-type","pt":"msg","to":"应用程序/json","tot":"str"},{"t":"set","p":"headers.accept","pt":"msg","to":"application/json;odata =nometadata","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x ":590,"y":160,"wires":[["81917f33.acfa5"]]},{"id":"81917f33.acfa5","type":"www-request","z": "96dd1da4.97f65","name":"","method":"POST","ret ":"obj","url":"https://iotcdatastorage.table.core.windows.net/Table1?sv=2018-03-28&ss=t&srt=sco&sp=rwdlacu&se=2019-09-26T13:35:37Z&st=2019-09-24T05:35:37Z&spr=https&sig=7ogTJRILvYLKce%2B5aiePdBJ%2BXys4pc5%2FH8DmbgBvovk%3Z","follow-redirects":true,"persistent-http":true,"tls":"","x":770,"y":160 ,"wires":[["29f660c6.3c1b"]]},{"id":"29f660c6.3c1b","type":"debug","z":"96dd1da4.97f65","name":"添加表条目","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":960,"y":160," wires":[]},{"id":"31d9e715.0cb738","type":"function","z":"96dd1da4.97f65","name":"Add RowKey","func":" var today = new Date();\ndatesent = today.toISOString();\n\nmsg.payload =\n{\n \"PartitionKey\": partitionKeyString,\n \"RowKey\": datesent,\n \ "vibration\": 值,\n \"running\": 是/否\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":410,"y" :160,"电线":[["ad13b55b.042e78"]]}]