Borisfa
Well-Known Member
@2kegger, when possible, let me know what parameter is it (are them).
To me it looks like I can just unhook the thermostat and replace it with the relay. Is it really that simple?
Wbarber69, I appreciate that. I'll get it apart tomorrow and get some pics. Here are some pics of the refrigerator.
Here's the fridge I got for practically nothing.
https://www.dropbox.com/sc/hrsbikfj6ro52ys/AAAV-HvnOMjAZYqWD8u5EGxna
Here's where the light, light switch, fan, and temp control are located.
https://www.dropbox.com/sc/0pamqk3uf7ttcm9/AACq9pUQLa-vyD0GGEcozGdBa
Kewl! One I haven't seen before. Looking forward to seeing how these are put together. I bet you could use it by just plugging it in and bypassing the thermostat with a wire. That in theory you could use a switch like was mentioned before. Having to really only tap out 1 wire and I bet it's got blade connectors on it.
I'll try. My fermenters are 100 km from me
I don't have an issue unhooking the thermostat I just want to be able to still be able to hook it back up fairly easilly in the event I ever quit brewing which after looking at it a little closer shouldn't be a problem. It's unlikely I quit brewing anytime soon but if I do, it would be nice to just be able to hook a couple wires back up and have a functional refrigerator without brewpi control.
To me it looks like I can just unhook the thermostat and replace it with the relay. Is it really that simple?
Am i missing something, or are you making something thats incredibly simple incredibly difficult?
If later down the line you want the Fridge to be a fridge and not a brewPi, unplug the power cable from the BrewPi outlet controlled by the arduino and plug it into the wall.
I dont see the point in screwing with a fridge's internals unless your goal is to hide the BrewPi, in which case theres probably still better ways than cutting at your fridges thermostat. By cutting it up going back to fridge mode becomes infinitely more difficult...you have to unhook the Brewpi, then rewire a new power cord on to plug it into the wall instead of unplugging from one socket and into another that takes maybe 5 seconds if your slow.
Hey all,
Thanks for all of the help getting this set up to make it a pretty easy process for me. I did notice a couple of things as i put it together and wanted to add my 2 cents where applicable.
First off the "Publicly accessible BrewPi" code linked in the first post appears to need some updating. I found that it would never actually display any graphs or fill out the LCD display. so I dug in and updated the code provided by FuzzeWuzze. See below:
- Goto /var/www
(this moves the default brewpi webpage to a new location)Code:sudo mv index.php admin.php
- Create a file with vi or nano called index.php and add the contents of the code block below (Mostly fixes in the Javascript section of the file)
Next create another new file with vi or nano called PublicBeerPanel.php with these contents (Fixes display of BrewName variable with decoded URL formatting)Code:<?php /* Copyright 2012 BrewPi/Elco Jacobs. * This file is part of BrewPi. * BrewPi 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. * BrewPi 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 BrewPi. If not, see <http://www.gnu.org/licenses/>. */ // load default settings from file $defaultSettings = file_get_contents('defaultSettings.json'); if($defaultSettings == false){ die("Cannot open default settings file: defaultSettings.json"); } $settingsArray = json_decode(prepareJSON($defaultSettings), true); if(is_null($settingsArray)){ die("Cannot decode defaultSettings.json"); } // overwrite default settings with user settings if(file_exists('userSettings.json')){ $userSettings = file_get_contents('userSettings.json'); if($userSettings == false){ die("Error opening settings file userSettings.json"); } $userSettingsArray = json_decode(prepareJSON($userSettings), true); if(is_null($settingsArray)){ die("Cannot decode userSettings.json"); } foreach ($userSettingsArray as $key => $value) { $settingsArray[$key] = $userSettingsArray[$key]; } } $beerName = $settingsArray["beerName"]; $tempFormat = $settingsArray["tempFormat"]; $profileName = $settingsArray["profileName"]; $dateTimeFormat = $settingsArray["dateTimeFormat"]; $dateTimeFormatDisplay = $settingsArray["dateTimeFormatDisplay"]; function prepareJSON($input) { //This will convert ASCII/ISO-8859-1 to UTF-8. //Be careful with the third parameter (encoding detect list), because //if set wrong, some input encodings will get garbled (including UTF-8!) $input = mb_convert_encoding($input, 'UTF-8', 'ASCII,UTF-8,ISO-8859-1'); //Remove UTF-8 BOM if present, json_decode() does not like it. if(substr($input, 0, 3) == pack("CCC", 0xEF, 0xBB, 0xBF)) $input = substr($input, 3); return $input; } ?> <!DOCTYPE html > <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>BrewPi reporting for duty!</title> <link type="text/css" href="css/redmond/jquery-ui-1.10.3.custom.css" rel="stylesheet" /> <link type="text/css" href="css/style.css" rel="stylesheet"/> </head> <body> <div id="beer-panel" class="ui-widget ui-widget-content ui-corner-all"> <?php include 'PublicBeerPanel.php'; ?> </div> <!-- Load scripts after the body, so they don't block rendering of the page --> <!-- <script type="text/javascript" src="js/jquery-1.11.0.js"></script> --> <script type="text/javascript" src="js/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.10.3.custom.min.js"></script> <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script> <script type="text/javascript" src="js/spin.js"></script> <script type="text/javascript" src="js/dygraph-combined.js"></script> <script type="text/javascript"> // pass parameters to JavaScript window.tempFormat = <?php echo "'$tempFormat'" ?>; window.beerName = <?php echo "\"$beerName\""?>; window.profileName = <?php echo "\"$profileName\""?>; window.dateTimeFormat = <?php echo "\"$dateTimeFormat\""?>; window.dateTimeFormatDisplay = <?php echo "\"$dateTimeFormatDisplay\""?>; </script> <script type="text/javascript" src="js/main.js"></script> <script type="text/javascript" src="js/device-config.js"></script> <script type="text/javascript" src="js/control-panel.js"></script> <script type="text/javascript" src="js/maintenance-panel.js"></script> <script type="text/javascript" src="js/beer-chart.js"></script> <script type="text/javascript" src="js/profile-table.js"></script> </body> </html>
Code:<?php /* Copyright 2012 BrewPi/Elco Jacobs. * This file is part of BrewPi. * BrewPi 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. * BrewPi 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 BrewPi. If not, see <http://www.gnu.org/licenses/>. */ ?> <div id="top-bar" class="ui-widget ui-widget-header ui-corner-all"> <div id="lcd" class="lcddisplay"><span class="lcd-text"> <span class="lcd-line" id="lcd-line-0">Live LCD waiting</span> <span class="lcd-line" id="lcd-line-1">for update from</span> <span class="lcd-line" id="lcd-line-2">script...</span> <span class="lcd-line" id="lcd-line-3"></span> </div> <div id="logo-container"> <img src="brewpi_logo.png"> <div id=beer-name-container> <span>Fermenting: </span><span><?php echo urldecode($beerName);?></span> <span class="data-logging-state"></span> </div> </div> </div> <div class="chart-container"> <div id="curr-beer-chart-label" class="beer-chart-label"></div> <div id="curr-beer-chart" class="beer-chart" style="width:815px; height:390px"></div> <div id="curr-beer-chart-controls" class="beer-chart-controls" style="display: none"> <div id="curr-beer-chart-buttons" class="beer-chart-buttons"> <div class="beer-chart-legend-row"> <button class="refresh-curr-beer-chart" title="Refresh"></button> <div class="beer-chart-legend-label">Refresh Chart</div> <br class="crystal" /> </div> <div class="beer-chart-legend-row last"> <button class="chart-help" title="Help"></button> <div class="beer-chart-legend-label">Help</div> <br class="crystal" /> </div> </div> <div id="curr-beer-chart-legend" class="beer-chart-legend"> <div class="beer-chart-legend-row time"> <div class="beer-chart-legend-time">Date/Time</div> </div> <div class="beer-chart-legend-row beerTemp"> <div class="toggle beerTemp" onClick="toggleLine(this)"></div> <div class="beer-chart-legend-label" onClick="toggleLine(this)">Beer Temp</div> <div class="beer-chart-legend-value">--</div> <br class="crystal" /> </div> <div class="beer-chart-legend-row beerSet"> <div class="toggle beerSet" onClick="toggleLine(this)"></div> <div class="beer-chart-legend-label" onClick="toggleLine(this)">Beer Setting</div> <div class="beer-chart-legend-value">--</div> <br class="crystal" /> </div> <div class="beer-chart-legend-row fridgeTemp"> <div class="toggle fridgeTemp" onClick="toggleLine(this)"></div> <div class="beer-chart-legend-label" onClick="toggleLine(this)">Fridge Temp</div> <div class="beer-chart-legend-value">--</div> <br class="crystal" /> </div> <div class="beer-chart-legend-row fridgeSet"> <div class="toggle fridgeSet" onClick="toggleLine(this)"></div> <div class="beer-chart-legend-label" onClick="toggleLine(this)">Fridge Setting</div> <div class="beer-chart-legend-value">--</div> <br class="crystal" /> </div> <div class="beer-chart-legend-row roomTemp"> <div class="toggle roomTemp" onClick="toggleLine(this)"></div> <div class="beer-chart-legend-label" onClick="toggleLine(this)">Room Temp</div> <div class="beer-chart-legend-value">--</div> <br class="crystal" /> </div> <div class="beer-chart-legend-row state"> <div class="state-indicator"></div> <div class="beer-chart-legend-label"></div> <br class="crystal" /> </div> <div class="beer-chart-legend-row annotation last"> <div class="toggleAnnotations dygraphDefaultAnnotation" onClick="toggleAnnotations(this)">A</div> <div class="beer-chart-legend-label" onClick="toggleAnnotations(this)">Annotations</div> <br class="crystal" /> </div> </div> </div> </div> <div id="chart-help-popup" title="Beer graph help" style="display: none"> <p>This chart displays all temperatures and state information logged by BrewPi. Not all temperatures are shown by default, but you can toggle them with the colored dots.</p> <p>Click and drag left or right to zoom horizontally, click and drag up or down to zoom vertically. Double click to zoom out. When zoomed in, you can hold shift to pan around. On your phone or tablet you can just pinch to zoom.</p> <p>The state information is shown as colored bars at the bottom of the graph, explanation below.</p> <div class="state-info"><span class="state-color state-idle"></span><span class="state-name">Idle</span> <span class="state-explanation"> No actuator is active. </span> </div> <div class="state-info"> <span class="state-color state-cooling"></span><span class="state-name">Cooling</span> <span class="state-explanation"> The fridge is cooling! </span> </div> <div class="state-info"><span class="state-color state-heating"></span><span class="state-name">Heating</span> <span class="state-explanation"> The heater is heating! </span> </div> <div class="state-info"><span class="state-color state-waiting-to-cool"></span><span class="state-name">Waiting to cool</span> <span class="state-explanation"> The fridge is waiting to start cooling. It has to wait because BrewPi has just cooled or heated. There is a a minimum time for between cool cycles and a minimum time for switching from heating to cooling. </span> </div> <div class="state-info"><span class="state-color state-waiting-to-heat"></span><span class="state-name">Waiting to heat</span> <span class="state-explanation"> Idem for heating. There is a a minimum time for between heat cycles and a minimum time for switching from cooling to heating. </span> </div> <div class="state-info"><span class="state-color state-cooling-min-time"></span><span class="state-name">Cooling minimum time</span> <span class="state-explanation"> There is a minimum on time for each cool cycle. When the fridge hits target but has not cooled the minimum time, it will continue cooling until the minimum time has passed. </span> </div> <div class="state-info"><span class="state-color state-heating-min-time"></span><span class="state-name">Heating minimum time</span> <span class="state-explanation"> There is a minimum on time for each heat cycle too. When the fridge hits target but has not heated the minimum time, it will continue heating until the minimum time has passed. </span> </div> <div class="state-info"><span class="state-color state-waiting-peak"></span><span class="state-name">Waiting for peak detect</span> <span class="state-explanation"> BrewPi estimates fridge temperature overshoot to be able to turn off the actuators early. To adjust the estimators, it has to detect the peaks in fridge temperature. When BrewPi would be allowed to heat/cool by the time limits but no peak has been detected yet for previous cycle, it waits in this state for a peak. </span> </div> </div>
Secondly I worked out a way host both the Password Protected BrewPi site as well as the one with all of the configurable buttons removed with only a few minor changes. See Below:
- Putty/SSH into your BrewPi system(or keyboard if its hooked up to a monitor).
- Run the following commands to enable htaccess
- cd /etc/apache2/sites-available
- sudo nano default
- change file to look like this where under Directory /var/www there is AllowOverride All
Code:<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName BrewPi DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> DirectoryIndex index.php Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
- Now its time to restart apache:
- cd /usr/sbin
- sudo apache2ctl -k graceful
- Go to /var/www directory
- Create a file using vi editor called .htaccess and inside of it put the following, modify the first line where it is bold and replace it with what you plan to call your Private PHP file.
Code:<FilesMatch "admin.php"> Allow from all authuserFile /var/www/private/.htpasswd AuthName "YOUR LOGIN HERE" AuthType Basic <Limit GET POST> require valid-user </Limit> </FilesMatch> <FilesMatch "beer-panel.php|config.php|configuration.php|control-panel.php|maintenance-panel.php|previous_beers.php|program_arduino.php|s ave_beer_profile.php|start_script.php"> Order deny,allow Deny from All Allow from 192.168.1. </FilesMatch>
- Edit the last allow line that says Allow from 192.168.1 to match up with whatever your local LAN IP address scheme is. You dont need wildcards or subnet masks or anything else.
- Create a directory called private(to store the above .htpasswd file), and go into it.
- Type htpasswd -c .htpasswd <UserName>, it will pop up asking you for a password, and make you repeat it.
- Your done! If you try going to Http://YourBrewPiWebSite.com/admin.php it will now ask you for a password and take you to the "Full BrewPi site". But if you go to http://YourBrewPiWebSite.com it will take you to the "Public Site" without the need for a password.
- Also make sure obviously that if you want to access this from the external world that your RPI is port forwarding properly through your router.
This thread is awesome. I already had a 1st generation RaspPi B and an Arduino Duemilanove and some ATMega328s, but I could not get the device(probes/actuators) to save in the EEPROM, so I saved myself the headache of debug and bought a Uno for $12. My system is running great.
I wanted to share my setup with my cell phone display, maybe someone else in 338 pages of comments has already done this but I didn't find it. Lots of people have old android cellphones laying around, this saves you from having to buy and wire a 80x24 display. This is a nexus one and a car dock I had, it's mounted via suction cup to side of fridge. I downloaded a full screen browser app, an "lcd always on" app, and a "rotation lock" app. I hacked versions of Beerpanel.php, Index.php and the css files so that I'd just get the 80x24 display, I still need to tweak it some. I may add another line (I'd love to put the chamber/room temps on seperate lines but that'd involve recompiling the arduino code, a later project).
One question I had for you guys is that one of my temperature probes seems to have a different granularity than the other. My "Room temp" (currently submerged in a carboy of water) is changing about .11-12 a degree at a time, but my "beer temp" (currently insulated against the same carboy) is changing as little as .01. Anyone else experience this, have an explanation? The insulated probe is staying within a degree of the carboy which I'm happy about.
You can see my graph here: http://brew.kyro.co/
A second question. Is anyone using more than 3 probes with a single arduino? I went ahead and wired all 5 of the probes I bought (a pack off amazon) without knowing the software was limited to 3. I'll do the coding myself if I have to I just wanted to see if anyone had already done the work. I'm just looking for additional "room temp" type readings for logging (extra beers, simple temp control of my other bridge outside of brewpi, etc)
AWESOME idea with the phone! I'm sending my lcd and protoboard back and going this route. I have several old phones laying around as well as an extra mount!
Care to share how you edited your php and css files?
Thanks for sharing!
I followed this "guide" and seem to only have access to the "public site" even when I connect to the "yourbrewpisite.com/admin.php" site. It asked me for my username and password but I'm not seeing the maintenance or start/stop script buttons.
Any ideas what I could have done wrong or what I should look for?
I would love to be able to get this option working as well as change the port to something besides 80 because my ISP blocks 80.
Any help would be great. Worst case scenario I just run the script again I guess.
This thread is awesome. I already had a 1st generation RaspPi B and an Arduino Duemilanove and some ATMega328s, but I could not get the device(probes/actuators) to save in the EEPROM, so I saved myself the headache of debug and bought a Uno for $12. My system is running great.
I wanted to share my setup with my cell phone display, maybe someone else in 338 pages of comments has already done this but I didn't find it. Lots of people have old android cellphones laying around, this saves you from having to buy and wire a 80x24 display. This is a nexus one and a car dock I had, it's mounted via suction cup to side of fridge. I downloaded a full screen browser app, an "lcd always on" app, and a "rotation lock" app. I hacked versions of Beerpanel.php, Index.php and the css files so that I'd just get the 80x24 display, I still need to tweak it some. I may add another line (I'd love to put the chamber/room temps on seperate lines but that'd involve recompiling the arduino code, a later project).
One question I had for you guys is that one of my temperature probes seems to have a different granularity than the other. My "Room temp" (currently submerged in a carboy of water) is changing about .11-12 a degree at a time, but my "beer temp" (currently insulated against the same carboy) is changing as little as .01. Anyone else experience this, have an explanation? The insulated probe is staying within a degree of the carboy which I'm happy about.
You can see my graph here: http://brew.kyro.co/
A second question. Is anyone using more than 3 probes with a single arduino? I went ahead and wired all 5 of the probes I bought (a pack off amazon) without knowing the software was limited to 3. I'll do the coding myself if I have to I just wanted to see if anyone had already done the work. I'm just looking for additional "room temp" type readings for logging (extra beers, simple temp control of my other bridge outside of brewpi, etc)
It sounds like you mave have made the edits to index.php before copying it to admin.php. If you look at the two files are they the same?
you can get the file from someone else. here:
wget http://brew.kyro.co/admin.php.txt
just replace your admin.php file with that.
(you don't need to mess with index.php, it's already what you want... the public page)
you can get the file from someone else. here:
wget http://brew.kyro.co/admin.php.txt
just replace your admin.php file with that.
(you don't need to mess with index.php, it's already what you want... the public page)
Could someone please help me acquire an unedited admin.php file? I have apparently copied over mine and need an un-altered copy.
I tried wget from sowhoa but don't have authentication. Could someone post there's so i can copy it?
Thanks for all the help. Definitely learning a lot during this build.
Mine is finished. I still haven't managed to get the public/private webpages to work properly but I'm OK without them.
Going to try my first lager this weekend and put it through the paces.
https://www.dropbox.com/sc/ys78j8bisphnbos/AACDgoTqKu5C-zhCYyDhrebxa
Cool fridge. Always good to see another brewpi
Might be an idea to put a small pc fan in there for circulation.
Finally put my controller to use on Saturday. It was chugging along nicely keeping the beer right around 65F. This morning I went in and noticed that, although the script was still running, there were no temperatures. It did show the fridge setting and beer constant (in beer constant mode), but the actual measured temps were blank in the web page readout.
It took more than one reboot to bring them back, but now I've lost confidence. Any known remedy or info about his happening that would be useful? Has this happened to anyone else and is there an easy way to bring back the temps?
It could be a hardware or wiring issue, just don't know yet, but was running (it is remote and can't get a good internet connection to watch it from home).
cheers, JD
Enter your email address to join: