• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

[Version 2 Release] RaspberryPints - Digital Taplist Solution

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
What the heck?
sounds like user sound settings since sudo is a different user then pi.
if those commands work from the terminal then it should work from the python unless something else is triggering the screen to wake up and not the motion detector.

in Config.py if you set
config['flowmon.debug' ] = True
then it will log out when motion is detected.
You may want to switch dispatch.debug to false to reduce logging when looking for motion detection issues.
config['dispatch.debug' ] = False#True

I was trying to find the threshold that triggers the kicks as it is way too low for Swissflow meters.
i wonder if your flow is too strong, kicks are triggered slightly differently than pours. The pin has to go high-low-high in the same millisecond to count towards a kick then the kick count has to reach the threshold. Intertwined with the kicks would be pours counts which is probably why you are seeing them back to back.
Maybe look at your old sketch to see how it counted pulses, in the new one its in pollPins, maybe just removing the check for same millisecond (~line 340) and count everything as a pour tick (since your ignoring kicks anyways).
I know the original uses interrupts to count pulses but i found that doing that would mess with the timing of doing other things like flashing the LED and RFID checking.
 
i wonder if your flow is too strong

I believe you hit the nail on the head: I've been "testing" the meter functionality by blowing through one of my spare meters I use for this kind of testing. And after some experimentation I was able to "pour" a little over 12 ounces without triggering a kick. Calibrated breath :)

I changed config['flowmon.debug' ] to True and config['dispatch.debug' ] to = False and restarted the flowmon process. Noticed it actually reflashed the Alamode this time (hadn't seen that before so I guess that switch enables that stuff to go in the log) and when it was done the log file started growing quicker than before. In the mass of "status checks" with corresponding "sending status" lines I found a Motion Detector line that corresponded to an intentionally blanked screen snapping back to life:

2023-03-21 18:05:46 RPINTS: StatusCheck;
2023-03-21 18:05:46 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-03-21 18:05:46 RPINTS: Motion Detector MD-Motion Detected Motion
2023-03-21 18:05:46 RPINTS: StatusCheck;
2023-03-21 18:05:46 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-03-21 18:05:46 RPINTS: StatusCheck;

So it's definitely R'Pints that's waking the screen. It's just not doing the rest of the stuff :)

Cheers!
 
phpmyadmin question: it was installed and I can get into the gui but it has no idea where any databases are and on the Databases sheet it has this:

1679439270858.png


Not that I want to create a database - I just want to link to one.

I have older versions of phpmyadmin running on numerous nodes and they all have a link to their respective databases and I can paw through them at will - but I don't remember doing anything special to get them to find their RaspberryPints databases. Is there a trick I'm missing?

Cheers!
 
In the mass of "status checks" with corresponding "sending status" lines
do you still have the log(msg) line in FlowMonitor.py? If so remove it, status check should be suppressed and not log.
R'Pints that's waking the screen. It's just not doing the rest of the stuff
I figured out the problem, the sound file setting was never passed to the thread so it really wasnt trying to play a sound. But it should have turned the LED on for 1 second. I committed my fix for FlowMonitor.py for you to take. I forced the command outside that thread and it played but when I tested with the thread it did not so Im 100% convinced it will play but if you could test and let me know.
no idea where any databases are and on the Databases sheet it has this
what user did you use to login with? Try your RPints user if you didnt use that.
 
But it should have turned the LED on for 1 second
I figured it out. Besides the soundfile i forgot to pass the rest of the motion sensors parameters. I will have an update later today when i get a chance to make and test the changes
 
do you still have the log(msg) line in FlowMonitor.py? If so remove it, status check should be suppressed and not log.
Ah yes, I did. Good call. Commented that line out and et voila! Much tighter log file now :)
No rush on your next update, I'm in the middle of painting some stuff in the brewery...

Cheers!
 
I'm running on fumes and would probably brick my RPi if I tried updating tonight.
Should be able to give it a fully rational try in the morning :)

Cheers!
 
fyi, I lost my system boot drive a few days ago. After some hair-raising moments it appears I didn't lose a bit of decades of data which is backed up in various places, but I did lose the OS and the entire application suite I had accumulated since the nineties, really. I have been recovering everything piece by piece as I build a fresh system disk, and re-installing desktop Github and fetching down the updated R'Pints kit is on the "to do" list. Hopefully I'll get to that soon...

Cheers!
 
Like, right now :)

Code:
2023-04-02 11:03:12 RPINTS: starting WS server
2023-04-02 11:03:12 RPINTS: starting device monitors...
2023-04-02 11:03:12 RPINTS: starting command server
2023-04-02 11:03:12 RPINTS: starting fan control
2023-04-02 11:03:12 RPINTS: resetting Arduino
2023-04-02 11:03:12 RPINTS: Fan Control fanControl1 is Running
2023-04-02 11:03:12 RPINTS: Not Configured to run Fan
2023-04-02 11:03:13 RPINTS: Creating Serial Listener
2023-04-02 11:03:13 RPINTS: Motion Detector MD-Motion is Running
2023-04-02 11:03:13 RPINTS: 1Wire Temperature Thread 1 is Running
2023-04-02 11:03:13 RPINTS: waiting for Arduino to come alive
2023-04-02 11:03:14 RPINTS: Adding 28-0120429573ec Temp[23.1] low:-10.0 high:40.0
2023-04-02 11:03:15 RPINTS: Arduino alive...
2023-04-02 11:03:15 RPINTS: getting config data for Arduino
2023-04-02 11:03:15 RPINTS: Arduino config, about to send: C:6:2:5:6:7:8:9:0:300:200:30:250:0:0:0|
2023-04-02 11:03:15 RPINTS: Waiting for Config Response
2023-04-02 11:03:15 RPINTS: Arduino says: C:6:2:5:6:7:8:9:0:300:200:30:250:0:0:0|
2023-04-02 11:03:15 RPINTS: listening to Arduino
2023-04-02 11:03:15 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-04-02 11:03:15 RPINTS: Adding 28-012042213455 Temp[23.1] low:-10.0 high:40.0
2023-04-02 11:03:15 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-04-02 11:03:16 RPINTS: Adding 28-012042b63faf Temp[23.2] low:-10.0 high:40.0
2023-04-02 11:03:16 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-04-02 11:03:17 RPINTS: Adding 28-012042dc4c54 Temp[23.1] low:-10.0 high:40.0
2023-04-02 11:03:17 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-04-02 11:03:20 RPINTS: Motion Detector MD-Motion Detected Motion
Traceback (most recent call last):
  File "/var/www/html/rpints/python/FlowMonitor.py", line 716, in MOTION
    self.dispatch.updatepin(int(self.ledPin), True)
AttributeError: 'MotionDetectionPIRThread' object has no attribute 'dispatch'
2023-04-02 11:03:20 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-04-02 11:04:00 RPINTS: Motion Detector MD-Motion Detected Motion
Traceback (most recent call last):
  File "/var/www/html/rpints/python/FlowMonitor.py", line 716, in MOTION
    self.dispatch.updatepin(int(self.ledPin), True)
AttributeError: 'MotionDetectionPIRThread' object has no attribute 'dispatch'

This repeats as long as the PIR is exposed...

Cheers!
 
The raspberrypints.com website seems to have an error or has been retired.

Is there anywhere with the parts list other than the raspberry pi so that I can get the flow meters and other parts needed?

I have Rpints working without flow meters but think I'm up for the next challenge.

I was discussing the Rpints with the owner of a homebrew shop and he said impossible to measure flow without meters causing cavitation and beer to pour as foam. I'm pretty sure this thread being so long is testament to the fact the system does work.

Thank you
 
My half dozen SwissFlow meters in service since Memorial Day 2014 say said shop owner is sadly misinformed :)

The parts list is quite small:
- one RaspberryPi, preferably a quad core version, with power supply and SD card to fit. [edit] A single core version will be slow, a dual core will actually work just fine and is what I have running my brewery. But the quad core will be useful for more stuff if you get involved with chambers and controls. I run a keezer and three BrewPi "classic" refrigerator temperature controllers from one dual core RPi 2B.

- one Arduino sporting a 328P or equivalent microcontroller, such as an UNO R3 or a NANO, with an appropriate power supply
- one flow meter for each faucet, preferentially SwissFlow SF800, with appropriate fittings to connect at beer QD and tap line.
- recommend one 240 ohm pull-up resistor to Arduino +5V for each meter. A 1/8th watt resistor or fatter is fine.
- a display of some kind

fwiw, I have a RAR archive of the original Raspberrypints.com web site parked on my Google Drive. You can download it and expand it in a folder and access it with a browser...

Cheers!
 
Last edited:
My half dozen SwissFlow meters in service since Memorial Day 2014 say said shop owner is sadly misinformed :)

The parts list is quite small:
- one RaspberryPi, preferably a quad core version, with power supply and SD card to fit.
- one Arduino sporting a 328P or equivalent microcontroller, such as an UNO R3 or a NANO, with an appropriate power supply
- one flow meter for each faucet, preferentially SwissFlow SF800, with appropriate fittings to connect at beer QD and tap line.
- recommend one 240 ohm pull-up resistor to Arduino +5V for each meter.
- a display of some kind

fwiw, I have a RAR archive of the original Raspberrypints.com web site parked on my Google Drive. You can download it and expand it in a folder and access it with a browser...

Cheers!
Thank you so much, I'll get ordering and reading the details.
 
Where do you prder the flow meters from and about how much do they cost? I can't find anything online but some datasheets.
 
Last edited:
and that it's not a variant with any brass in it.

Quite the price difference I had noted between the swiss and the alternatives. But from reading appears that the swiss flow might be more accurate than the adafruit type.
 
I have had no luck trying to update my windows server install to the newest version. Is there an installer I can use for windows to just start fresh?
 
"Windows Server install?"
I may be missing something (for which you can punish me later :D) but the server/back-end side of R'Pints is written essentially for Debian Unix...

Cheers!
 
Is there an installer I can use for windows to just start fresh?
My installer is meant to setup Linux with the correct software. But I do use windows for all my webpage development but use Pi for the actual flowmeters since the python was designed for the PI's GPIO. There may be a way to install arduino on embedded windows and modify the python as needed.

They way I setup windows is Enable IIS and install PHP.
Put RPints in the inetpub\wwwroot folder, usually under its own directory so other sites can be served alongside of it.
Open IIS, expand the tree till you see RPints, right click and hit convert to application.
Confirm index.php is a default webpage
Open browser to <servername>\<RPints Folder Name>
 
This repeats as long as the PIR is exposed...
Fun fact, if you dont read a notification HomeBrewTalk doesnt send you any more emails about notification until you read it so I was a little late seeing this

I see the issue, and comitted the fix if you get latest again
 
No problem, I was busy building a new boot drive for this workstation anyway :)

So I did the update in place, as this witnesses...

1680795660669.png


...but this still happens:

Code:
2023-04-06 11:30:36 RPINTS: Could not import RFID Reader, RFID disabled. Assuming SPI not installed/configured
2023-04-06 11:30:38 RPINTS: resetting alamode to try to force it to listen to us...
2023-04-06 11:30:39 RPINTS: giving it a short break to wake up again...
2023-04-06 11:30:41 RPINTS: reflashing Arduino via:
/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -patmega328p -calamode -P/dev/ttyS0 -b115200 -D -Uflash:w:/var/www/html/rpints//arduino/raspberrypints/raspberrypints.cpp.hex:i
2023-04-06 11:30:45 RPINTS: 
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: reading input file "/var/www/html/rpints//arduino/raspberrypints/raspberrypints.cpp.hex"
avrdude: writing flash (11056 bytes):

Writing | ################################################## | 100% 1.47s

avrdude: 11056 bytes of flash written
avrdude: verifying flash memory against /var/www/html/rpints//arduino/raspberrypints/raspberrypints.cpp.hex:
avrdude: load data flash data from input file /var/www/html/rpints//arduino/raspberrypints/raspberrypints.cpp.hex:
avrdude: input file /var/www/html/rpints//arduino/raspberrypints/raspberrypints.cpp.hex contains 11056 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.07s

avrdude: verifying ...
avrdude: 11056 bytes of flash verified

avrdude done.  Thank you.


2023-04-06 11:30:45 RPINTS: starting WS server
2023-04-06 11:30:45 RPINTS: starting device monitors...
2023-04-06 11:30:45 RPINTS: starting command server
2023-04-06 11:30:45 RPINTS: starting fan control
2023-04-06 11:30:45 RPINTS: Fan Control fanControl1 is Running
2023-04-06 11:30:45 RPINTS: resetting Arduino
2023-04-06 11:30:45 RPINTS: Not Configured to run Fan
2023-04-06 11:30:46 RPINTS: Creating Serial Listener
2023-04-06 11:30:46 RPINTS: Motion Detector MD-Motion is Running
2023-04-06 11:30:46 RPINTS: 1Wire Temperature Thread 1 is Running
2023-04-06 11:30:46 RPINTS: waiting for Arduino to come alive
2023-04-06 11:30:47 RPINTS: Adding 28-0120429573ec Temp[22.9] low:-10.0 high:40.0
2023-04-06 11:30:48 RPINTS: Arduino alive...
2023-04-06 11:30:48 RPINTS: getting config data for Arduino
2023-04-06 11:30:48 RPINTS: Arduino config, about to send: C:6:2:5:6:7:8:9:0:300:200:30:250:0:0:0|
2023-04-06 11:30:48 RPINTS: Waiting for Config Response
2023-04-06 11:30:48 RPINTS: Arduino says: C:6:2:5:6:7:8:9:0:300:200:30:250:0:0:0|
2023-04-06 11:30:48 RPINTS: listening to Arduino
2023-04-06 11:30:48 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-04-06 11:30:48 RPINTS: Adding 28-012042213455 Temp[23.0] low:-10.0 high:40.0
2023-04-06 11:30:48 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-04-06 11:30:49 RPINTS: Motion Detector MD-Motion Detected Motion
Traceback (most recent call last):
  File "/var/www/html/rpints/python/FlowMonitor.py", line 716, in MOTION
    self.dispatch.updatepin(int(self.ledPin), True)
AttributeError: 'MotionDetectionPIRThread' object has no attribute 'dispatch'
2023-04-06 11:30:49 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-04-06 11:30:49 RPINTS: Adding 28-012042b63faf Temp[23.0] low:-10.0 high:40.0
2023-04-06 11:30:49 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-04-06 11:30:50 RPINTS: Adding 28-012042dc4c54 Temp[23.0] low:-10.0 high:40.0
2023-04-06 11:30:50 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|
2023-04-06 11:31:23 RPINTS: Motion Detector MD-Motion Detected Motion
Traceback (most recent call last):
  File "/var/www/html/rpints/python/FlowMonitor.py", line 716, in MOTION
    self.dispatch.updatepin(int(self.ledPin), True)
AttributeError: 'MotionDetectionPIRThread' object has no attribute 'dispatch'
2023-04-06 11:31:24 RPINTS: Sending Status;N;-1;0;0;0;0;0;0;0;|

...and I cannot find a single file with a date newer than my April 2nd edits to the config.py file to enable flowmon logging, so I don't think the update actually "updated" anything.

I'll see if my Github desktop can find anything but what files were supposed to change?

Cheers!
 
Back
Top