The GIT repository of this project is under echo-project-work echo-project. Alright I will dive right in. I am creating a website that will be able to host data from portable weather stations. These stations will send data with an arduino. This arduino will have many sensors hooked up and will have 2nd shield that is a 3G/GPRS shield that can send HTTP/FTP/FTPS/TCP/UDP/HTTPS/SMS/email. Seems to me to all be AT-commands which I have no Idea about but my job is the website. Although I do need help sending the data as well my main 2 questions are.
-
How do I receive this data and and save it into my collection in one specific array and save the time it came in.
here you can see example code of what each Node will hold. I also was wondering if i can also set an _id here as well.if(Nodes.find().count() === 0){Nodes.insert({ name: "OSU Node 1", gps: '134.234.78.545', humidity: [80,81,82,83,85,86,87,88,89,88], temp: [25,56,67,65,65,66,45,50], dew: [80,87,89,86,87,89,80,84,79], speed: [100,101,103,110,150,134,112,123,124], direction: [120,90,180,275,360,120,123,124,150], pressure: [33,32,33,34,35,32,32,31,32,31,33,35]});}
The Data will be coming in every 4 seconds. But only one point of data for each array. I know if I do
Nodes.update({_id: Router.current().params._id},{$push: {humidity: {$each: [#],$position: 0}}});
That I will get a new number at the front of the array. I saw in someone else’s code a limit param and was wondering how I could limit my arrays to only be up to 7500 points of data each. And as new data comes in the oldest data is deleted.
2 . I have been looking into Highcharts but cant seem to figure out all the small coding nuances. I need to graph each of these arrays on their own page. on their own Node’s Page. I have seen a lot of work from @robfallows and have questions to ask on other forum pages but since this is a larger question than just a reply to a another forum question I figured I would ask a more complete question/questions.
You can see what the site current looks like at Echo-project-website. If it is not up I just have it down for a bit for meteor reset. I have been testing array limitations.