Tuesday, 6 January 2015

Raspberry Pi Weather Station with multiple thermometers

Last Christmas I gave my father in law a weather station to monitor temperature inside their summer house to avoid the pipes to freeze during the winter. It has been working well but has only been measuring the temperature inside the house. During the holiday we added another sensor to be able to also read the temperature outside the house.
See this blog post for the original setup
http://macgyverdev.blogspot.se/2014/01/weather-station-using-raspberry-pi.html

Adding more thermometers is straight forward since the sensor used, a digital DS18B20, uses the OneWire protocol which the Raspberry Pi has drivers for. Adding more sensors doesn't require more ports on the Pi but instead reuses the same three ports for power, ground and data as the first sensor. Each thermometer has a unique hard wired address which is used to communicate over the data wire with the Raspberry Pi driver.

Programmatically, the new sensor is represented as a device folder in /sys/bus/w1/devices. You can simply cat this new file and find the latest temperature reading.

The Raspberry Pi posts the temperature readings to a CouchDB server and a small single page app presents the historical readings with graphs for the current day, week and month.

The original code is available on GitHub at https://github.com/johannoren/WeatherStation.
The adaptations for multiple sensors can be found on branch https://github.com/johannoren/WeatherStation/tree/multiplesensors



11 comments:

  1. Mmm.. estimable to be here in your report or notify, whatever, I repute I should moreover process strong for my have website want I play some salubrious further updated busy in your location. air quality monitor

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Replacement Silvertip 1.5G titanium I phone case with metal
    Replacement Silvertip 1.5G titanium plate titanium I phone case titanium trimmer as seen on tv with metal - Made in China - Made in titanium 3d printer China keith titanium - Made in gold titanium China - Authentic, handmade.

    ReplyDelete
  4. Learn remotely with an Android developer online course.Perfect for flexible learning.

    ReplyDelete
  5. UI/UX Design Course (Online IT Guru):
    Learn user interface and experience design with 35 hours of live training, real‑world projects, HTML/CSS fundamentals, and expert support — plus a certificate and job assistance upon completion.
    learn ui ux

    ReplyDelete
  6. This Java online training covers core programming concepts, application development fundamentals, hands‑on exercises, projects, and expert guidance — ideal for beginners and those preparing for certification.
    best online java course

    ReplyDelete
  7. Data Modeling Courses (Online IT Guru):
    Learn how to design and visualize data models, work with entities and attributes, and apply real‑world case studies — includes assignments, projects, lifetime access, and a certificatedata modeling training courses

    ReplyDelete
  8. DevOps Engineer Course (AWS DevOps Training):
    This DevOps course teaches DevOps practices and AWS tools (CI/CD, Linux basics, AWS services, Git, automation) with live sessions, projects, lifetime access, and 24×7 support to help you become job‑ready.
    devops course training

    ReplyDelete
  9. EasyPayTax offers reliable and affordable income tax filing and business compliance services in Hyderabad, helping individuals and businesses file returns accurately and on time.

    ITR filing services in Hyderabad

    ReplyDelete