[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.
You're pointing to the two row header that interfaces to the RPi. That's not what I was referring to.

Look just below your red outline and you will see two single row header positions, a 1x8 at the bottom and a 1x10 just above that/just below the 24 pin two row header.

The 1x8 has GPIO 0 through 7 on it, the 1x10 has GPIO 8 through 13 plus a few other signals.
All of those signals, by the way, are shown in the silk screen (you can literally read them in your picture).

Those are the recommended places to hook up your flow meter signal leads.

The 8 pin and 10 pin headers came with the Alamode PCB kit, but many folks (such as myself) use stake pins instead for those two headers as slipping a female wire over a male header is much lower profile than sticking a male wire into a female header...

Cheers!

Thank you so much, I’m super new to this. I appreciate your help!
 
Including flow meter functionality? That would be impressive getting that all running so quickly.

Cheers!
I don't see anything related to flow meters in the official repo I checked out. The only pieces already existing are the pours table and the keg column on the front end. Point me in the right direction. From my understanding it should be pretty simple.

The basic flow of that process as I understand it is:
Meter -> [Uno/ALamode] -> P i-> Python Script -> Pours.php -> DB

Is this generally correct? If so, I really just need to find and modify a copy of Pours.php and we should be set.

EDIT:
I found a seperate branch for the V2 stuff that includes the Flow Meter code. I've done a really lazy merge into my repo and will start to re-clean some of it up.
 
Last edited:
Excellent - I saw your question this morning and was just about to point you along but you're already there.
Carry on :)

Cheers!
Well I'm almost done again. Working on pours.php now and will test shortly. I don't have hardware to test but I'll push a few pours via a browser or something to make sure everything updates as appropriate.

General question for anyone playing with RPints. The way things look in the code is that the keg objects are pretty much useless. It seems like it would make sense to link a beer to a keg via a linkage table to facilitate KegID, BeerID, StartVol, CurrentVol. you could even link the tapId in as well to use a single linkage table for everything. The point is that if I take a beer off to swap in a different beer, I'd like to keep the pours against that keg so when I put it back on, it's already set to go.

Does this make sense or am i over-thinking/over-complicating/over-engineering things?
 
No, it would make sense to have a keg have properties assigned to it when loaded that persist until it kicks.
Having run into your scenario a couple of times I solved it using phpmyadmin on the pours table to manually restore the correct keg volumes after physically and logically swapping kegs around. Not exactly something I'd want to have to write up ;)

I wonder how much adopting that model would break?

Cheers!
 
Yeah, the presentation stuff is about the most that folks manage. Fonts, icons, adjunct images, etc.
I have that, plus a scrolling set of keezer temperature readings with a link to my temperature logger.
This page is on my backup system but it's the same as the one running the keezer 'n' stuff...

Cheers!
 
So.. verify the basic functionality (Pours.php working). Then a first pass at moving all of the UI into smarty templates to support Skinning and create a Vertical and Horizontal skin as examples. Add in Pour buttons for Meterless tracking. THEN overhaul the data model (probably going to overhaul the physical layout (index.php, admin.php, api.php). By then I'm sure there will be a zillion other things to tinker with. I really liked the initial volume calculator idea (implemented as maybe a little popup calculator that can populate the initial volume field) from a couple pages back for instance.
 
Sounds like a plan - and an exciting one at that!
Definitely like the idea of finding a handy home for keg volume calculator, I've been using it since last summer...

Cheers!
 
OK! I have tweaked Pours.php to be more of a webservice instead of something we call on the command line (this will let me do some nifty javascript/ajaxy type magic to register pours from a button on the front end using the same backend code). I THINK the python code has been updated to handle this as well (definitely needs testing because I don't know any python).

I THINK everything but the installer works at this point. give it a whirl and let me know what breaks!
 
What's your environment, and are there any non-out-of-the-box package dependencies?

Not sure that'll happen for me this weekend, I'm trying to resurrect/upgrade my brewery in the aftermath of a home reno and it's going slower than expected.
Haven't brewed since mid-September and I'm jonesing big time. Not to mention the 80 gallons of beer I put up to get through this fricken' insanity is down to the last ~ 10 gallons and that includes a backup stout.

Getting a batch going is the prime directive...

Cheers!
 
OK! I have tweaked Pours.php to be more of a webservice instead of something we call on the command line (this will let me do some nifty javascript/ajaxy type magic to register pours from a button on the front end using the same backend code). I THINK the python code has been updated to handle this as well (definitely needs testing because I don't know any python).

I THINK everything but the installer works at this point. give it a whirl and let me know what breaks!

Two questions. What version of Raspbian are you running? Would the git clone command be:

Code:
 git clone https://github.com/zaepho/RaspberryPints.git /var/www/html
 
Hi, I'm looking for more assistance, Not sure why im not able to upload the Raspberrypints.ino file with out errors. this is what I get from output on the bottom of the screen after done uploading (see Below). I am able to select alamode and I do have the serial board checked at /dev/ttyso. I hooked up 1 flow meter and tested the board for power from, reading was 4.8 v. from a 5v out. Still no flow meter output when I test. I feel like I;m close, any input GREATLY appreciated.

Binary sketch size: 3,562 bytes (of a 32,256 byte maximum)
Error inside Serial.serialEvent()
java.io.IOException: Inappropriate ioctl for device in nativeavailable
at gnu.io.RXTXPort.nativeavailable(Native Method)
at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1598)
at processing.app.Serial.serialEvent(Serial.java:258)
at gnu.io.RXTXPort.sendEvent(RXTXPort.java:774)
at gnu.io.RXTXPort.eventLoop(Native Method)
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1644)
Error inside Serial.serialEvent()
java.io.IOException: Inappropriate ioctl for device in nativeavailable
at gnu.io.RXTXPort.nativeavailable(Native Method)
at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1598)
at processing.app.Serial.serialEvent(Serial.java:258)
at gnu.io.RXTXPort.sendEvent(RXTXPort.java:774)
at gnu.io.RXTXPort.eventLoop(Native Method)
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1644)
Error inside Serial.serialEvent()
java.io.IOException: Inappropriate ioctl for device in nativeavailable
at gnu.io.RXTXPort.nativeavailable(Native Method)
at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1598)
at processing.app.Serial.serialEvent(Serial.java:258)
at gnu.io.RXTXPort.sendEvent(RXTXPort.java:774)
at gnu.io.RXTXPort.eventLoop(Native Method)
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1644)
java.io.IOException: Cannot run program "/usr/share/arduino/hardware/tools/avrdude": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at processing.app.debug.Uploader.executeUploadCommand(Uploader.java:125)
at processing.app.debug.AvrdudeUploader.avrdude(AvrdudeUploader.java:333)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:178)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 11 more
 
What command are you using to upload the file?

Edit: did you run the command to change permissions for the 'pints folders earlier in the installation process?
 
Last edited:
The upload to the alamode is what I'm trying to do. I did do all the chmod permissions to the original /var/www/html earlier no issues there. Looks like --- java.io.IOException: Cannot run program "/usr/share/arduino/hardware/tools/avrdude": error=13, Permission denied ---- has permission issues. but in the permissions are anyone for all three.
 
I;m using the alamode, im not sure how to connect that to a PC. As it sits on the GPIO of the PI. I may have a hardware issue.. ? Maybe someone here has seen this before?
 
You can connect the Alamode to your pc with a usb cable. Then download the arduino programmer for your PC and try to upload the sketch from there. Take it off of the GIPO pins from the Raspberry Pi and hook it to the PC directly.
 
ok, so the only ports on the alamode is the micro sd card reader and the micro usb port that I power it with. So use the micro usb port to usb on my pc?
 
Yep. Download the .ino file onto your PC. Open it in the arduino programmer and modify it according to the instructions on the pints installation instructions, and then upload the sketch.
 
Yep. Download the .ino file onto your PC. Open it in the arduino programmer and modify it according to the instructions on the pints installation instructions, and then upload the sketch.

thank you Trying it!
any tips on how to get the alamode board into the list of board to upload to in the arduino ide software for windows?
 
Last edited:
I apologize for taking you down this path. I'm doing two things at once. I totally forgot that the Alamode does not interface with the PC because the micro usb port is only for power, not an interface like the Arduino boards. Sorry!

Let's get you back to trying to program it via the Raspberry Pi. Hook it back up, and try to compile and upload the sketch again and let's see what errors it gives you.
 
Cadibrewer, same results again on the pi. maybe something I did wrong soldering the GPIO pins? Tho only other issue I was I had to load all the Arduino-setup info line by line in LXterminal using sudo cd -f to get things to create etc. maybe in the setup somewhere it went off?

Binary sketch size: 3,562 bytes (of a 32,256 byte maximum)
Error inside Serial.serialEvent()
java.io.IOException: Inappropriate ioctl for device in nativeavailable
at gnu.io.RXTXPort.nativeavailable(Native Method)
at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1598)
at processing.app.Serial.serialEvent(Serial.java:258)
at gnu.io.RXTXPort.sendEvent(RXTXPort.java:774)
at gnu.io.RXTXPort.eventLoop(Native Method)
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1644)
Error inside Serial.serialEvent()
java.io.IOException: Inappropriate ioctl for device in nativeavailable
at gnu.io.RXTXPort.nativeavailable(Native Method)
at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1598)
at processing.app.Serial.serialEvent(Serial.java:258)
at gnu.io.RXTXPort.sendEvent(RXTXPort.java:774)
at gnu.io.RXTXPort.eventLoop(Native Method)
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1644)
Error inside Serial.serialEvent()
java.io.IOException: Inappropriate ioctl for device in nativeavailable
at gnu.io.RXTXPort.nativeavailable(Native Method)
at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1598)
at processing.app.Serial.serialEvent(Serial.java:258)
at gnu.io.RXTXPort.sendEvent(RXTXPort.java:774)
at gnu.io.RXTXPort.eventLoop(Native Method)
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1644)
java.io.IOException: Cannot run program "/usr/share/arduino/hardware/tools/avrdude": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:485)
at processing.app.debug.Uploader.executeUploadCommand(Uploader.java:125)
at processing.app.debug.AvrdudeUploader.avrdude(AvrdudeUploader.java:333)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:178)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 11 more
 
Try running this again from the terminal window just to make sure you have the correct permissions:

sudo chmod -R 777 /var/www/html
 
Try running this again from the terminal window just to make sure you have the correct permissions:

sudo chmod -R 777 /var/www/html

Tried that, just now, and still I have the same issue. The Raspberry pints access and functionality is perfect everything is working just as it should. I looked like the permissions were "/usr/share/arduino/hardware/tools/avrdude": error=13, Permission denied" but I don't know if I should mess with the permissions on those directories. Or there's something wrong with the alamode board?
Maybe I should try a Arduino board instead? It looks like they come a bit more configured.
 
Last edited:
ok, permissions on that folder did get rid of most of the errors. The last thing that shows up after the up load is "cant open /dev/mem" not sure if that an issue or not. flow meters still not working yet
upload_2018-2-24_19-30-38.png
 
That's a permission issue, too. Run the chmod again on that directory and try again. When it uploads with no errors, you can then try troubleshooting the flow meter with a couple of tricks. The instructions are wrong in the pints installation doc. This command: $ sudo /etc/init.d/flowmon start $ ps aux | grep flow_monitor.py is actually two separate commands.

$ sudo /etc/init.d/flowmon start
$ ps aux | grep flow_monitor.py
 
Which model RaspberryPi is being used here?

In the IDE you have to select the Alamode board from the board list, which should then appear connected to the serial port.
If it isn't in the list then the jessie-setup file did not execute properly.
And that happens because Wyolum apparently still has not fixed jessie-setup to work properly on Jessie - it needs to have dos2unix run on it.
Having to execute jessie-setup line by line is a classic indicator...

Cheers!
 
Which model RaspberryPi is being used here?

In the IDE you have to select the Alamode board from the board list, which should then appear connected to the serial port.
If it isn't in the list then the jessie-setup file did not execute properly.
And that happens because Wyolum apparently still has not fixed jessie-setup to work properly on Jessie - it needs to have dos2unix run on it.
Having to execute jessie-setup line by line is a classic indicator...

Cheers!
This is a Ri 3 model B.
Yes, I can see the alamode and the serial /dev/ttyS0
The last issue I had with the upload was the "cant open /dev/mem" displayed on the bottom output area. Im now able to get some info back from:
$ sudo /etc/init.d/flowmon start
$ ps aux | grep flow_monitor.py

But its not the right info.
Im in the process of activating the d0-d7 on the alamode board to see if plugging into a different one might help.
 
here is the results from the test. doesnt match the expected results.
pi@raspberrypi:~ $ ps aux | grep flow_monitor.py
pi 2238 0.2 0.7 13856 6952 ? S 04:20 0:00 /usr/bin/python /var/www/html/python/flow_monitor.py
pi 2278 0.0 0.1 4272 1828 pts/0 S+ 04:20 0:00 grep --color=auto flow_monitor.py

im still in the weeds, with no luck.
 
pi@raspberrypi:~ $ 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 (running) since Sun 2018-02-25 04:20:12 UTC; 40min ago
Process: 2233 ExecStart=/etc/init.d/flowmon start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/flowmon.service
└─2238 /usr/bin/python /var/www/html/python/flow_monitor.py

Feb 25 04:20:12 raspberrypi flowmon[2233]: Starting system RPFlowMon daemon:.
Feb 25 04:20:12 raspberrypi systemd[1]: Started LSB: Put a short description of the service here.
Feb 25 04:20:38 raspberrypi systemd[1]: Started LSB: Put a short description of the service here.

Also i still don thave a fix for the "cannot access /dev/mem" on the Arduino uploader. the chmod -R 777 on /dev didnt change that.
 
Last edited:
Ok, try this:

- stop the flowmon service

Code:
$ sudo /etc/init.d/flowmon stop

- run the flow_monitor listener in a terminal:

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

- If the meter is plumbed, pour a couple of ounces, else blow moderately through it in the right direction.
If the meter is detected by the AlaMode it should post a terse (3 line) message up to the listener script, which include the pin and pour value.

If you don't get any response, make sure the sketch was set up to use the same pin you're trying to use.
fwiw, pins known to work are 2 and 5 through 11. 3 and 4 will not work, 12 should work, 13 may be problematic.
 
m
Ok, try this:

- stop the flowmon service

Code:
$ sudo /etc/init.d/flowmon stop

- run the flow_monitor listener in a terminal:

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

- If the meter is plumbed, pour a couple of ounces, else blow moderately through it in the right direction.
If the meter is detected by the AlaMode it should post a terse (3 line) message up to the listener script, which include the pin and pour value.

If you don't get any response, make sure the sketch was set up to use the same pin you're trying to use.
fwiw, pins known to work are 2 and 5 through 11. 3 and 4 will not work, 12 should work, 13 may be problematic.
after i stop the service and start the listener and blow into the meter i get nothing in the terminal window.
 
My last suggestion is to make sure you followed day_trippr's instructions on running the dos 2 unix routine on the jessie setup file. That has tripped up a couple of people (myself included). Or, if you have a different Arduino, like an Uno, that should work much more easily.
 

Latest posts

Back
Top