|
| 1 | +# temp-matrix |
| 2 | +Temperature sensor matrix using Raspberry Pi, DS18B20, MQTT, Kotori DAQ, |
| 3 | +and Grafana. For bee hive monitoring. |
| 4 | + |
1 | 5 | | View from outside | View from inside (sensor tip details) |
|
2 | 6 | |:----:|:----:|
|
3 | 7 | |  |  |
|
4 | 8 |
|
5 |
| -# temp-matrix |
6 |
| -temperature matrix based on raspberry pi, python, 5x6 ds18b20, and grafana |
7 | 9 |
|
8 |
| -for development details see: [https://community.hiveeyes.org/t/laborprotokoll-4x5-temp-matrix-mit-ds18b20/5102/14](https://community.hiveeyes.org/t/laborprotokoll-4x5-temp-matrix-mit-ds18b20/5102/14) |
| 10 | +Lab protocol and development details: |
| 11 | +https://community.hiveeyes.org/t/laborprotokoll-4x5-temp-matrix-mit-ds18b20/5102 |
| 12 | + |
| 13 | + |
| 14 | +## What's Inside |
| 15 | +* README.md - this file |
| 16 | +* LICENSE |
| 17 | +* temp-matrix_5x6.py - sensor reading and data logging to hiveeyes |
| 18 | +* temp-matrix_5x6-grafana_desktop.json - description of [Grafana Dashboard](https://swarm.hiveeyes.org/grafana/d/T49wHSaIk/mois-ex-wtf-test-ds18b20-5x6-temp-matrix-svg-pixmap?orgId=2&from=1712771622514&to=1712807415379) |
| 19 | + |
| 20 | + |
| 21 | +## Setup |
| 22 | +We recommend to install the program into a Python virtualenv. |
| 23 | +```shell |
| 24 | +python3 -m venv .venv |
| 25 | +source .venv/bin/activate |
| 26 | +pip install 'ds18b20-datalogger @ git+https://github.com/hiveeyes/temp-matrix.git' |
| 27 | +``` |
9 | 28 |
|
10 |
| -## files |
11 |
| - * README.md - this file |
12 |
| - * LICENSE |
13 |
| - * temp-matrix_5x6.py - sensor reading and data logging to hiveeyes |
14 |
| - * temp-matrix_5x6-grafana_desktop.json - description of [grafana desktop](https://swarm.hiveeyes.org/grafana/d/T49wHSaIk/mois-ex-wtf-test-ds18b20-5x6-temp-matrix-svg-pixmap?orgId=2&from=1712771622514&to=1712807415379) |
| 29 | +In this spirit, you keep the installation separate from your system Python, so |
| 30 | +you can easily nuke it and start from scratch in case anything goes south. |
15 | 31 |
|
16 |
| -## sensor wiring |
17 |
| -be aware that you might have to ajust your resistors size. |
18 |
| -with 30 sensors i had erratic sensor mapping using a 4.7k resistor. |
19 |
| -i am getting valid mapping using a 2.2k resistor. |
| 32 | +Prerequisites: This program needs the `paho-mqtt` package. |
| 33 | +https://pypi.org/project/paho-mqtt/#installation |
20 | 34 |
|
21 |
| -## sensor mapping |
22 |
| -[https://community.hiveeyes.org/t/ds18b20-temperatur-sensoren-am-one-wire-bus-anordnen/1399 |
23 |
| -](https://community.hiveeyes.org/t/ds18b20-temperatur-sensoren-am-one-wire-bus-anordnen/1399) |
24 | 35 |
|
25 |
| -## data publishing |
26 |
| -paho-mqtt required: [https://pypi.org/project/paho-mqtt/#installation](URL) |
| 36 | +## Operations |
| 37 | + |
| 38 | +### Sensor Wiring |
| 39 | +Be aware that you might have to adjust your resistors size. |
| 40 | +With 30 sensors i had erratic sensor mapping using a 4.7k resistor. |
| 41 | +I am getting valid mapping using a 2.2k resistor. |
| 42 | + |
| 43 | +### Sensor Mapping |
| 44 | +https://community.hiveeyes.org/t/ds18b20-temperatur-sensoren-am-one-wire-bus-anordnen/1399 |
| 45 | + |
| 46 | +### Data Publishing |
27 | 47 |
|
28 | 48 | ssh youruser@yourpi
|
29 | 49 | screen
|
30 | 50 | cd temp-matrix
|
31 | 51 | source paho-mqtt/bin/activate
|
32 | 52 | python temp-matrix_5x6.py`
|
33 | 53 |
|
34 |
| -### mqtt data upload to hiveeyes |
35 |
| -[https://community.hiveeyes.org/t/daten-per-mqtt-und-python-ans-backend-auf-swarm-hiveeyes-org-ubertragen/94/6](https://community.hiveeyes.org/t/daten-per-mqtt-und-python-ans-backend-auf-swarm-hiveeyes-org-ubertragen/94/6) |
| 54 | +### MQTT data upload to Hiveeyes |
| 55 | +https://community.hiveeyes.org/t/daten-per-mqtt-und-python-ans-backend-auf-swarm-hiveeyes-org-ubertragen/94/6 |
36 | 56 |
|
37 |
| -### format your array |
38 |
| -[https://community.hiveeyes.org/t/how-to-visualize-2-dimensional-temperature-data-in-grafana/974/9 |
39 |
| -](https://community.hiveeyes.org/t/how-to-visualize-2-dimensional-temperature-data-in-grafana/974/9) |
| 57 | +### Format your array |
| 58 | +https://community.hiveeyes.org/t/how-to-visualize-2-dimensional-temperature-data-in-grafana/974/9 |
40 | 59 |
|
41 | 60 | matrix = [[temp_ir_1_1, temp_ir_1_2, temp_ir_1_3, temp_ir_1_4, temp_ir_1_5, temp_ir_1_6], \
|
42 | 61 | [temp_ir_2_1, temp_ir_2_2, temp_ir_2_3, temp_ir_2_4, temp_ir_2_5, temp_ir_2_6], \
|
43 | 62 | [temp_ir_3_1, temp_ir_3_2, temp_ir_3_3, temp_ir_3_4, temp_ir_3_5, temp_ir_3_6], \
|
44 | 63 | [temp_ir_4_1, temp_ir_4_2, temp_ir_4_3, temp_ir_4_4, temp_ir_4_5, temp_ir_4_6], \
|
45 | 64 | [temp_ir_5_1, temp_ir_5_2, temp_ir_5_3, temp_ir_5_4, temp_ir_5_5, temp_ir_5_6]]
|
46 | 65 |
|
47 |
| -## data visualizing (grafana) |
48 |
| -[https://swarm.hiveeyes.org/grafana/d/Y9PcgE4Sz/mois-ex-wtf-test-ir-sensor-svg-pixmap-copy |
49 |
| -](https://swarm.hiveeyes.org/grafana/d/Y9PcgE4Sz/mois-ex-wtf-test-ir-sensor-svg-pixmap-copy) |
50 |
| - |
51 |
| -## bonus: sensors offsets |
52 |
| -[https://community.hiveeyes.org/t/temperatursensoren-justieren-kalibrieren/1744/2 |
53 |
| -](https://community.hiveeyes.org/t/temperatursensoren-justieren-kalibrieren/1744/2) |
54 |
| - |
55 |
| - |
| 66 | +## Data visualization in Grafana |
| 67 | +https://swarm.hiveeyes.org/grafana/d/Y9PcgE4Sz/mois-ex-wtf-test-ir-sensor-svg-pixmap-copy |
56 | 68 |
|
| 69 | +## Bonus: Sensor offsets |
| 70 | +https://community.hiveeyes.org/t/temperatursensoren-justieren-kalibrieren/1744/2 |
57 | 71 |
|
| 72 | +## Contributing |
58 | 73 |
|
| 74 | +In order to learn how to start hacking on this program, please have a look at the |
| 75 | +documentation about how to install a [development sandbox](./docs/sandbox.md). |
59 | 76 |
|
| 77 | +Contributions of any kind are always welcome and appreciated. Thank you. |
0 commit comments