I've worked with DS18B20 sensors before and have written and used scripts to access their data and make it available to a webserver using Flask and javascript. Now however I'm looking for a way to simply dump their data to a MongoDB collection. I've (finally) got Meteor installed (or rather an ARM supporting fork of Meteor), and if I could dump the data to a collection, then publish a subset of that data, realtime graphing would be possible.

Right now I'm thinking that a python script that executes on startup would be easiest. It would dump the sensor ID and reported temperature. I'm not sure what package to use to have a simple python script to connect to Mongo though and I'm not sure what the consequences of multiple connections to Mongo would be.

Update - here's an example gist https://gist.github.com/archonic/8d2d936c8f25f3cb84004f01d58c135c


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.