[Version 2 Release] RaspberryPints - Digital Taplist Solution

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Yes, the K indicates a kicked keg - but iirc the backend (pours.php) ignores that.
The sketch has a filter for this, when the pulse count is high enough in a short time frame the assumption is the keg went empty and it's just gas blowing through the meter.

The fact that minicom can connect to ttyAMA0 and receive pour messages surely means you have the hardware squared away. Why we can't get flow_monitor.py to grab the same info escapes me.

Any chance there's a baud rate mismatch at the bottom of this?

Cheers!
 
Im sure there very well could be a baud mismatch.. How and where would I go about remedying that? It says 9600 in both flow_monitor.py and in my INO sketch. I have tried even matching this line in /boot/cmdline.txt to 9600 instead with no appreciable difference?

dwc_otg.lpm_enable=0 console=tty1 console=serial0,115200 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
 
Yessssss its working!!! To get it working on a pi3 withthe arduberry I had to make my cmdline.txt read

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

Then I had to update the serial begin rate on my .INO sketch on the arduberry and my flow_monitor.py to 38400

Then in /boot/config.txt I had to put the following to disable bluetooth enable serial and set the baud rate
dtoverlay=pi3-miniuart-bt
init_uart_baud=38400
dtparam=uart0_clkrate=48000000

Thats it and it worked!!! sooooo happy and I have no idea why it wouldn't work at a baud of 9600 as I even tried changing init_uart_baud=9600 but it would only work at 38400???? maybe the pi3 is too fast for that slow rate?
 
I'm having a problem with step 7 and using day_trippers pages.

I have tried both of these:

If you want to keep the document root at /var/www/html you have to change a pointer in the Python listener.

Edit /var/www/html/python/flow_monitor.py
Find these two lines:

# Edit this line to point to where your rpints install is
poursdir = '/var/www'

Change /var/www to /var/www/html



If you want to change the document root to /var/www, don't change the Python listener pointer, but instead change the Apache2 config file.

Edit /etc/apache2/sites-available

and change DocumentRoot setting from /var/www/html to /var/www.



When I try to change the directory to /var/www I get the following error:

Error: No write permission for file "/etc/apache2/sites-available"

When I try to change the /var/www/html/python/flow_monitor.py I get the following error"
Error: no write permission for file "/var/www/html/python/flow_monitor.py"

I read online to run the following command to change permissions but don't know if it worked. i tried running day_trippers commands both before and after running the following command with the same results:

sudo chown -R pi:www-data /var/www/html
 
Shouldn't need to change the permisssions. Just run sudo in front of your command.

Example
Sudo nano /etc/apache2/........
 
I ran sudo edit /etc/apache2/sites-available
and it returned:
Error: no "Edit" mailcap rules found for type "inode/directory"

If i run sudo nano /etc/apache2/sites-available, it says that is a new directory, but there is nothing to edit.

If I run sudo edit /var/www/html/python/flow_monitor.py, it returns
Error: no write permission for file "/var/www/html/python/flow_monitor.py"

Should I be installing the Raspberry Pints Hotfix-2.0.1 before trying to modify these. When I read day_tripper's update, it looks like I should modify the file or directory before installing 2.0.1.

Assistance appreciated.
 
I don't know anything about a hot fix or updating to version two but from what it sounds like you are trying to do is edit a file. To my knowledge the command you are using called "edit" doesn't do anything. You need to use a command line text editor software like vi or nano. The sudo in front runs the command as administrator giving you root privilege.


Example to edit flow_monitor.py

Sudo nano /var/www/html/python/flow_monitor.py

As far as your first command the edit doesn't do anything and secondly you're not pointing to a specific file to edit the address you typed is just a directory. You need to edit the .conf file in that directory. Look up some YouTube videos of basic Linux knowledge like how to navigate list copy edit and delete files and directories. Most the instructions on these types of things assume that base knowledge a few YouTube videos and you will be set..
 
I ran sudo edit /etc/apache2/sites-available
and it returned:
Error: no "Edit" mailcap rules found for type "inode/directory"

If i run sudo nano /etc/apache2/sites-available, it says that is a new directory, but there is nothing to edit.

Do this:

cd /etc/apache2/sites-available

then:

dir

The directory command will list the files in the directory. I don't immediately recall what the full file name is, but it starts with 000.

You'll want to :

sudo nano 000(filename)


If I run sudo edit /var/www/html/python/flow_monitor.py, it returns
Error: no write permission for file "/var/www/html/python/flow_monitor.py"

Should I be installing the Raspberry Pints Hotfix-2.0.1 before trying to modify these. When I read day_tripper's update, it looks like I should modify the file or directory before installing 2.0.1.

Assistance appreciated.

So,

Sudo = Super User DO - Basically it gives you admin privileges.

nano = basic Linux text edior - when you "nano" something it's the same as the old DOS 'edit' command.

Linux takes a little getting used to - especially for an old salt like me, but if you ever played around with DOS it's not all that different. Honestly, the more I use it, the more I like it.


As for your last question, if you downloaded version 2.0.1, no, you won't need the hotfix. The hotfix was only for early adopters of the program.
 
Ok getting bit closer I hope.

I went to https://github.com/RaspberryPints/RaspberryPints/releases and got the Hotfix 2.0.1 flow meter support
once it downloaded, i clicked on show in folder and it shows me the file at
/home/pi/Downloads/RaspberryPints-2.0.1.zip. and RaspberryPints-2.0.1.tar.gz
So I know the file is in the right place.

Next I executed the command:
unzip RaspberryPints-2.0.1.zip
and it said :
unzip: cannot find or open RaspberryPints-2.0.1.zip, RaspberryPints-2.0.1.zip.zip or RaspberryPints-2.0.1.zip.ZIP.

In the terminal, I am able to use cd /home and see the pi directory under the home directory, but when I try to get to the pi directory it closes the /home directory and is back to pi@raspberrypi: $

Thanks
 
Ok getting bit closer I hope.

I went to https://github.com/RaspberryPints/RaspberryPints/releases and got the Hotfix 2.0.1 flow meter support
once it downloaded, i clicked on show in folder and it shows me the file at
/home/pi/Downloads/RaspberryPints-2.0.1.zip. and RaspberryPints-2.0.1.tar.gz
So I know the file is in the right place.

Next I executed the command:
unzip RaspberryPints-2.0.1.zip
and it said :
unzip: cannot find or open RaspberryPints-2.0.1.zip, RaspberryPints-2.0.1.zip.zip or RaspberryPints-2.0.1.zip.ZIP.

In the terminal, I am able to use cd /home and see the pi directory under the home directory, but when I try to get to the pi directory it closes the /home directory and is back to pi@raspberrypi: $

Thanks

When you first open terminal it will open in /home/pi whereas your downloaded files are located in /home/pi/Downloads, so all you need to do is first type:
Code:
cd Downloads
(cd = change directory), then type:
Code:
unzip RaspberryPints-2.0.1.zip
 
finally got the tap list working, but on the my taps, it asks for keg number and has a select one box. When I click it the only option is "Select One" so I can't select a keg number. What am I missing.
 
finally got the tap list working, but on the my taps, it asks for keg number and has a select one box. When I click it the only option is "Select One" so I can't select a keg number. What am I missing.

You need to add kegs first (and beers) before you can tap them.

Go to the 'My Kegs' page first to add kegs
 
Ok, I'm adding the flow meters. I followed all the steps in Step 9 for editing the raspberrypints.ino file. I was able to go under tools Board and select alamode, but when I go to Tools the Serial Port is grayed out so I can't select it. Only Serial Monitor is available. If I select that, the following appears in the orange line:
Serial port 'COM1' not found. Did you select the right one from the Tools > Serial Port Menu? How do I fix the Serial Port so it's not greyed out. I am running an rpi2 with Jessie and rpints 2.0.1. I followed day_trippers guidance for running dos2unix, but I'm not sure where to go from here.

Thanks in advance for the help.
 
Ok, I'm adding the flow meters. I followed all the steps in Step 9 for editing the raspberrypints.ino file. I was able to go under tools Board and select alamode, but when I go to Tools the Serial Port is grayed out so I can't select it. Only Serial Monitor is available. If I select that, the following appears in the orange line:
Serial port 'COM1' not found. Did you select the right one from the Tools > Serial Port Menu? How do I fix the Serial Port so it's not greyed out. I am running an rpi2 with Jessie and rpints 2.0.1. I followed day_trippers guidance for running dos2unix, but I'm not sure where to go from here.

Thanks in advance for the help.

Sure it's a RP2 and not an RP3?
 
yes. I purchased the RP2B before anybody had RPints running on a RP3. I've had it for several months now and am just getting around to building it. I also had to purchase a USB wifi adapter and a USB keyboard/mouse.
 
Here's the rollup from day_tripper on what you have to do to get rpints working on Jessie.

The RaspberryPints installation procedure as documented was developed using Raspbian Wheezy on RPiB and RPi2B platforms.
Since then, the warty Raspbian Jessie became the defacto standard, the RPiB and RPi2B faded into history, and the RPi3 implementation broke many paradigms.
One of which was to commandeer the hardware serial port for use by wifi and bluetooth modules on the RPi3.
This leaves a software serial port for use by devices such as the AlaMode.

To get an AlaMode working with RaspberryPints on an RPi3, do the following:

- Follow the full RaspberryPints installation up to Step 6 (don't execute what's shown).

- Install DOS2UNIX (a conversion tool to make text files written on Windows platforms more "unix-y"):

$ sudo apt-get update
$ sudo apt-get install dos2unix

- Disable Serial Port messaging:

Edit /boot/config.txt
Change enable_uart=0

- Now, fetch the Alamode setup kit:
wget https://github.com/wyolum/alamode/ra...e-setup.tar.gz

- Unpack it from your /home/pi folder:
pi@raspberrypi ~ $ tar -xvzf alamode-setup.tar.gz

- Change focus into the kit you just unpacked:
pi@raspberrypi ~ $ cd alamode-setup

- Run DOS2UNIX against the setup file for Jessie:

$ sudo dos2unix jessie-setup

- Execute the converted script:

$ sudo jessie-setup

- Re-start the RaspberryPi before continuing

- Continue the installation procedure from Step 7 as shown on the raspberrypints.com page, noting the applicable changes listed in this post.

I did everything but edit the boot.config file. I believe that was for the RP3 only.
 
Here's the rollup from day_tripper on what you have to do to get rpints working on Jessie.

The RaspberryPints installation procedure as documented was developed using Raspbian Wheezy on RPiB and RPi2B platforms.
Since then, the warty Raspbian Jessie became the defacto standard, the RPiB and RPi2B faded into history, and the RPi3 implementation broke many paradigms.
One of which was to commandeer the hardware serial port for use by wifi and bluetooth modules on the RPi3.
This leaves a software serial port for use by devices such as the AlaMode.

To get an AlaMode working with RaspberryPints on an RPi3, do the following:

- Follow the full RaspberryPints installation up to Step 6 (don't execute what's shown).

- Install DOS2UNIX (a conversion tool to make text files written on Windows platforms more "unix-y"):

$ sudo apt-get update
$ sudo apt-get install dos2unix

- Disable Serial Port messaging:

Edit /boot/config.txt
Change enable_uart=0

- Now, fetch the Alamode setup kit:
wget https://github.com/wyolum/alamode/ra...e-setup.tar.gz

- Unpack it from your /home/pi folder:
pi@raspberrypi ~ $ tar -xvzf alamode-setup.tar.gz

- Change focus into the kit you just unpacked:
pi@raspberrypi ~ $ cd alamode-setup

- Run DOS2UNIX against the setup file for Jessie:

$ sudo dos2unix jessie-setup

- Execute the converted script:

$ sudo jessie-setup

- Re-start the RaspberryPi before continuing

- Continue the installation procedure from Step 7 as shown on the raspberrypints.com page, noting the applicable changes listed in this post.

I did everything but edit the boot.config file. I believe that was for the RP3 only.

Firstly did you run:
Code:
$ sudo jessie-setup
or
Code:
$ sudo ./jessie-setup

Secondly, because you are on Jessie you'll still need to edit /boot/config.txt
(change enable_uart=0 to enable_uart=1), then do a sudo restart.

Let me know how you go?

Cheers,

Kal
 
Open terminal and hit the up button on your keyboard to scroll backwards through your history until you get to that command. Worth confirming at this point.
 
I ended up starting the install from scratch, but I have a question. It seems like when I go in and set a static IP for the pi, I have constant intermitent internet connection. When I did set the static IP and rebooted the system, during the reboot it started running a long string of numbers across the monitor is that normal, or did something get stuck in a loop?

Is it necessary to set a static IP if I do not intend to access the rpi from other sources?
 
I ended up starting the install from scratch, but I have a question. It seems like when I go in and set a static IP for the pi, I have constant intermitent internet connection. When I did set the static IP and rebooted the system, during the reboot it started running a long string of numbers across the monitor is that normal, or did something get stuck in a loop?

Is it necessary to set a static IP if I do not intend to access the rpi from other sources?

Setting up static IP on Jessie (and Stretch for that matter) has changed since the Wheezy based instructions on the RPints site.

Here's a snippet from my forthcoming "How to Setup RPints on Stretch Guide" that I'll post once the last remaining issue with the Alamode has been resolved:

To set a static IP address you now need to edit the dhcpcd.conf, type the following command:

Code:
sudo nano /etc/dhcpcd.conf

Then scroll down to the bottom and enter the following:

Code:
interface wlan0
static ip_address=192.168.1.31/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8 8.8.4.4

Substituting 'static ip_address=192.168.1.31' & 'static routers=192.168.1.1' to match your local network, and if connecting via ethernet instead of wifi change 'interface wlan0' to 'interface eth0'

Give that a go.

Cheers,

Kal
 
I've almost been doing that. The only thing I didn't do was the /24 at the end of the IP. Here's the steps I've been following:

The first step is to find out your default gateway IP. This is the local IP address of your network router. The computers on your network use it to communicate with the router and access the internet. If you already know what it is, just skip this step. If not, do continue…

Power up and log into your Raspberry Pi via WiFi or ethernet, then enter route -ne at the command prompt to see your network routing information:



Under the “Gateway” column, you can see your default gateway IP. The “Iface” column lists the names for each connection – ethernet (eth0) and WiFi (wlan0). Write down your default gateway IP, we’ll need it in a minute.

Now we need to find out the IP addresses of your domain name servers. Your Pi sends the domain names you enter into your browser (i.e. www.google.com) to domain name servers, which convert the domain names to IP addresses (i.e. 8.8.8.8). Your Pi then uses the IP address to access the website’s server.
Enter cat /etc/resolv.conf at the command prompt to find the list of domain name servers:



Copy these IP addresses to a text editor on your PC or write them down for later.
Now we’re ready to configure the network settings. By default the Pi is configured with a dynamic IP address. To assign it a static IP address, you need to add your static IP, default gateway IP, and domain name servers to the dhcpcd.conf file.

At the command prompt, enter sudo nano /etc/dhcpcd.conf to edit the dhcpcd.conf file:


Now, without changing anything else in the file, add this code at the bottom of the dhcpcd.conf file, replacing the IP addresses with your own IP addresses found above:

interface eth0
static ip_address=192.168.1.100
static routers=192.168.1.254
static domain_name_servers=192.168.1.254 2600:1700:74a0:98c0::1

interface wlan0
static ip_address=192.168.1.99
static routers=192.168.1.254
static domain_name_servers=192.168.1.254 2600:1700:74a0:98c0::1

• static ip_address: This is the static IP address you’ll use to SSH or remotely connect to your Pi. Take your default gateway IP (found in the steps above), and change the last number to any other number between 0 and 255.
• static routers: This is your default gateway IP address.
• static domain_name_servers: These are the IP’s we found in the resolv.conf file above. Separate each IP with a single space.


For example, my default gateway IP address is 10.0.0.1. To get the static ip_address for my ethernet connection (eth0), I replaced the 1 with 100 to get 10.0.0.100. To get the static ip_address for my WiFi connection (wlan0), I replaced the 1 with 99 to get 10.0.0.99. I’ll use these IPs to log in to my Pi from now on.

Once you’ve replaced the IP addresses in the example code with your own IP addresses, press Ctrl-O and press enter then press Ctrl-X to exit the dhcpcd.conf file. Now enter sudo reboot to reboot the Pi. Log in with your new static ethernet IP or static WiFi IP.

When the rpi reboots, a string of numbers scroll down the monitor for some time. After the numbers scrolled for over 10 minutes, I got impatient and unplugged the power from the pi, then plugged it back in and it would finally reboot so i could continue. That may be why internet was sporadic on the pi. I just don't know if the scrolling numbers were updating something or if the pi OS got caught in a loop.
 
Humm,

Since I'm starting over, I wonder if I should wait until you publish the guide and use php7 with stretch. Will it work on the rpi2 or is it rpi3 specific?
 
Humm,

Since I'm starting over, I wonder if I should wait until you publish the guide and use php7 with stretch. Will it work on the rpi2 or is it rpi3 specific?

My initial testing on my RPi 2 was that it struggled a bit with Stretch, so I'd stick with Jessie, or even Wheezy for that matter: https://downloads.raspberrypi.org/raspbian/images/raspbian-2015-05-07/2015-05-05-raspbian-wheezy.zip (at least with Wheezy you could follow the original RPints guide to the letter and not need to worry about the Jessie specific configuration).

If you really want to move to a later distribution, it might be worth upgrading your hardware to a RPi3 (they are much more powerful and have wifi/bluetooth inbuilt).
 
it seems like every time i assign a static ip for wifi, I lose internet capability. I can't Ping in a terminal, and I can't get anywhere in a web browser.
 
it seems like every time i assign a static ip for wifi, I lose internet capability. I can't Ping in a terminal, and I can't get anywhere in a web browser.

Revert your static IP changes, reboot, then type this in:
Code:
ifconfig

Look for a line like this in the wlan0 section output:
Code:
inet addr:192.168.1.31  Bcast:192.168.1.255  Mask:255.255.255.0

Let me know what you get?

Cheers,

Kal
 
Revert your static IP changes, reboot, then type this in:
Code:
ifconfig

Look for a line like this in the wlan0 section output:
Code:
inet addr:192.168.1.31  Bcast:192.168.1.255  Mask:255.255.255.0

Let me know what you get?

Cheers,

Kal
inet addr:192.168.1.139 Bcast:192.168.1.255 Mask:255.255.255.0

It shows I have a connection, the USB wifi is blinking, but when I type either ping www.google.com or sudo ping www.google.com, it shows I have a connection, but when I hit Cntl-C it says 20 packets transmitted, 4 received, 80% packet loss, time 25617ms. That doesn't seem very reliable. It's still configured for dhcp.
 
Kal,
I think it's some sort of wifi issue. I just plugged in my Ethernet cord and have no problem.
Gary
 
Kal,
I'm not a big IT guy. So not sure what's going on, but now even with the Ethernet cable plugged in. shows eth0: Configured 169.254.191.221/16. But when I run ping www.google.com i get the following response:

ping: unknown host www.google.com

It appears as I'm not getting any internet connectivity. Any ideas?

Thanks.
 
Ok, So in order for me to get wifi or ethernet to work, I have to unplug and replug in either the usb wifi or the ethernet cable to get my internet to work again. Any ideas why this is happening?

Thanks.
 
Ok, So in order for me to get wifi or ethernet to work, I have to unplug and replug in either the usb wifi or the ethernet cable to get my internet to work again. Any ideas why this is happening?

Thanks.

Okay looks like your internal IP range is similar to mine, try these settings:

Code:
interface wlan0
static ip_address=192.168.1.175/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8 8.8.4.4

Then:

Code:
sudo reboot

You should now have static IP on wifi.

Cheers,

Kal
 
Big shout out to all our HBT brothers and sisters in Florida at the moment, stay safe you're in our thoughts!

Cheers,

Kal
 
I can pull up the sample data taplist, but when I try to go to login on the admin page it takes me to the page "http://localhost/admin/includes/checklogin.php" and I get the error "cannot connect to server". I Has anyone had this issue?
 
I can pull up the sample data taplist, but when I try to go to login on the admin page it takes me to the page "http://localhost/admin/includes/checklogin.php" and I get the error "cannot connect to server". I Has anyone had this issue?

That means you are tripping up here:
PHP:
mysql_connect("$host", "$username", "$password")or die("cannot connect to server");

Need to know a little bit more about your install steps, what version of NOOBS/Raspbian are you using, did you get any errors during the install process on this step:
Code:
sudo apt-get -y install apache2 php5 mysql-client mysql-server php5-mysql phpmyadmin

Anything non-standard in your install steps, etc?

Cheers,

Kal
 
I am actually attempting to get it up and running on a dell server. I am assuming its a communication issue with sql server. Its a Windows server 2012R2 running IIS to manage the website source code for RPints. I'm running SQL Server 2008R2.
 
I am actually attempting to get it up and running on a dell server. I am assuming its a communication issue with sql server. Its a Windows server 2012R2 running IIS to manage the website source code for RPints. I'm running SQL Server 2008R2.

The fact that you can get the sample taplist data up suggests that the database viewing username and password is working: http://raspberrypints.com/byo/step-8-rpints-configuration-wflow-meters/, so I'm wondering if you setup a root username and password for the server during the installation process at around this step http://raspberrypints.com/byo/step-4-package-installation-wflow-meters/?

It's all a guess at this point but you could try these steps to set your username and password on the server: https://superuser.com/questions/730994/default-sa-password-of-sql-server-automatically-installed-by-sharepoint-server-2

Cheers,

Kal
 
I figured it out. RPints didn't like me using sql server 2008. I installed MySQL and had to use a different port for sql 2008 to get it to work as they both wanted to use 3306.
 
Back
Top