[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.
I am going nuts here trying to get my rPI and Arduino Uno to register pours. I have read this thread many times and I am hoping I am doing something dumb... I have adafruit meters. I have the red wire plugged into 5v. Black to GND and the yellow to a digital pin 2.

I followed all the setup, sketch is on my arduino uno and it is connected via serial usb to my rpi. They can communicate well.

If I run sudo /etc/init.d/flowmon status, I get:

Code:
sudo /etc/init.d/flowmon status
 flowmon.service - LSB: Put a short description of the service here
   Loaded: loaded (/etc/init.d/flowmon)
   Active: active (exited) since Tue 2017-06-20 03:14:55 UTC; 30min ago

Jun 20 03:14:55 raspberrypi flowmon[8638]: Starting system RPFlowMon daemon:.
Jun 20 03:14:55 raspberrypi systemd[1]: Started LSB: Put a short description of the servi...re.
Hint: Some lines were ellipsized, use -l to show in full.

I try stopping the flowmon service then manually doing this: sudo python /var/www/html/python/flow_monitor.py and it just sits at a blank screen, even when I run pours.

Does anybody know any advanced steps I can take to troubleshoot this? Any shortcut I can take to simulate a pulse on the digital pin for testing?

Thanks
 
You're very close.

An Alamode connects to the RPi via a true serial port, and is recognized as device /dev/ttyS0.
If you are using an Uno connected via USB it will typically appear as device /dev/ttyACM0.
So, you need to change the device call-out that R'Pints uses from /dev/ttyS0 to /dev/ttyACM0.

Your /var/www/python/flow_monitor.py should look like this:

Code:
#The following line is for serial over GPIO
#port = '/dev/ttyS0'
#The following line is for serial over USB
port = '/dev/ttyACM0'

Make the change, reboot the RPi, and you should be in good shape...

Cheers!
 
Yep, all working now! Thanks! Now I just need to get these adafruit meters pulse count to match up hehe :D
 
Post #1353 shows 1500 is the right pulse count. I tested it with mine and that was the closest I saw in test pours. I'll verify the number when I get home.

Problem I'm having is now with everything installed my flow meters are not working. Might be the run of CAT5 cable I used. Everything worked on bench testing but now no flow counts. I think I'll use different wiring and see. Just sucks as I soldered all the wiring.

Anyone using the Temp probe portion have issues with the scrolling temp not updating on the Tap list? If I hit F5 it updates but I want it automated. Must be some code I'm missing.
 
It will update on pours. I don't know how long your cat5 run is, that could be the problem. my flow meter wires are only about 15" long and my arduino is in the fridge with everything else communicating over Bluetooth to the pi.
 
I think my issue is the length of CAT5 I have. I'll try replacing just one of the sensor wires with a larger gauge wire than the CAT5 cable to see if that fixes it before I tear it all apart.
 
fwiw, between the meter leads themselves (3 feet), the keezer lid wiring harness, the external cable and the wire internal to my system controller located in the dolly, my meters have roughly 13 feet of wire, and have never had an issue. The last keg kicked four ounces after R'Pints said it was empty.

Any chance the meter is plumbed backwards?

Cheers!
 
[...]Anyone using the Temp probe portion have issues with the scrolling temp not updating on the Tap list? If I hit F5 it updates but I want it automated. Must be some code I'm missing.

Add a refresh meta tag to your raspberrypints index.php, right below the title line as shown.

Code:
<html>
	<head>
		<title>RaspberryPints</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="refresh" content="300">

The time period is in seconds.
I run the logger with a five minute cycle time set via the crontab entry so that lines up...

Cheers!
 
If there's no response then the AlaMode isn't working properly. Double-check the ino file and make sure when uploading the sketch that there weren't any errors. Re-check your meter wiring for all three connections (btw, which meters are you using) being sure that the data connection is to one of the pins you've enabled in the sketch...

Cheers!

Something is not right with the AlaMode upload.

After it runs through a lot of logging it finishes with:

Code:
        Using Port                     :   /dev/ttyS0
        Using Programmer              :   alamode
        Overriding Baud Rate          :   115200
avrdude:  Send:  0  [30]    [20]
avrdude:  Send:  0  [30]    [20]
avrdude:  Send:  0  [30]    [20]
avrdude:  ser_recv():  programmer is not responding
avrdude:  stk500_recv():  programmer is not responding

avrdude done.  Thank you.

And then it tells me "Problem uploading to board"

It seems to not be finding it on the serial port??

I only have the GPIO piggybacked and I have power supplied through it with the jumper switched to ON for the 5v link.
 
Ok, that would explain a lot.

I did an R'Pints install on Jessie just for grins, but it was 2 weeks short of one year ago.
This is a clip from the system log for that RPi2B machine, hopefully you can glean something from it.

Code:
Install DOS2UNIX:
$ sudo apt-get update
$ sudo apt-get install dos2unix

Download AlaMode Setup:
$ wget https://github.com/wyolum/alamode/raw/master/bundles/alamode-setup.tar.gz

Unpack AlaMode setup kit:
$ tar -xvzf alamode-setup.tar.gz

Change focus:
$ cd alamode-setup

Run DOS2UNIX on jessie-setup:
$ sudo dos2unix jessie-setup

Execute jessie-setup:
$ sudo ./jessie-setup

Edit /boot/config.txt
Change enable_uart=0

Run Arduino IDE, configure board as AlaMode on TTYS0, upload INO sketch.

hth!

Cheers!
 
Day_Tripper thanks for the Meta Refresh tip for the temp it worked.

As for the flow meters I rewired one with thicker gauge wire vs the CAT5 cable and I'm now registering pours!! Now the only thing to do is rewire the rest and sit back an enjoy the beer.

Thanks for the help.
 
Excellent. Always happy to help :mug:
I am surprised about the Cat5, these meters draw very little current so wire gauge should be a non-issue...

Cheers!
 
Excellent. Always happy to help :mug:

I am surprised about the Cat5, these meters draw very little current so wire gauge should be a non-issue...



Cheers!


The question is was he running cat 5 or using ready made Ethernet cables. if they were crossover cables then nothing would work.
 
Wasn't a crossover cable. I had stripped off both ends and used the bare wires soldered to meter wires. Of course I switched the cable for a thicker gauge wire. On the test with just one it worked. After I rewired my meters they are not working yet again. Not sure what my issue is at this point.
 
So I think I have narrowed down my issue. After pulling all the wiring and rewiring and still not having any luck I pulled one flow meter to bench test and it work...

I'm using the cheap flow meters and I noticed with short pours it will not register. I rewired them back up and if I take a full pour so far on two meters they register. I'll have to do some more drinking to do and keep testing and see if they are working..

More to follow..
 
Wasn't there a setting somewhere about a minimum number of ticks before a pour was registered in order to "filter" out phantom pours? He's using the Adafruit meters which have less resolution per pour. Does the minimum pour setting need to be increased to register a partial pour on those meters?
 
lol - you're on a mission! :rockin:

Which meters are you trying to use?
And are you feeding them a beer line under typical dispensing pressure?

Cheers!

I'm using the Adafruit meters from Amazon. And yes I'm using them under normal dispensing pressure. I didn't have issues doing pours when I bench tested them but I was doing full pours to check the calibration.

So I did some looking around and being the web browser packrat I am I found an open tab that had my answer. Post 1382 of this thread talks about changing line 68 of the sketch for the raspberrypints.ino to register pours with less accurate flow meters. changed it from 100 to 35 and made some short pours and is working and that was on a tap I hadn't used before in testing.

:mug:

I think I have this thing working!! :ban:
 
can i built an raspberry pints with raspberry pi 3 and alamode (is alamode competible with pi3?)? is there any other option except alamode
 
The AlaMode is allegedly compatible with the RPi3 (it's definitely compatible with the A, B, B+ and 2B).
But, frankly, unless you have a packaging concern that makes the stacking AlaMode desirable, I'd go with an Uno connected via USB and pocket the substantial savings.

The code to support it is already cooked into RaspberryPints (trivial device reference change) and I've tested it already...

Cheers!
 
I have a pi3 and used the ardunio uno R3 as I couldn't find alamode anywhere for a decent price. Mine is connect via USB.
 
Still having problems with RPi3 and the AlaMode.... Thinking about just picking up an Uno to rid the headache. I'm not able to upload the sketch to the AlaMode.
 
Did you do this:

Code:
Edit /boot/config.txt
Change enable_uart=0

From all accounts on the Wyolum Forum for the Alamode, the RPI3 serial port must be set to disabled for the Alamode to work. You can use the above fix or go in the Jessie setup Menu > Preferences > Raspberry Pi Configuration > Interfaces to disable "Serial".

And, again, you have to run DOS2UNIX on the jessie-setup file before executing it to be sure all the commands actually run. Either that or run each command in a terminal session...

Cheers!
 
I just went back to double check things and I can't get jessie-setup to run.

I ran it through dos2unix and it appeared to work fine, but then it wouldn't execute.

I'll try running them all manually.

EDIT: Ran all the commands manually, everything went fine there. Unfortunately, still hanging on upload in Arduino IDE.
 
I just got a working version going and wanted to say 'THANK YOU' to The Dev team and to Day-trippr! This is really cool and I'm looking forward to mounting my display on my freezer door. :)

I got my motion sensor working, but can't seem to find a good setting that will actually put the monitor in low-power mode. Have you guys figured this out or is your monitor just on with a screensaver or blank screen?

Thanks again!

EDIT: There were several changes from the installation instructions posted on the site, the main headache I had was getting the autostart to work! In Jessie, there's apparently a new location for the autostart, which took me forever to find out. Also, there's a new tag for chromium to start in full screen mode, so you don't have to put it into kiosk mode anymore.
 
EDIT: There were several changes from the installation instructions posted on the site, the main headache I had was getting the autostart to work! In Jessie, there's apparently a new location for the autostart, which took me forever to find out. Also, there's a new tag for chromium to start in full screen mode, so you don't have to put it into kiosk mode anymore.

Could you share this information for those who are using Jessie and the new chromium tag.
Thanks :)
 
Well after reading through what seems like a million posts last night I could see the meters registering on the website and updating. Woohoo!!! I've got a long way to go as its all still on a breadboard and I'm just blowing through the meters but all four meters work and update so I'm hoping I'm well on my way. I've got a few other question I'll post separately for things that I'm not quite sure are correct. I'm on RPi3/jessie with the alamode board and swissflow meters. DrunkenJon instructions were almost spot on for my set up (one minor edit to one of the flow python scripts to fix a path problem for pours.php and maybe a permission issue). Wish I had that from day one and avoided all the headaches on the raspberrypints site which don't apply to the latest hardware.

So on to my first question - everyone seems to be using Disk32ImageManager post (2143) to back up their card. When I plugged it into my computer to back it up my card is formatted into 4 partitions which I didn't expect. Is that what I should expect to see?

drive.png
 
Could you share this information for those who are using Jessie and the new chromium tag.
Thanks :)

Sure! I should've posted last night.

First off, the autoplay for Jessie can be edited by terminal by typing:

Code:
sudo nano .config/lxsession/LXDE-pi/autostart

To get Chromium to load in Full Screen mode (NOT kiosk mode), add the following to the autostart file:

Code:
@chromium-browser --incognito --start-fullscreen localhost

You likely want to add the "--incognito" so warnings of premature closing of the browser don't pop up.

I'm completely new to this, so I don't know if I've got redundant stuff in my file, but my motion sensor is working, and Chromium is popping up fullscreen on bootup, so I'm happy.

Here are the contents of my autostart file:

Code:
cat .config/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi

@xset s off
@xset -dpms
@xset s noblank

@chromium-browser --incognito --start-fullscreen localhost
sudo python pir_run.py

I'm still looking for a solution that will turn off (or at least put the monitor to low-power mode) after no motion is detected, and then back on when I go to pour a pint. I think I found something that may work. I'll let you know if it does.:mug:
 
[...]I'm still looking for a solution that will turn off (or at least put the monitor to low-power mode) after no motion is detected, and then back on when I go to pour a pint. I think I found something that may work. I'll let you know if it does.:mug:

Vaya Con Dios :mug:

There's an epic run of posts in one of the R'Pints threads regarding trying to get various monitors to go into low power mode when running my motion sensor script.
Most of those posts are mine :( mostly because my taplist uses a roughly 17 year old 19" ViewSonic LCD over an HDMI/DVI cable and there's no real notion of DVI Low Power mode in the Raspbian world.

I tried a metric crap ton of ideas including using CEC commands and was in fact able to put the display to sleep. However, when it was awoken it was clear the timing was way off as the palette would go nutty (one effect turned all the colors neon - which was actually cool but hard on the eyes).

I never got it to work consistently and finally just punted, hoping that display will eventually die so I can justify replacing it :) I was able to get one of my new workstation 27" native HDMI displays to go in and out of low power mode cleanly so that'll eventually be the solution.

Meanwhile the backlights on the old display burn on...and on...

Cheers!
 
It isn't elegant, but I have my TV set to turn off after 4 hours of no activity. I turn on the TV for my first pour of the evening. The script blanks the screen when I leave and turns it back on when I come back for subsequent pours. After 4 hours, the TV powers off. If I go for a pour and the TV doesn't turn on, I know it's probably time to stop pouring... or start on the scotch. &#128513;
 
So on to my first question - everyone seems to be using Disk32ImageManager post (2143) to back up their card. When I plugged it into my computer to back it up my card is formatted into 4 partitions which I didn't expect. Is that what I should expect to see?

Yes that is normal as RPints is Linux so it has separate partitions for boot, root, home, etc. To backup use Win32DiskImager, select the first drive letter of your Pi SD Card (it will back up the entire card anyway), navigate to your backup location, enter a logical name RPintsYYYYMMDDHHmm (eg. RPints201707080914), hit 'Read' and away you go.

Cheers,

Kal
 
I suspect two of the four partitions were there when the card was purchased. Not uncommon.
I have four RPi systems running and none of their SD cards have more than two partitions on them, but that's likely because I wiped them before beginning their Raspbian installations.

As for win32diskimager, it does what it does, but it has limitations that can prove problematic. As a blind block copier it clones the entire contents of the source card to the target, whether all those blocks are actually used or not. If the target card is even one block smaller than the source card win32diskimager will refuse to do the cloning.

What I've been doing is to live-clone my SD cards using rpi-clone on my Wheezy systems and the built-in SD Card Copier program on my Jessie system. Both work great and don't have the source-vs-target capacity problem of win2diskimager...

Cheers!
 
After hosing up the system on the first time around I reformatted the card to reinstall NOOBs and saw the partitions and dropped them and made back into 1 16 gb primary partition. After getting it back up and running I saw the partitions again. In any cases its fine just surprised me a bit. The Wind32DiskImager disk made a 16gb file so seems like I'm on the right track.

At some point I'd like to re-visit your live backup approach day_tripper that I read a while back but that's a task on my todo list for now behind the motion sensor which is behind moving off the breadboard and actually wiring it up and connecting the flow meters in line...one step at a time...
 
Back
Top