How to connect multiple devices to same Thing in AWS-IOT?

前端 未结 5 2113
暖寄归人
暖寄归人 2021-02-04 11:51

I am working on a project to install 100+ nodes of temperature sensors in an area, all of which perform the same function. The data they publish is the sensor id and the reading

5条回答
  •  长发绾君心
    2021-02-04 12:38

    You connect your sensors to AWS IOT, subscribe to a device Topic and start publishing data. And you start receiving data from all the sensors.

    Now see, what is the problem here??? Problem: We don't know, which device sent which data?

    Solution: There can be 2 solutions to this problem.

    1. You create multiple things and get data from the sensors separately from the separate device topic individual.(Which you already rejected)
    2. Second, solution is to embed the device id or clientID in the data which sensor is sending to AWS IOT. And create a Rule for that device topic on the AWS IOT to extract the data from the topic and save it in the DB with correct client ID. In this case Client ID will be used to distinguish data from the different sensors similar to primary key.

    I hope this helps.

    Thanks

提交回复
热议问题