I’m working on IoT Project where devices send data to DSP Cloud. I have connected MongoDB database “admin’ to DSP an has named ThingsCloud. I’m able to POST and GET Records, But I have problems in using filter to get data from specific device id.
Here is my problem statement
I have several devices, like device=40, device=50 posting data to cloud and I want to filter data’s from individual devices. I have “deviceid”:”##" as identifier in the JSON to recognize data from different devices.
I need to get records which has deviceid: 50, inserted from today morning.
Below is my JSON that is being inserted
I’m using getRecordsByFilter() api to get all the records which matches my query. Basically I want all the records with the Deviceid = 50
If I execute this, I get nothing, even though I have around 20 records with Deviceid = 50. It gives response code = 500.
App Name: ThingsCloud
MongoDB Name: admin
Table Name: data
Kindly help as I’m stuck