Hi there,
Fresh new user of Thingerio here.
I am using the service as an air quality indicator dashboard.
For that purpose, I am sending from a raspberry pi a pyton request to Thingerio to feed my bucket.
requests.post(“xxxthinger.io/v3/users/[USER]/devices/[DATA]/callback/data”, headers=Headers,json={“CO2”: self.AMP_CO2, “PM25”:self.AMP_PM25, “PM10” : self.AMP_PM10, “Temperature_Actual” : self.AMP_TEM, “Temperature_Calibrated” : self.AMP_TEMP_CAL, “Humidity” : self.AMP_HUM, “TVOC” : self.AMP_TVOC, “IAQ” : self.AMP_IAQ , “Wind_Dir” : self.AMP_WindDir })
My issue is related to the last parameter Wind dir which is the wind direction I collect from a public web site where I live: It has 10min lag. So currently my bucket record is having T0 data for all parameter but T0-10 for that one.
I saw it’s possible to send data with customized timestamp. In that case I would split my data into 2 buckets and have the wind dir submitted with its own ts I get from the website API.
My issue is: I don’t see where I can specify the ts value since in the example on thingerio, it’s part of a higher level json they specify in the case of a device setup, not a http request setup.
In other words, in the code I share here, ts is not part of the json={xxx} but at the higher level.
Using the bucket inspector I see the field is outside my json data:
{
“bucket”: “ID”,
“data”: { <===== This is what the POST sends a json payload
“M”: {
“CO2”: {
“N”: “448”
},
“Humidity”: {
“N”: “78.581629681296235”
},
“IAQ”: {
“N”: “75”
},
“PM10”: {
“N”: “5”
},
“PM25”: {
“N”: “5”
},
“TVOC”: {
“N”: “457”
},
“Temperature_Actual”: {
“N”: “35.509999999999998”
},
“Temperature_Calibrated”: {
“N”: “29.809999999999999”
},
“Wind_Dir”: {
“N”: “10”
}
}
},
“event”: “bucket_write”,
“ts”: 1682665767831, <===== This is what I would like to customize.
“user”: “[USER]”
}
Any idea?
Thanks a lot