[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 didnt get any exception messages when I compiled my Alamode. I did a clean install though because my 1.0.3 lost power quite often and I felt like a clean install is always best.
 
ps: One thing I did notice was about four lines of exception messages when compiling and uploading the sketch to the AlaMode. Does anyone know if the Arduino IDE writes log files?

There have been no changes to the arduino or flow_monitor.py code in at least a week.

If you pushed the sketch to the alamode with the python script running it will not work. You have to kill the python script first to free up the serial port.

I can't tell you what's wrong unless I know the exception messages.
 
There have been no changes to the arduino or flow_monitor.py code in at least a week.

Excellent. Thanks!

If you pushed the sketch to the alamode with the python script running it will not work. You have to kill the python script first to free up the serial port.
.

Fair enough, but I programmed the Arduino before I added the startup for the flow monitor script, so it shouldn't have been running anything.

I can't tell you what's wrong unless I know the exception messages.

I understand, that's why I asked if anyone knows if the Arduino IDE writes a log file anywhere. The exception messages are pushed out of the scroll buffer so I can't grab them...

Cheers!
 
I just wanted to say thank you to the team for the hard work and unselfishly sharing this with HBT forum.

Mine is not registering any pours like day_trippr. I ran out of time today but will hard at troubleshooting tomorrow. Looking forward to new ugrades.



Sent from my iPad using Home Brew
 
I haven't noticed it generating log file anywhere (and I've seen the orange bar a lot in the past month). And Google isn't much help there either.

It's easy to add the led

In the sketch, in the checkpours function... find the line where it's writing to the sendserial function.

After that add:

Code:
digital.write (13, HIGH);
delay(3 * 1000);
digital.write (13, LOW);

Save it. Verify it. Then upload it to the alamode.

That will turn the led on for 3 seconds after it sends the pour info to the serial port.
 
Very nice!! Built this Arduino shield like flow meter interface on a small piece of vector board for my modest two tap kegerator. Had a couple of the adafruit style Hall effect sensors hooked up at the time for some testing.
ImageUploadedByHome Brew1409361381.251463.jpg
 
I haven't noticed it generating log file anywhere (and I've seen the orange bar a lot in the past month). And Google isn't much help there either.

It's easy to add the led

In the sketch, in the checkpours function... find the line where it's writing to the sendserial function.

After that add:

Code:
digital.write (13, HIGH);
delay(3 * 1000);
digital.write (13, LOW);

Save it. Verify it. Then upload it to the alamode.

That will turn the led on for 3 seconds after it sends the pour info to the serial port.



Would this be the place?

void checkPours() {
for( int i = 0; i < numSensors; i++ ) {
if ( pulseCount > 0 ) {
if ( pulseCount > 100 ) {
//filter out tiny bursts
sendPulseCount(0, pulsePin, pulseCount);
digital.write (13, HIGH); // blink
delay(3 * 1000); // led
digital.write (13, LOW); // here
}
pulseCount = 0;



btw, it looks like pin 13 is already being used for some reason.
Look near the top of the sketch...

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, INPUT);
digitalWrite(pulsePin, HIGH);
kickedCount = 0;
lastPinState = digitalRead(pulsePin);
}
}

My Google-Fu also led me nowhere wrt the IDE logging the console.
I'll see if I can either do a screen cap as the exception messages scroll by or I'll go commando and use a camera...

Cheers!

ps: the IDE programs the AlaMode at 110kbaud. Why so conservative using 9600 baud in the sketch?
 
That's the place.

The call in the setup is saying that pin 13 (the led) is an output pin (meaning it won't listen for input on pin 13). It's done that way to be able to use the led.

9600 is what was decided. I think to ensure nothing was lost in translation.

Now that we've made it thru the release I may try with some tweaks to see if speeds improve any.
 
Also change the digital.write to digitalWrite

That's what I get for doing this on my phone and not anywhere near sketch or my pi.
 
Love this project, I'm up and running with 5 flow meters. Since I was putting the meters into the middle of my accuflex lines, I took the opportunity to switch fully over to John Guest fittings, oh man it made me regret literal years of getting that stuff over barbs every time I swapped out my lines. I also used a cheap Uno clone I had lying around rather than the ala mode, works like a champ.
 
So I got to the part on the upgrade where I import my old DB and got this error..
Error

SQL query:

--
-- Constraints for dumped tables
--
--
-- Constraints for table `beers`
--
ALTER TABLE `beers` ADD CONSTRAINT `beers_ibfk_1` FOREIGN KEY ( `beerStyleId` ) REFERENCES `beerStyles` ( `id` ) ON DELETE CASCADE ;

MySQL said: Documentation
#1005 - Can't create table 'raspberrypints.#sql-72b9_75' (errno: 121)

Also if I log in to the admin page the all my beers are still there,
Any ideas?
 
Pretty sure the upgrade procedure noted there'd be an error there.
I got one as well (though I have no idea if it looked like that one), but the beer and keg tables imported just fine anyway...

Cheers!
 
Also change the digital.write to digitalWrite[...]

Thanks for hanging in there :)

Here's a screencap of the exceptions during the AVR sketch compile.

I'm going to give the LED thing a try...

Cheers!

[edit] Compiled with the same exceptions, uploaded, poured a few ounces from two different faucets...and no blink.
I suspect those exceptions right after the HardwareSerial module is loaded are indicative of something amiss that's pooching the sketch.
And in case it's a question, I did an apt-get update && apt-get upgrade this afternoon. Only one php module was updated, everything else is current...

screenshot.png
 
Can't read it on my phone. Will check it when I get home later.


Edit:
Was able to read it... that's a problem with the hardwareserial.cpp file that sketch is compiling against. It's not an issue caused by our code.

When was the last time you did apt-apt - get update and upgrade?

Edit again: ok, saw that you updated earlier.

What about strictly doing apt-get install arduino?
 
[...]Edit again: ok, saw that you updated earlier.

What about strictly doing apt-get install arduino?

Yeah, that'll be on the short list of things left to try.

I tried burning the AVR using my other system and got exactly the same exceptions, so purging the current IDE installation and installing anew will definitely be the first thing I try tomorrow.

Can't do it now. I lost count how many short pours I've had this evening with all the testing/debugging/etc...

Cheers! :drunk:

[edt] By the way, the Verbose switch for the compiler isn't set in the IDE you won't see those exception messages. Thought I was in like Flynn when the second system burned the chip without any messages, then realized I hadn't set the Verbose switch...
 
Any recommendations on debugging pours? Nothing hooked up to the Pi for KB/Mouse/Screen, I just manually refresh on a tablet or laptop, last pour was 5 mins ago with no updates (from past posts it seems like it should show it almost immediately if you refresh).

I didn't notice anything flashing on the Alamode like the Arduino used to with the Kegbot (without adding my own LED). I might just need to rip it all out and re-wire it. Software side everything went fine.
 
Still troubleshooting my pours not being recognized but did notice that in step 9 there is no ampersand at the end of the line we are supposed to add and then in the Troubleshooting Section there is an ampersand at the end of the line.

I tried both with no love.

I have confirmed that the meters are wired correctly (flow and connections). Checked voltage and then disconnected power and checked continuity in wiring from the Alamode to the flowmeters.

I want to add the led code to the alamode but I get an error when trying to compile the new code (error='programmer is not responding'). It was mentioned that the serial port needs to be open and that the RPints is using the serial communication.

Can someone tell me how to stop the serial communication to/from the Alamode so I can compile the Sketch? And then how to reconnect it after I reboot?

I am keeping notes on each step to use as a basic troubleshooting guide that might be useful for others in the future.
 
I hate to double post but I just found an error message...

Error when running python flow_monitor.py

When in the terminal and I change the directory to /var/www/python and then run python flow_monitor.py

I pull the tap and get the following error. (FYI I get the same error not matter which tap I pull).

error:
'There are no windows in the stack'
'Invalid window '%1'
useage=windows activate [options][window=%1]
if no window is given, %1 is used. See window stack in xdotool(1) ^ [[15;5~

This is like Chinese to me. Can someone point me in the proper direction?
 
I hate to double post but I just found an error message...

Error when running python flow_monitor.py

When in the terminal and I change the directory to /var/www/python and then run python flow_monitor.py

I pull the tap and get the following error. (FYI I get the same error not matter which tap I pull).

error:
'There are no windows in the stack'
'Invalid window '%1'
useage=windows activate [options][window=%1]
if no window is given, %1 is used. See window stack in xdotool(1) ^ [[15;5~

This is like Chinese to me. Can someone point me in the proper direction?

I got that too, when I didnt have a chrome window open displaying the tap list, but it still updated the database so it seemed to work
 
Adeering
I got that too, when I didnt have a chrome window open displaying the tap list, but it still updated the database so it seemed to work
My system is not recognizing any pours. I get that error message even with Chromium open in the system tray and none of the taps are registering any pours.
 
Ill keep looking. Thanks

So, you might actually read this thread from the beginning...but you could do worse than to start here.

Also, there's another long-running thread on the v1.0.3 release, but with the impending v2 release announced here there've been lots of pertinent follow-ups wrt to how folks are implementing stuff.

Eventually I expect the 'Pints folks will be expanding their "How To" on the construction side; a bunch of us have been taking pictures 'n' stuff...

Cheers!
 
So hopefully you guys get all the technical software issues figured out... I'm utterly useless there. On the hardware side - how are most people opting to link the Alamode to the meters? Obviously they can't just plug directly into the board (now there's your opportunity for growth and profit from this - custom boards ready to rock!) and I've seen a few examples on here of people using breadboards and jumpers and the likes.

I'm thinking if the meters (I'm running 3) can share the same power, then I only need to run 5 lines between my Alamode and my kegerator, and can come up with an easy way to plug the meters in to some board inside the kegerator. But if anyone else has a better way, it'd be cool to see. I know day_trippr is working up something nifty - anyone else?
-Kevin
 
Anybody good with php want to help me with something. Started working on editing the tap_form.php file in order to add another input for full weight. Able to add the input box, but not sure how to have it update starting amount when edited. My knowledge lies with java so php is new to me.
I know it will need to be added to the tap-form with another .on, but cant figure out how to pull the keg starting weight and FG from the form. has to go in there for the .on
Code:
$('#tap-form')	
			.on('change', '#beerId', function(){
				var $this = $(this);
				
				if( $this.val() ){
					var $form = $('#tap-form'),
						beer = beerList[$this.val()];
						
					$form
						.find('#srm').val(beer['srm']).end()
						.find('#ibu').val(beer['ibu']).end()
						.find('#og').val(beer['og']).end()
						.find('#fg').val(beer['fg']).end();
				}
			})
			.on('change', '#kegId', function(){
				var $this = $(this);
				
				if( $this.val() ){
					var $form = $('#tap-form'),
						keg = kegList[$this.val()];
						
					$form
						.find('#startAmount').val(keg['maxAmount']).end();
				}
			});
 
doing "ps aux | grep python", should I see the python script constantly running after a reboot? (I don't)

Running the script straight from the command line (/usr/bin/python /var/www/python/flow_monitor.py), after a pour I see:
Unknown message: P;0;9;1354

Note, I'm running this headless (no monitor hooked up to the Pi). Using another machine to refresh the web page.
 
If your setup does not have a monitor on it you need to comment out the last line in includes/pours.php that calls the xdotools to refresh the page. Otherwise you'll see the error.

There should be no & in the line to start flow_monitor.py in autostart and it should be the very last line.
 
If your setup does not have a monitor on it you need to comment out the last line in includes/pours.php that calls the xdotools to refresh the page. Otherwise you'll see the error.

There should be no & in the line to start flow_monitor.py in autostart and it should be the very last line.

Both temp sensors are working, and it appears flow-meters are in some fashion now as well (all 3 taps now show some OZ poured)

The python script isn't auto-starting, I suspect it's because X might not be loading as it doesn't detect any screen on the HDMI port. I'll find another way to get the python script to stay running in the background (maybe @reboot in crontab).


Side note to anyone else running headless: xrdp works great, used it for compiling/uploading the script to the Alamode. "apt-get install xrdp" to install, then just use the Windows RDP client to connect to your pi.

Edit:
Code:
@reboot /usr/bin/python /var/www/python/flow_monitor.py &
in crontab (crontab -e) and rebooting fixes the python script starting issue for headless setups.
 
Didn't that ampersand die already?
It keeps coming back!
It's a zombie ampersand! Kill it! Kill it with fire!

Or...'splain why it's there...

Cheers! ;)
 
& - it launches it into the background and keeps it there until it dies. I'm not starting it with the X startup scripts that's in the instructions as my setup is headless X doesn't launch. It's started via cron on boot :mug:

Flow meters (thanks again!) and temp sensors working, populated with default beverages :rockin: :

raspints1.jpg
 
Anybody get this working from a straight website install?

I couldn't get the system to recognize any pours even after reinstalling. So this afternoon I bought a new SD card, reformatted it and did a clean new install (not an upgrade). I installed the default beers, kegs, etc.

It still does not recognize any pours and when I run python flow_monitor.py I still receive the the same error as I did with the 'upgrade' install. See my prior message for the specific error message.

Has anyone installed this with no modifications straight from the website and have it work? I know glacious has his working but it's from a non standard (headless) installation.

I'm trying to figure out my next troubleshooting step here.
 
I'm having an odd issue.

After upgrading, when I try to tap a beer, it marks the keg as serving, but doesnt seem to update the tap list.

EDIT: seems to be because I did the install for flowmeters, but didnt have flow metering enabled. I only noticed because the extra PIN column. So I enabled and it worked just fine. Even though I don't have anything attached yet. Parts on order. So maybe have a default pin number if possible?
 
Anybody get this working from a straight website install?

I couldn't get the system to recognize any pours even after reinstalling. So this afternoon I bought a new SD card, reformatted it and did a clean new install (not an upgrade). I installed the default beers, kegs, etc.

It still does not recognize any pours and when I run python flow_monitor.py I still receive the the same error as I did with the 'upgrade' install. See my prior message for the specific error message.

Has anyone installed this with no modifications straight from the website and have it work? I know glacious has his working but it's from a non standard (headless) installation.

I'm trying to figure out my next troubleshooting step here.

That error message (about xdotools) is due to the fact that your webbrowser is not the top window (meaning you have something else open on top of chromium when you pull a pint).

The script is setup to run strictly as it is with NOTHING else open in X and the pi hooked directly to a monitor.

If you aren't seeing pours registered, MAKE SURE You edited the ino file to have the correct pin numbers for the taps (and re upload to the alamode/arduino) and make sure that your tap pin numbers are set correctly.
 
[...]Has anyone installed this with no modifications straight from the website and have it work? I know glacious has his working but it's from a non standard (headless) installation.

I'm trying to figure out my next troubleshooting step here.

LOL! I'm pretty much in the same boat right now.

Turns out the exceptions I was getting in the Arduino IDE are built-in (and all of you knuckleheads are getting them, too. But you don't have the verbose switch set for compiler messages in your IDE settings so you're never seeing them).

Whomever wrote HardwareSerial.cpp used integers where (s)he should have used unsigned ints in two places. Fixing those eliminated the exception messages - but had zero effect on 'Pints not seeing my flow meters.

(btw, if anyone wants a fixed HardwareSerial.cpp file to replace /usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp you can pull it from my Google Drive here)

Anyway...I'll try downgrading from six to a single metered tap and see if that makes any difference, but otherwise I'm thinking the better part of valor is to try a start-from-scratch 'Pi build (plenty of extra SD cards and backup images saved for both machines) and see where that gets me...

Cheers!
 
So hopefully you guys get all the technical software issues figured out... I'm utterly useless there. On the hardware side - how are most people opting to link the Alamode to the meters? Obviously they can't just plug directly into the board (now there's your opportunity for growth and profit from this - custom boards ready to rock!) and I've seen a few examples on here of people using breadboards and jumpers and the likes.

I'm thinking if the meters (I'm running 3) can share the same power, then I only need to run 5 lines between my Alamode and my kegerator, and can come up with an easy way to plug the meters in to some board inside the kegerator. But if anyone else has a better way, it'd be cool to see. I know day_trippr is working up something nifty - anyone else?
-Kevin

I am using an Ethernet cable, put a female rj45 on the alamode, one gnd, one vin, and six digital. Then got a very small (2x3) project box and wired a small circuit board the same with headers for the flow meters. Just run one cable and connect up to 6 meters!
 
Hail Mary: downgrade 'Pints configuration to a single tap
Result: One tap successfully logging pours! YAY!

So...add one at a time, right? HAHAHAHAHA! IN YOUR FACE!

I killed flow_monitor.py, edited raspberrypints.ino for two pins, 6 & 7, uploaded (no more exceptions for this guy!), configured the gui for two taps on pins 6 & 7, launched flow_monitor.py in a terminal....and fail. The pin data for the second tap appeared, followed by "could not open pours.php".

So something broke. Downgraded back to a single tap...aaaand first tap data is followed by "could not open pours.php".

<sigh>

Bottom line: my problems are not rooted in the 'Pi, the OS, the packages, or the peripheral hardware.

Tomorrow I will wipe my 'Pints v2 installation, drop a fresh set of files on it, and populate everything from scratch instead of using the export/import process. I have a feeling this is going to go back to that...

Cheers!

[edits]
ps: First and pretty much only debug utility is to not auto-start flow_monitor.py, and instead run it in a terminal...
pps: Come to think of it, I should be able to just wipe out the 'Rpints v2 database and start a new one. Whole new install won't buy me any more than that...
 
So hopefully you guys get all the technical software issues figured out... I'm utterly useless there. On the hardware side - how are most people opting to link the Alamode to the meters? Obviously they can't just plug directly into the board (now there's your opportunity for growth and profit from this - custom boards ready to rock!) and I've seen a few examples on here of people using breadboards and jumpers and the likes.

I'm thinking if the meters (I'm running 3) can share the same power, then I only need to run 5 lines between my Alamode and my kegerator, and can come up with an easy way to plug the meters in to some board inside the kegerator. But if anyone else has a better way, it'd be cool to see. I know day_trippr is working up something nifty - anyone else?
-Kevin

Kevin,

I had some pictures in an earlier post (although it's been modified/changed a bit since then, but similar). I have a single Cat5 cable running into my kegerator via the drain hole, so it gives me 8 wires to play with. Here is my current pinout on both sides:

Code:
1 - 5v -          WhiteOrange
2 - Ground -     Orange
3 - Flow1 -      WhiteGreen
4 - 12v- -        Blue
5 - 12v+ -       WhiteBlue
6 - Flow2 -      Green
7 - Flow3 -      WhiteBrown
8 - 1wire bus - Brown (DS18B20 temp probes data pin)

Note: 5v + Ground are used for all 3 flow meters and both temp sensors. 12v+ / 12v- are used for the fan, and Flow1/2/3 each feed one flow meter. 1wire bus is for the data pin on both DS18B20 temperature probes (you can have a lot more than this on a single bus)

So it's a single cable in/out of the kegerator, with a box on either end (one inside, one outside). These are just Radio Shack plastic project boxes, Dremel'd and cut to fit connectors and such.

Outside box: 12v input jack, Cat5 cable, Alamode, Pi, Resistor for DS18B20 temp sensor

Inside box: RJ45 jack - splits 8 wires into their various devices, connectors for temp sensors + flow meters, fan, tubing to circulate air around kegerator + draft tower
 
Back
Top