Hey there, have sensor data across multiple days. Now I want to have the summed up sensor data points per day and visualised per day. Withe the following code I don’t get any timepoints thus no time series Visualisation.
MSYPicoSensorData.ACS7125A.aggregate([
{ "$match": { "year": { "$gt": 2022 } } },
{
"$group": {
"_id": { "year": "$time.year", "month": "$time.month", "day": "$time.day" },
"Energie": { "$sum": "$Chargingpower" }
}
},
{
"$project": {
"_id": 0,
"Energie": 1,
"time": { "$dateFromParts": { "year": "$group._id.year", "month": "$group._id.month", "day": "$group._id.day" } }
}
},
{ "$sort": { "time": 1 } }
])