#!/bin/bash
#
#   Version 1.1
#
#   Copyright 2016-2018 Lee Djavaherian
#
#   This file is part of TrillSat.
#
#   TrillSat is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   TrillSat is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with TrillSat.  If not, see <http://www.gnu.org/licenses/>.
###################################################################################

#these device numbers are customized for my particular DS18B20+ temperature probes
#change device numbers below to match different probes

grep -o "t=.*" /sys/bus/w1/devices/28-000008a24217/driver/28-000008a24217/w1_slave | sed 's/t=//' > /tmp/trillsat_thermtmp
grep -o "t=.*" /sys/bus/w1/devices/28-000008a26dc4/driver/28-000008a26dc4/w1_slave | sed 's/t=//' >> /tmp/trillsat_thermtmp
grep -o "t=.*" /sys/bus/w1/devices/28-000008a3e8ac/driver/28-000008a3e8ac/w1_slave | sed 's/t=//' >> /tmp/trillsat_thermtmp
grep -o "t=.*" /sys/bus/w1/devices/28-000008a3b24e/driver/28-000008a3b24e/w1_slave | sed 's/t=//' >> /tmp/trillsat_thermtmp

cp /tmp/trillsat_thermtmp /tmp/trillsat_therm

	

