Excellent! :rockin:
Cheers!
Cheers!
This gets asked a lot
You can totally run two or more keezers or kegerators or fermentation chambers with one RaspberryPi and a pair of USB-connected Unos or Leonardos. You can also layer on multiple packages, such as RaspberryPints for a tap list display, and have some fun using a passive IR motion sensor to wake up your tap list display when someone comes in range of your dispensing system - even play a greeting or music; or add a comprehensive temperature logger that you can get to from anywhere on the planet.
I'm running a configuration that would manage any two systems - kegerator, keezer, fermentation chamber. Pick any combination of two. Two instances of BrewPi running on a pair of Unos. At the same time, I have a five channel temperature logger, and a tap list display, that I can see from virtually anywhere (including the 19" display above my keezer - which wakes up from a black screen when someone comes within about 10 feet of my keezer).
Another HBTer is going to be controlling four fermenters using four instances of BrewPi, so there's plenty of headroom on the 'Pi side. The rest is connectivity - you quickly end up needing a USB hub to tie things together...
Cheers!
The "purge database" Python script is its own file.
You can create it in /home/pi and call it anything you like.
You can then manually run it once a week or put an entry in cron to run it weekly. It does require root privs so preface the command line entry with sudo...
Cheers!
To get back to an old Q.
If I run this, should the "temp_data.db" folder be empty after every "purge"
Tx
If I want to use 4 probes and used the 5 probe database, should it still function? Just wondering if I did something wrong or maybe should have set up the database for 4 probes.
while true; do sudo /usr/lib/cgi-bin/monitor_5sensors.py; sleep 1; done
<?php
$dbd = sqlite_open('/var/www/temp_data2.db', 0666, $error);
if (!$dbd) die ($error);
$query = "SELECT temp0, temp1 FROM temps ORDER BY timestamp DESC LIMIT 1";
$result = sqlite_query($dbd, $query);
if (!$result) die("Cannot execute query.");
while ($row = sqlite_fetch_array($result, SQLITE_ASSOC)) {
echo "Tower Temperature" . $row['temp0'] . "C";
echo "<br>";
echo "Fridge Temperature" . $row['temp1'] . "C";
}
sqlite_close($dbd);
?>
Did you get the PHP figured out?
sudo apt-get update
sudo apt-get install php5-sqlite
<?php
$db = new SQLite3('temp_data2.db');
$result = $db->querySingle('SELECT temp0 FROM temps ORDER BY timestamp DESC', true);
foreach ($result as $row) {
echo $row;
}
?>
Enter your email address to join: