/srv/brew Brewing Co.
  • Home
  • Recipes/Brew Notes
  • Blog
  • Home
  • Recipes/Brew Notes
  • Blog

Use an Old Phone as a BrewPi Display

4/22/2015

17 Comments

 
Picture
I recently got my BrewPi up and running, and thought it would be nice to have a display. Most people do this with an LCD display, but I was thinking to myself, I have an old phone, why not use that? This also gives you more flexibility, since you don't have to be tied to your fermentation chamber. Once I rebuild my keezer/bar, I want to display my upcoming beer, and my fermentation chamber will be in a different room. You can even use it to adjust your temps and everything, since it is, after all, a phone. I doubt I'm the first one to do this, but a couple quick Google searches didn't show anything, so I figured it was blog worthy.

The process is fairly simple and shouldn't take more than a few minutes. Basically, I created a tweaked version of the LCD display on the BrewPi webui, and we will access it with our phone. Easy peasy.

First, wipe your phone, or prepare it in any way you wish. Now, install Dolphin Browser on your phone. It is a free, cross-platform web browser that runs on old phones (I'm using Motorola's original Droid) and allows us to run the browser in full screen mode, so it looks like a real display. It will also keep the screen awake. Very important.

Now, grab my LCD code. On your BrewPi, do the following (replace the path with wherever you installed the BrewPi webui, if you are using the older Debian Wheezy, it is /var/www/):

sudo wget http://pastebin.com/raw.php?i=6ZX7hRLF -O /var/www/html/lcd.php
Now, fix the permissions:
sudo chown www-data:www-data /var/www/html/lcd.php
sudo chmod 654 /var/www/html/lcd.php
Ok. All that's left to do is to fire up Dolphin on your phone, and go to http://brewpi/lcd.php (or the IP address/hostname of your BrewPi). Pretty neat, huh? It's a good idea to set this as your homepage, so it's easy to get back to. You can adjust the size of the text by editing the font size on line 81 of /var/www/lcd.php. Adjust it, save it, and refresh Dolphin until the text fills your screen.

All that's left to do is change a couple settings in Dolphin for our use case. Go to Settings (Depending on your Android version, you may have to either click the settings/menu dots or the Dolphin to get to settings.) -> Advanced -> Customize -> More and select "Keep Screen On".  Then, click either Control Panel, or the puzzle piece and click Full Screen. If the URL bar is still showing, just go into the settings and back out, and it should go away. Now just mount your phone wherever you want to view your fermentation chamber status and plug in a charging cable. Have a homebrew, we're done!

If you found this helpful, let me know in the comments.
17 Comments
Scott link
1/24/2016 05:52:02 pm

I realize this blog post is almost a year old. However, I wanted to say thanks. I recently built a brewpi and was having trouble with the LCD construction. I wasn't even sure what I was going to mount the display in. I followed the directions and have a great LCD display via a galaxy s3 that hasn't been used in a long time. Thanks again for sharing!

http://scottbrewing.ddns.net/lcd.php

Reply
Robert
3/11/2016 02:50:26 pm

Hi,
I would like to try this with my old phone. Where would I find the LCD code.
Thanks

Reply
John Wesorick
3/11/2016 02:58:31 pm

It's right here, http://pastebin.com/raw.php?i=6ZX7hRLF. That "sudo wget" line downloads it to the right location.

Reply
Robert
3/11/2016 07:57:06 pm

I'm new to all this and with your direction, things started to come together, Got it working.
Thanks

Craig
4/25/2016 07:59:22 pm

Just curious.. Could this work with an old iphone4? I believe I can get dolphin for it and therefore it just needs to be able to access the internet I believe.

Reply
John Wesorick link
4/25/2016 08:49:50 pm

Should work just fine. Basically the only reason I use Dolphin is because it has the option to keep the screen awake. If you have some way to do that, you can use any browser you want. The device doesn't really matter either.

Reply
Craig Lefebvre
5/27/2016 06:42:54 am

Just a quick question. This will not replace the current web interface with only the lcd screen? It will just create another page that only has the lcd? Therefore I will be able to pull up the standard web page when I want to change settings etc by typing in the IP and with my phone pull up the lcd page to display the screen. Im sure if I knew more about code and programming I would be able to tell this by looking at it. What would the address be of the lcd only screen?

Reply
John Wesorick link
5/27/2016 07:01:20 am

Correct. This just adds a web page to your BrewPi, it does not replace anything. It says in the instructions, but as long as you follow them, the address of your "LCD" would be http://brewpi/lcd.php, replacing brewpi with whatever your BrewPi address is. Cheers!

Reply
Jeff
6/16/2016 04:47:08 pm

Thanks heaps for this it works brilliantly.
It is very simple to follow and complete.
It also makes good use of an old device and is so much easier than wiring in an LCD.

As a note for my particular install:
I am using Raspbian Jessie and the BrewPi webui files were in a slightly different folder for me
/var/www/html

This changes the download, chown and chmod folder locations to
/var/www/html/lcd.php

Looks like this has changed from Wheezy to Jessie

Reply
John Wesorick link
7/1/2016 06:43:44 am

I'm glad you found this useful. I was going to build an LCD, but then I had this idea.

Thanks for the heads up on the path change in Jessie. I updated the post and noted the path for Wheezy.

Reply
Jeff
11/1/2016 03:54:36 pm

Hi John,

I have now set this up as a permanent display on a 3.5" PiScreen. I boot my Pi into a kiosk style mode using Midori browser full screen pointing to localhost/lcd.php and it's working a treat.

I now have a room sensor attached to the BrewPi and the display of this value is cycled/toggled with the Fridge Temp/Setting line.
This is how it is also displayed in the LCD part on the top left of main brewpi html page.
Is there any way to separate this so that room temp and Fridge values each have their own line?

I am a complete novice with HTML and have had no luck finding where the values are read/received.
I can't even see in the main page source code where the values are input and cycled in the lcd display section.

I would appreciate if you could let me know if you think this might be possible.

Jeff

Mic
8/4/2016 01:50:04 am

Thanks for sharing this. I haven't had any luck with the LCD addon - Will be trying this method this afternoon :)

Reply
LCB
9/16/2016 05:49:29 am

A change folks may want to consider is changing line 93:

From:

<span class="lcd-line2" id="lcd-line-4"><?php echo wordwrap("Fermenting: " . urldecode($beerName), 21);?></span>

To:

<span class="lcd-line2" id="lcd-line-4"><?php echo substr("Brew: " . urldecode($beerName), 0, 21);?></span>

This will do two things:

1. Not wrap the name of the brew but truncate it. This prevents long names from blowing up the format/size.

2. Adds capacity for 7 more characters in the name of the batch.

Reply
John Wesorick link
9/16/2016 06:54:15 am

Thanks for your input and help. It probably would make a lot more sense to change it from "Fermenting" to "Brew". Really, you could take "Fermenting: " out altogether and it'd still look fine. It's by design that it wraps instead of truncates, but I haven't had any issues with running out of space for a beer name. I think it handles up to 48 characters right now. You must have some pretty long ones. Cheers!

Reply
Tim
10/2/2016 05:43:28 am

Has the lcd code been moved? I cant seem to download it?

Reply
Lee Bussy
10/2/2016 05:46:56 am

Still in the same place posted above:

http://pastebin.com/raw/6ZX7hRLF

Reply
MattY
1/28/2017 07:10:10 am

Dude! Nice brewpi mod! :)

Reply



Leave a Reply.

    Archives

    December 2017
    April 2015
    December 2014

    Categories

    All
    Yeast

    RSS Feed

Powered by Create your own unique website with customizable templates.