Skip to content

Latest commit

 

History

History
161 lines (117 loc) · 6.61 KB

README.md

File metadata and controls

161 lines (117 loc) · 6.61 KB

ds18b20-datalogger

A data logger specializing in reading an array of DS18B20 sensors.

A temperature sensor matrix with heatmap visualization for bee hive monitoring, using Raspberry Pi, Linux, Python, DS18B20, MQTT, Kotori DAQ, and Grafana.

View from outside View from inside (sensor tip details)
Außen Innen

Lab protocol and development details: https://community.hiveeyes.org/t/laborprotokoll-4x5-temp-matrix-mit-ds18b20/5102

Project Information

» Documentation | Changelog | PyPI | Issues | Source code | License

CI Coverage Status License Downloads per month

Supported Python versions Status Package version

What's Inside

  • The ds18b20-datalogger program, reading DS18B20 sensors and publishing readings to MQTT in JSON format.
  • Configuration file in YAML format, like datalogger.yaml.
  • JSON representation for a corresponding Grafana Dashboard grafana-dashboard.json, when measurement data is submitted and acquired through Kotori DAQ.

Synopsis

Acquire single reading, and echo it on STDOUT in JSON format.

ds18b20-datalogger read datalogger.yaml

Take a single reading, and publish it to the configured MQTT topic.

ds18b20-datalogger run datalogger.yaml

Live

In order to see a running system in action, please enjoy inspecting the Live Grafana Dashboard.

Installation

Install the ds18b20-datalogger package from PyPI using pip.

pip install --upgrade ds18b20-datalogger

See also alternative installation methods and hands-on walkthroughs at development sandbox and production setup.

Configuration

In order to operate the data logger successfully, you will need to configure two important details:

  • Sensors: Map one-wire sensor sysfs paths to self-assigned sensor names.
  • Telemetry: Adjust MQTT connection settings and MQTT topic.

You can create a blueprint configuration file by using the make-config subcommand.

ds18b20-datalogger make-config > datalogger.yaml

Appliance: Sensor Wiring and Sensor Mapping

Be aware that you might have to adjust your resistors size. With 30 sensors i had erratic sensor mapping using a 4.7k resistor. I am getting valid mapping using a 2.2k resistor.

Please read more about sensor mapping on our community forum. In practice, just edit the one-wire section within the configuration file according to your setup.

Backend: Telemetry and Visualization

The data logger will publish measurements to an MQTT topic, where Kotori DAQ can pick it up, in order to converge into a timeseries database, and displays it on a Grafana Dashboard.

The package includes a corresponding Grafana Dashboard, which can be created by invoking the make-dashboard subcommand.

ds18b20-datalogger make-dashboard > dashboard.json

On our community forum, you can find relevant discussions about this topic.

Acknowledgements

The original code of this implementation has been discovered on the element14 community forum at Multiple DS18B20 Temp sensors interfacing with Raspberry Pi, shared by @laluha. Thanks!

Contributing

In order to learn how to start hacking on this program, please have a look at the documentation about how to install a development sandbox.

Contributions of any kind are always welcome and appreciated. Thank you.