[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.
That's a new one. I think I'd dump the system log (look in /var/log) into a text file and search it to see if there's a clue associated with that service being stopped...



Cheers!


Thanks day trippr.

Didn't find anything. Ran a basic grep in /var/log for 'flow'. All I found was that I screwed up that bodge cronjob and it was running every minute. XD

A manual read through of various log files found nothing obvious. Not sure exactly what to look for.

Corrected crontab line for those who may encounter this in the future.

Code:
0 * * * * sudo /etc/init.d/flowmon start
 
Hi guys. Anyone figure out how to have pints pull the beer data from My Beers when tapping a new keg instead of having to enter it again every time?
 
Mine stopped populating a long time ago and someone on here suggested that maybe I had put a 'hard return' in the one of my beer descriptions. I pulled them all up and made sure I didn't have any extra returns or weird characters and it started populating the data again. Hope this helps you.
 
Hi guys. Anyone figure out how to have pints pull the beer data from My Beers when tapping a new keg instead of having to enter it again every time?

As was pointed out, this should already happen. What I'm still hoping for is the ability to link a beer to a keg, and then a keg to a tap (you know, like how we actually do it in real life). Currently you link a beer to a tap and a keg to a tap, which makes less sense in my mind.
 
Mine stopped populating a long time ago and someone on here suggested that maybe I had put a 'hard return' in the one of my beer descriptions. I pulled them all up and made sure I didn't have any extra returns or weird characters and it started populating the data again. Hope this helps you.

Thanks Ray. This was exactly the issue. Despite all the upgrades we did this was the only thing that stumped us. We nuked all the brews and started over making sure not to use any special characters etc.

We used RPints as our digital tap list this weekend at the SoCal Homebrewers Fest with 13 taps running. We modded the taps to color code based on when they were tapped; Green dot withing 30 min, yellow after, then black/default after an hour so people coming by the booth could easily find the new stuff and see what was getting low. Page refresh every 30 min with a hard refresh if someone needed to refresh the screen/keg right away.
We also ran a mobile display. There was almost zero cell service at the fest so we set up a router broadcasting Free Wifi. People would log on, but no matter where they went it routed to our tap list. :rockin:
I'll post up some pics soon.
 
Thanks Ray. This was exactly the issue. Despite all the upgrades we did this was the only thing that stumped us. We nuked all the brews and started over making sure not to use any special characters etc.

We used RPints as our digital tap list this weekend at the SoCal Homebrewers Fest with 13 taps running. We modded the taps to color code based on when they were tapped; Green dot withing 30 min, yellow after, then black/default after an hour so people coming by the booth could easily find the new stuff and see what was getting low. Page refresh every 30 min with a hard refresh if someone needed to refresh the screen/keg right away.
We also ran a mobile display. There was almost zero cell service at the fest so we set up a router broadcasting Free Wifi. People would log on, but no matter where they went it routed to our tap list. :rockin:
I'll post up some pics soon.


That is awesome!!!! Glad it worked out for you and NICE MOD
 
... still down. Any chance someone could throw the build PDF up in this thread, or PM me with it? I'm at like the last step.
Thanks
 
Newbie here. Flow meters arrive with pigtails, not long cable. I'd like to make a cable extension but don;t know what the pin connectors are called and if the flat cable is special. I saw on a past post with a link for a 100' roll, I need maybe 2'. Any ideas? Thanks! Hugh
 
Nothing fancy needed to extend the cable, you could probably use a chunk of stranded 4-conductor telephone wire (one conductor would be unused).

Anything in the neighborhood of 26awg or larger should be fine. The meters in my keezer travel a good five feet over that gauge wire and have been working perfectly since I installed them about this time last year...

Cheers!
 
Think I extended the flow tail.
But, before I connect I have a question. The flow meter diagram has ground-data-power, with ground marked black on my ribbon. The ala mode board shows ground-power-data. Am I thinking too much or are the pins not aligned.

swissFlowMeter.jpg


alaMode Pins.jpg
 
The pins are not aligned in that manner. The black stripe is the ground side of the ribbon (mine were actually red striped, but same difference)...

Cheers!
 
I have 4 flow meters. One meter has a black striped wire for ground, the other three have red for ground. A bit counter-intuitive it seems, but as day_trippr said, the colored wire is ground, middle is data and the remaining wire is power. Granted, this setup I s for the swissflow meters. I personally can't speak for the others that people are using.
 
Thanks but what about the ala mode connections? They do not appear to be in the same alignment as the swiss flow ribbon.
Do I need to change the wires to match teh ala mode board?
 
That set of three headers is not in an order that matches the ribbon. 5V has to go to a 5V pin, GND to a GND pin, and the digital signal to one of digital IO 2, 5-11, and perhaps 12 and 13. So you have to break out the ribbon connections one way or the other, you can't just plug the OEM connector onto the AlaMode...

Cheers!
 
5.9.15 - looks like raspberrypints.com is down? just got my flow meters connected and need next steps...
 
For the instructions/code below:

Next Edit the /etc/xdg/lxsession/LXDE/autostart file and add the following AFTER the line for the browser

@/usr/bin/python /var/www/python/flow_monitor.py

Is there supposed to be a space between python and /var? Tried both ways and meters are not working.

How can I test the flow meters are working before splicing the beer lines?

Thanks!
 
For the instructions/code below:

Next Edit the /etc/xdg/lxsession/LXDE/autostart file and add the following AFTER the line for the browser

@/usr/bin/python /var/www/python/flow_monitor.py

Is there supposed to be a space between python and /var? Tried both ways and meters are not working.

How can I test the flow meters are working before splicing the beer lines?

Thanks!

Should be a space. Some people say you can blow in them a bit. I put them on a cobra tap and a corney of water. In terminal type "sudo /etc/init.d/flowmon status" If it's not running change status to start and try again.
 
Yes, you need that space between verb and object.

If your Raspian build is recent it's entirely likely you are using the wrong LXDE autostart file. They added another which is associated with the user. It is in the general vicinity so you should be able to find it...

Cheers!
 
If your Raspian build is recent it's entirely likely you are using the wrong LXDE autostart file. They added another which is associated with the user. It is in the general vicinity so you should be able to find it...

Cheers!

But all the other functions of the autostart work including kiosk mode
 
Should be a space. Some people say you can blow in them a bit. I put them on a cobra tap and a corney of water. In terminal type "sudo /etc/init.d/flowmon status" If it's not running change status to start and try again.

above resulted in command not found.

typed "sudo /var/www/python/flowmon status"
result: [fail] flow_monitor.py is not running

how do I change status to start? Sorry for so many questions, I'm learning. Thanks for patience.
 
But all the other functions of the autostart work including kiosk mode

Then you're good.

The multiple LXDE autostart files have befuddled lots of folks in the last 6 months or so, hence the mention.

So open a terminal session and enter this command:

$ sudo python /var/www/python/flow_monitor.py

This will kick off the "listener" script and let you see if your AlaMode is actually sending "pour" messages.
See what happens when you pour a few ounces. You should see text identifying the pin number and the tick count (and a bit more stuff).

And if that command bombs you should be able to see why.

Get that working and we can deal with the flowmon service part later...

Cheers!
 
Appears like the flowmonitor software is working but I am not registering pours. When I pour water through the sensor, no readings are detected.

Alamode has an updated setup for Pi2 and new raspbian.

wget https://github.com/wyolum/alamode/blob/master/bundles/alamode-setup.tar.gz?raw=true.
tar -wvzf alamode-setup.tar.gz
cd alamode-setp
sudo ./setup

When I run sudo ./setup I get a list of errors citing permission denied. Am I going down a rabbit hole here, or am I onto the problem. Might it be that the alamode is not sending the flow readings to the software?

If so, how do I allow the new setup to run?
 
Just to check:

Did you configure the raspberrypints.ino file for the number of taps and the pins you're going to use and upload the resulting sketch to the AlaMode without any errors occurring along the way? And then did you connect your meter(s) to the pins defined above?

Also, which pins are you actually using? Some work well, others not so much. I can vouch for 2 and 5 through 11.

Finally, here's my raspberrypints.ino file. I has a feature that uses AlaMode digital IO pin 13 to light the on-board LED for a couple of seconds when a pour is detected. This can be helpful for debugging a new setup as you can see if the AVR is working or not. Don't use pin 13 for a meter, of course.

You just need to set your pins/pin count, compile and upload...

Code:
//This line is the number of flow sensors connected.
const uint8_t numSensors = 6;
//This line initializes an array with the pins connected to the flow sensors
uint8_t pulsePin[] = {2,5,6,7,8,9};
//number of milliseconds to wait after pour before sending message
unsigned int pourMsgDelay = 300;

unsigned int pulseCount[numSensors];
unsigned int kickedCount[numSensors];
unsigned long nowTime;
unsigned long lastPourTime = 0;
unsigned long lastPinStateChangeTime[numSensors];
int lastPinState[numSensors];

unsigned long lastSend = 0;

void setup() {
  pinMode(13, OUTPUT);
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
  Serial.flush();
  for( int i = 0; i < numSensors; i++ ) {
    pinMode(pulsePin[i], INPUT);
    digitalWrite(pulsePin[i], HIGH);
    kickedCount[i] = 0;
    lastPinState[i] = digitalRead(pulsePin[i]);
  }
}

void loop() {
  nowTime = millis();
  pollPins();
  if ( (nowTime - lastPourTime) > pourMsgDelay && lastPourTime > 0) {
    //only send pour messages after all taps have stopped pulsing for a short period
    //use lastPourTime=0 to ensure this code doesn't get run constantly
    lastPourTime = 0;
    checkPours();
    checkKicks();
  }
}

void pollPins() {
  for ( int i = 0; i < numSensors; i++ ) {
    int pinState = digitalRead(pulsePin[i]);
    if ( pinState != lastPinState[i] ) {
      if ( pinState == HIGH ) {
        //separate high speed pulses to detect kicked kegs
        if( nowTime - lastPinStateChangeTime[i] > 0 ){
          pulseCount[i] ++;
        }
        else{
          kickedCount[i] ++;
        }
        lastPinStateChangeTime[i] = nowTime;
        lastPourTime = nowTime;
      }
      lastPinState[i] = pinState;
    }
  }
}

void checkPours() {
  for( int i = 0; i < numSensors; i++ ) {
    if ( pulseCount[i] > 0 ) {
      if ( pulseCount[i] > 100 ) {
      //filter out tiny bursts
        sendPulseCount(0, pulsePin[i], pulseCount[i]);
        digitalWrite(13, HIGH);
        delay(3 * 1000);
        digitalWrite(13, LOW);
      }
      pulseCount[i] = 0;
    }
  }
}

void checkKicks() {
  for( int i = 0; i < numSensors; i++ ) {
    if ( kickedCount[i] > 0 ) {
      if ( kickedCount[i] > 30 ) {
        //if there are enough high speed pulses, send a kicked message
        sendKickedMsg(0, pulsePin[i]);
      }
      //reset the counter if any high speed pulses exist
      kickedCount[i] = 0;
    }
  }
}

Cheers!
 
So my file looked the same as yours. re-uploaded the file and it worked with no issue. rebooted pi. pour water through the flow meters noting registers. I'm using 2 sensors, pin 5,6. set pints for 2 pins and tagged the kegs to the pins. Nothing... Is there a test to be sure the alamode board is talking to the pi?
 
do I need to add jumpers to turn on the power to the flow meters as suggested in the attached? When I connect a power meter to the pins I get about 5 volts without the jumpers.

servo pin grid.jpg
 
added jumper.

now I get activity with flow meter.
blow and get: unknown message: p;0;6;3061 (from the meter on pin 6)

pour water through and get long message...
There are no windows in the stack
invalid window '%1'
Usage: window activate [options] [window=%1]
--sync - only exit once the window is active (is visible + active)
If no window is given, %1 is used. See WINDOW STACK in xdotool(1)
^[[15;5~

when I run raspberry pints it reflects the volume of water I poured. But when I pour with rpints open it is not updating.
 
So my file looked the same as yours. re-uploaded the file and it worked with no issue. rebooted pi. pour water through the flow meters noting registers. I'm using 2 sensors, pin 5,6. set pints for 2 pins and tagged the kegs to the pins. Nothing... Is there a test to be sure the alamode board is talking to the pi?

I'd be surprised if your raspberrypints.ino has the "blink LED" feature.
Check lines 71-73: this is in my file, and not in the "stock" file:

digitalWrite(13, HIGH);
delay(3 * 1000);
digitalWrite(13, LOW);

Anyway, if you're seeing pour messages in a terminal window while running flow_monitor.py, the AlaMode is working, so the next part is whether the pours.php is the latest (there was a bug in the original that got fixed with the 2.0.1 kit). Did you in fact install the 2.0.1 kit?

Cheers!

[edit] btw, an assumpion I've been making is your flowmon service is abending somehow and isn't sticking around to muck up the results of running flow_monitor.py directly in a terminal session. If you have any doubts about this, do

$ sudo /etc/init.d/flowmon stop

to stop the service before running flow_monitor.py...
 
Everything was working perfectly when I last used R.Pints about 2 months ago. Today I turned it on and it booting gets stuck here:

Any tips?

20150511_192408.jpg
 
Everything was working perfectly when I last used R.Pints about 2 months ago. Today I turned it on and it booting gets stuck here:

Any tips?


I'm no expert, but I suspect from the errors (file system errors, unable to mount root), that your SD card crapped out on you. It happens. Might be able to reload it. Might be completely failed.

Can try reloading NOOBS and starting from scratch. If the card is bad it might fail again, even if it works initially.
 
Back
Top