Has anybody used the BrewPi to control a BBQ smoker?
I use brewpi to do pretty much this on my second brew fridge it works perfectly, I believe you can also run raspberry pints and brewpi concurrently (with some tweaking the Apache) if you wanted to monitor your flow of beer.
The /html/ directory is something you'll deal with under Debian Jessie.
[...]Also does it matter what resistor you get? I was just at the electronics store and saw 4.7k resistors in 1/4, 1/8, 1/2 watt, ect. I got the 1/2. Will this work or do I need something else?[...]
Opps, I just realized those are probably the two sensors...correct? :-D
I'm not using a phone, I'm using an lcd attached to the gpio of the RPI so that would work in this instance
<html>
<head>
<title>BrewPi LCD</title>
<link type="text/css" href="lcd.css" rel="stylesheet"/>
<script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
</head>
<body>
<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>
<script type="text/javascript">
function refreshLcd(){
"use strict";
$.post('socketmessage.php', {messageType: "lcd", message: ""},
function(lcdText){
var $lcdText = $('#lcd .lcd-text');
for (var i = lcdText.length - 1; i >= 0; i--) {
$lcdText.find('#lcd-line-' + i).html(lcdText[i]);
}
}, "json")
.fail(function() {
var $lcdText = $('#lcd .lcd-text');
$lcdText.find('#lcd-line-0').html("Cannot receive");
$lcdText.find('#lcd-line-1').html("LCD text from");
$lcdText.find('#lcd-line-2').html("Python script");
$lcdText.find('#lcd-line-3').html(" ");
}).always(function() {
window.setTimeout(refreshLcd,5000);
}
);
}
$(document).ready(function(){
"use strict";
refreshLcd();
});
</script>
</body>
</html>
.lcddisplay {
width: 480px;
height: 320px;
float: left;
margin: 5px;
background: #000000; /* Old browsers */
background: -moz-linear-gradient(top, #000000 2%, #2b2b2b 11%, #212121 54%, #212121 92%, #000000 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(2%,#000000), color-stop(11%,#2b2b2b), color-stop(54%,#212121), color-stop(92%,#212121), color-stop(100%,#000000)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #000000 2%,#2b2b2b 11%,#212121 54%,#212121 92%,#000000 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #000000 2%,#2b2b2b 11%,#212121 54%,#212121 92%,#000000 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #000000 2%,#2b2b2b 11%,#212121 54%,#212121 92%,#000000 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
background: linear-gradient(top, #000000 2%,#2b2b2b 11%,#212121 54%,#212121 92%,#000000 100%); /* W3C */
-webkit-box-shadow: inset 1px 1px 5px #333333;
-moz-box-shadow: inset 1px 1px 5px #333333;
box-shadow: inset 1px 1px 5px #333333;
border: 2px solid #333;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.lcddisplay .lcd-text{
float:left;
margin: 65px 16px;
}
.lcd-line{
float:left;
clear:left;
font-size: 35px;
font-weight: normal;
font-style: normal;
font-family: '5x8LCDHD44780UA02Regular', monospace;
color: #FFFF00;
white-space: pre;
}
OK so with some help from my brother in law (well most of it anyway)
I was given the Waveshare spot pear 4inch touchscreen display, that i thought i'd use as a display panel for my second brew fridge.
you can create an independent lcd.html and a lcd.css that are saved in the same location as index.html. which allows you to extract the top left panel only and it serves as a display.
and you get something like the picture at the bottom (i need some more trial and error to get it looking perfect)
for anyone interested in doing it hear is the lcd.html text
Code:<html> <head> <title>BrewPi LCD</title> <link type="text/css" href="lcd.css" rel="stylesheet"/> <script type="text/javascript" src="js/jquery-1.11.0.min.js"></script> </head> <body> <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> <script type="text/javascript"> function refreshLcd(){ "use strict"; $.post('socketmessage.php', {messageType: "lcd", message: ""}, function(lcdText){ var $lcdText = $('#lcd .lcd-text'); for (var i = lcdText.length - 1; i >= 0; i--) { $lcdText.find('#lcd-line-' + i).html(lcdText[i]); } }, "json") .fail(function() { var $lcdText = $('#lcd .lcd-text'); $lcdText.find('#lcd-line-0').html("Cannot receive"); $lcdText.find('#lcd-line-1').html("LCD text from"); $lcdText.find('#lcd-line-2').html("Python script"); $lcdText.find('#lcd-line-3').html(" "); }).always(function() { window.setTimeout(refreshLcd,5000); } ); } $(document).ready(function(){ "use strict"; refreshLcd(); }); </script> </body> </html>
and hear is the separate CSS file that you need in order to change the size of the panel text etc.
Code:.lcddisplay { width: 480px; height: 320px; float: left; margin: 5px; background: #000000; /* Old browsers */ background: -moz-linear-gradient(top, #000000 2%, #2b2b2b 11%, #212121 54%, #212121 92%, #000000 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(2%,#000000), color-stop(11%,#2b2b2b), color-stop(54%,#212121), color-stop(92%,#212121), color-stop(100%,#000000)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #000000 2%,#2b2b2b 11%,#212121 54%,#212121 92%,#000000 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #000000 2%,#2b2b2b 11%,#212121 54%,#212121 92%,#000000 100%); /* Opera11.10+ */ background: -ms-linear-gradient(top, #000000 2%,#2b2b2b 11%,#212121 54%,#212121 92%,#000000 100%); /* IE10+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#000000',GradientType=0 ); /* IE6-9 */ background: linear-gradient(top, #000000 2%,#2b2b2b 11%,#212121 54%,#212121 92%,#000000 100%); /* W3C */ -webkit-box-shadow: inset 1px 1px 5px #333333; -moz-box-shadow: inset 1px 1px 5px #333333; box-shadow: inset 1px 1px 5px #333333; border: 2px solid #333; -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; } .lcddisplay .lcd-text{ float:left; margin: 65px 16px; } .lcd-line{ float:left; clear:left; font-size: 35px; font-weight: normal; font-style: normal; font-family: '5x8LCDHD44780UA02Regular', monospace; color: #FFFF00; white-space: pre; }
to edit the display to fit your device change
.lcddisplay {
width: 480px;
height: 320px;
to edit the placement of the text change
.lcddisplay .lcd-text{
float:left;
margin: 65px 16px;
and to make the text fill the screen edit
.lcd-line{
font-size: 35px;
i inspected the elements in chrome and made the adjustments there to see how it looked (you can set the screen size to replicate a device) and used trial and error.
I am sure there is an easier way to do that but it worked for me.
For anyone thinking of using the same display, it was a pain to set up but i finally found a great link that i followed and it worked perfectly. http://futurice.com/blog/id-like-to-have-some-lcd-on-my-pi
and anyone wanting to boot their RPI straight to the LCD display i followed this.
https://www.danpurdy.co.uk/web-development/raspberry-pi-kiosk-screen-tutorial/
as i was using raspbian under setting up the kiosk instructions i had to edit this file /etc/xdg/lxsession/LXDE-pi/autostart
you access the LCD display by ipaddress/lcd.html
hope someone finds this useful
U might dial the font size down a smidge. You are cutting off a whole character there at the end.
Yeah it does that. I think it's got something to do with iOS 8.1 and above. Since is never did it before I upgraded.
Yeah I've made it smaller since posting, I'm sure there's a smarter way to get the whole thing to auto scale to any device, as it's still small ok my iPhone if I want to glance at it. But it's clutter free and works.
Just need to scour the Internet to get rid of the irritating safari can't receive Python error every 10 seconds.
@media screen and (max-width: 480px) {
.lcddisplay {
width: 480px;
height: 320px;
}
.lcddisplay .lcd-text{
float:left;
margin: 65px 16px;
}
.lcd-line{
font-size: 35px;
}
}
pi@raspberrypi ~ $ python /home/brewpi/brewpi1/brewpi.py --status
[{'cfg': ConfigObj({'scriptPath': '/home/brewpi/brewpi2/', 'wwwPath': '/var/www/brewpi2/', 'port': '/dev/brewpi2', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'My First BrewPi Run', 'interval': '120.0', 'dataLogging': 'active'}),
'pid': 2536,
'port': '/dev/brewpi2',
'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/brewpi2/BEERSOCKET'}},
pi@rpints ~ $ python /home/brewpi/brewpi1/brewpi.py --status
[{'cfg': ConfigObj({'scriptPath': '/home/brewpi/brewpi1/', 'wwwPath': '/var/www/brewpi1/', 'port': '/dev/brewpi1', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'BrewPi1%20Test4', 'interval': '120.0', 'dataLogging': 'active'}),
'pid': 3220,
'port': '/dev/brewpi1',
'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/brewpi1/BEERSOCKET'}},
{'cfg': ConfigObj({'scriptPath': '/home/brewpi/brewpi4/', 'wwwPath': '/var/www/brewpi4/', 'port': '/dev/rfcomm2', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'BrewPi4%20Test2', 'interval': '120.0', 'dataLogging': 'active'}),
'pid': 3221,
'port': '/dev/rfcomm2',
'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/brewpi4/BEERSOCKET'}},
{'cfg': ConfigObj({'scriptPath': '/home/brewpi/brewpi2/', 'wwwPath': '/var/www/brewpi2/', 'port': '/dev/rfcomm0', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'BrewPi2%20Test4', 'interval': '120.0', 'dataLogging': 'active'}),
'pid': 30528,
'port': '/dev/rfcomm0',
'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/brewpi2/BEERSOCKET'}},
{'cfg': ConfigObj({'scriptPath': '/home/brewpi/brewpi3/', 'wwwPath': '/var/www/brewpi3/', 'port': '/dev/rfcomm1', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'BrewPi3%20Test5', 'interval': '120.0', 'dataLogging': 'active'}),
'pid': 30529,
'port': '/dev/rfcomm1',
'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/brewpi3/BEERSOCKET'}}]
pi@rpints ~ $
pi@rpints ~ $ python /home/brewpi/brewpi2/brewpi.py --status
[{'cfg': ConfigObj({'scriptPath': '/home/brewpi/brewpi1/', 'wwwPath': '/var/www/brewpi1/', 'port': '/dev/brewpi1', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'BrewPi1%20Test4', 'interval': '120.0', 'dataLogging': 'active'}),
'pid': 3220,
'port': '/dev/brewpi1',
'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/brewpi1/BEERSOCKET'}},
{'cfg': ConfigObj({'scriptPath': '/home/brewpi/brewpi4/', 'wwwPath': '/var/www/brewpi4/', 'port': '/dev/rfcomm2', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'BrewPi4%20Test2', 'interval': '120.0', 'dataLogging': 'active'}),
'pid': 3221,
'port': '/dev/rfcomm2',
'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/brewpi4/BEERSOCKET'}},
{'cfg': ConfigObj({'scriptPath': '/home/brewpi/brewpi2/', 'wwwPath': '/var/www/brewpi2/', 'port': '/dev/rfcomm0', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'BrewPi2%20Test4', 'interval': '120.0', 'dataLogging': 'active'}),
'pid': 30528,
'port': '/dev/rfcomm0',
'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/brewpi2/BEERSOCKET'}},
{'cfg': ConfigObj({'scriptPath': '/home/brewpi/brewpi3/', 'wwwPath': '/var/www/brewpi3/', 'port': '/dev/rfcomm1', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'BrewPi3%20Test5', 'interval': '120.0', 'dataLogging': 'active'}),
'pid': 30529,
'port': '/dev/rfcomm1',
'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/brewpi3/BEERSOCKET'}}]
pi@rpints ~ $
SUBSYSTEM=="tty", KERNEL=="ttyACM*", ATTRS{serial}=="85336303532351F0A031", SYMLINK+="brewpi1", GROUP="brewpi"
SUBSYSTEM=="tty", KERNEL=="ttyACM*", ATTRS{serial}=="754373038303510BF870", SYMLINK+="brewpi2", GROUP="brewpi"
SUBSYSTEM=="tty", KERNEL=="ttyACM*", ATTRS{serial}=="5543131323835130B160", SYMLINK+="brewpi3", GROUP="brewpi"
SUBSYSTEM=="tty", KERNEL=="ttyACM*", ATTRS{serial}=="55431313238351104021", SYMLINK+="brewpi4", GROUP="brewpi"
Hey all,
This thread is amazing. I haven't been able to get through all the postings, but started building my own BrewPi with this method and have run into a hiccup
My Device List is not showing the 2 temp probes. I see only the devices seen in the pics attached. I have checked my circuitry and see voltage running through the 3 wires on my probes (I purchased the ones listed on the OP from ebay). I've attached a pic of my breadboard setup too for any troubleshooting help.
I apologize in advance if someone has asked this and gotten a reply in the thread. It's long and I didn't get through all of it, but if it has been answered, if you can point me to the right thread, I would appreciate it.
Thanks!
Enter your email address to join: