tobyweston / temperature-machine

Data logger for multiple DS18B20 temperature sensors on one or more machines
Apache License 2.0
67 stars 22 forks source link

Stops sending temp / sensors folder gone. #104

Open Pliggen opened 4 years ago

Pliggen commented 4 years ago

Hi! Installed this with a ds18b20 and a rpi zero, and got it running for some hours. But then suddenly it stops showing temperature and the graphs for 24 hours is not available. I check the /sys/bus/w1/devices folder and now the 28xxxxx folder is gone. Only way to get it running again is to pull the power and restart the raspberry pi. Just a restart in command line dont solve this. Tried several ds18b20 sensor and they all do this. Any ideas what can be the reason for this?

AlistairFielden commented 4 years ago

I had the same issue. There’s some messages in GitHub with regard to this. I have resolved this by getting the system to auto reboot the sensor. I wire the 3V supply from GPIO3 Pin5 with Pin7 the data pin GPIO4 and Pin9 the ground (all next to each other). GPIO3 by default is powered at start-up. I then have the python code (below) run every 10 minutes using Crontab. If it can’t find a 28- directory it powers down pin 3 from ½ second and appends to a log file the current time and date (allow you to track when it’s happening).

At the commandline type CRONTAB –E and then in the text editor that loads add to the end /10 * sudo python /home/pi/Restart.py

Restart.py saved into your home directory (where you load into using SSH) \START import RPi.GPIO as GPIO import time import glob import os import sys import time import datetime

def check_directory(): if glob.glob('/sys/devices/w1_bus_master1/28-*/w1_slave')==[]: GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(3,GPIO.OUT) GPIO.output(3,GPIO.LOW) time.sleep(0.5) GPIO.output(3,GPIO.HIGH) ts = time.time() sttime = datetime.datetime.fromtimestamp(ts).strftime('%d/%m/%Y %H:%M:%S') f=open("Restart_Log.txt","a+") f.write(sttime + '\n') f.close

check_directory() \END

-- Regards, Alistair Fielden

10 Caister Close, Seaham, County Durham, SR7 7WP 0753 800 1013 mailto:alien264@gmail.com alien264@gmail.com

From: Pliggen notifications@github.com Sent: 10 July 2020 15:14 To: tobyweston/temperature-machine temperature-machine@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [tobyweston/temperature-machine] Stops sending temp / sensors folder gone. (#104)

Hi! Installed this with a ds18b20 and a rpi zero, and got it running for some hours. But then suddenly it stops showing temperature and the graphs for 24 hours is not available. I check the /sys/bus/w1/devices folder and now the 28xxxxx folder is gone. Only way to get it running again is to pull the power and restart the raspberry pi. Just a restart in command line dont solve this. Tried several ds18b20 sensor and they all do this. Any ideas what can be the reason for this? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tobyweston/temperature-machine/issues/104 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AMDBJD3UKG6VJEJWBE7IDD3R24OY7ANCNFSM4OWUGPXA . https://github.com/notifications/beacon/AMDBJD46F5HYQKYXVX7PBOTR24OY7A5CNFSM4OWUGPXKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JYHUHOA.gif