Hi All. Been a long time since I've check out the boards...sorry :( Anyway long time ago I shared some scripting and stuff to make the DS18B20 temp sensor usable without having to solder a resistor, and just use pullup on the RaspberryPi. Over the last few months I've noticed my temp sensors didn't always read after a power failure; and I'd have to go in a start the sensor script manually even though I had the script in the rc.local startup file on the RaspberryPi. What seems to have been happening is that Reef-Pi started before rc.local could get the script running...so I've fixed that by putting a launcher in the crontab. Here's the instructions to do this all from beginning to end. Temp sensor...no hardwired resistor.
NO RESISTOR PULLUP SCRIPT CONFIG INSTRUCTIONS...
To make a script that runs the pull up code for temp sensor pin (in this case Pin 4) and have it run at startup follow these instructions (note. this is for scripts in the home/pi director,y change as you see fit)...
Step 1a: Make python script that tells the Pi which pin to pullup...
sudo nano Temp1.py
Step 1b: Add this info to the script, and save...
#Temp1.py
import RPi.GPIO as GPIO
import time
time.sleep(30) # Checks Pin Every 30 seconds.
GPIO.setmode(GPIO.BCM)
GPIO.setup(4, GPIO.IN, pull_up_down=GPIO.PUD_UP)
#Script End
Step 2: Make this python scripts executable...
chmod 755 Temp1.py
Step 3a: Make a Launcher Script...
sudo nano launcher.sh
Step 3b: add python scripts and locations to launcher, and save…
cd /
cd home/pi/
sudo python Temp1.py
cd /
Step 4: Make this launcher executable...
sudo chmod 755 launcher.sh
Step 5: make a directory for the any errors in crontab to go...
sudo mkdir logs
Step 6a: Add launcher to Your Crontab...
sudo crontab -e
Step 6b: Add this line to the bottom of Crontab...
@reboot sh /home/pi/launcher.sh >/home/pi/logs/cronlog 2>&1
Step 7: Reboot
sudo Reboot
Step 8: Test after reboot that the sensor is functional, the sensors start with a number 28…
cd /sys/bus/w1/devices
ls
If there’s trouble make sure 1 wire is on for gpio...
sudo modprobe w1-gpio
sudo modprobe w1-therm
Hope this helps.