I started acquiring multiple Raspberry Pi Zeros for the purpose of starting to figure out a consistent deployment scheme for the various automation related projects I envision for our homestead.
For now I’ve simply deployed 2 DS18b20 temperature sensors. One on the existing Pi in the Solar shed which serves this blog, and another on a Pi Zero in the house. Only sensing for now which complements the data I’m gathering from the solar array.
The Pi Zero consumes between 0.1 and 0.2 Amps
Here are my current install notes for the Pi Zero.
To limit power consumption, add this to /etc/rc.local to turn off HDMI output
/usr/bin/tvservice -o
To be able to read from the temperature probe, add the following line to /boot/config.txt
dtoverlay=w1-gpio:3
Get the python-w1thermsensor package
sudo apt-get install python-w1thermsensor
Reboot & make sure devices are listed in /sys/bus/w1/devices
The python code necessary to read the probe is:
from w1thermsensor import W1ThermSensor # assuming only 1 sensor sensor = W1ThermSensor.get_available_sensors( [W1ThermSensor.THERM_SENSOR_DS18B20] )[0] temperature = sensor.get_temperature() if temperature is not None: print '%.1f' % (temperature) else: print "failed to get reading."