[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.
Hello again, i have more questions :p everything seems to be working well, but one thing, what is the red cross around the keg ? i assume it's link to the valves, i don't have that icon when i deactivate the valves, but it doesn't change when i open the valves... what does it mean exactly ?
Screenshot-04-11-2022-15-21-03.png


and another thing, in the motion detector configuration, when you put a pin number for the LED, how we need to connect the LED exactly ? only the pin and the gnd with some resistor ? or it need to interact with the PIR ? on the Pi or arduino ?

thanks
 
i assume it's link to the valves, i don't have that icon when i deactivate the valves, but it doesn't change when i open the valves... what does it mean exactly
Yes that is linked to the valves, Open the valves and refresh the page to see if it changes. it could be that it doesnt see the update from the python to refresh the page when the valves changes.

how we need to connect the LED exactly ? only the pin and the gnd with some resistor ?
I dont use the LED so i cant help, but im pretty sure you need a resistor in there.
 
1667577896875.png

It is based on a database value set by the python so if the python is not running this will not update. you can look at /var/log/rpints.log to see if there are any errors in it. Also if you dont have the value pin set correctly it wont change
 
yes, oki, the pins are correct and i hear the click and see the led of the relays, and when i have another internet tab with the tap's page, it refresh automatically when i click on "let it flow" or "stop", but i have some errors in the log effectively...:
Traceback (most recent call last):
File "/usr/lib/python3.9/socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.9/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/var/www/rpints/python/mod_pywebsocket/standalone.py", line 673, in __init__
CGIHTTPServer.CGIHTTPRequestHandler.__init__(
File "/usr/lib/python3.9/http/server.py", line 653, in __init__
super().__init__(*args, **kwargs)
File "/usr/lib/python3.9/socketserver.py", line 720, in __init__
self.handle()
File "/usr/lib/python3.9/http/server.py", line 427, in handle
self.handle_one_request()
File "/usr/lib/python3.9/http/server.py", line 405, in handle_one_request
if not self.parse_request():
File "/var/www/rpints/python/mod_pywebsocket/standalone.py", line 774, in parse_request
self._options.dispatcher.transfer_data(request)
File "/var/www/rpints/python/mod_pywebsocket/dispatch.py", line 297, in transfer_data
request.ws_stream.close_connection()
File "/var/www/rpints/python/mod_pywebsocket/_stream_hybi.py", line 848, in close_connection
self._send_closing_handshake(code, reason)
File "/var/www/rpints/python/mod_pywebsocket/_stream_hybi.py", line 817, in _send_closing_handshake
self._write(frame)
File "/var/www/rpints/python/mod_pywebsocket/_stream_base.py", line 141, in _write
self._request.connection.write(bytes_to_write)
File "/var/www/rpints/python/mod_pywebsocket/standalone.py", line 198, in write
return self._request_handler.wfile.write(data)
File "/usr/lib/python3.9/socketserver.py", line 799, in write
self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe
[2022-11-04 17:35:45,686] [ERROR] mod_pywebsocket.standalone.WebSocketServer: Exception in processing request from: ('::ffff:192.168.0.26', 11195, 0, 0)
None
Traceback (most recent call last):
File "/usr/lib/python3.9/socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.9/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/var/www/rpints/python/mod_pywebsocket/standalone.py", line 673, in __init__
CGIHTTPServer.CGIHTTPRequestHandler.__init__(
File "/usr/lib/python3.9/http/server.py", line 653, in __init__
super().__init__(*args, **kwargs)
File "/usr/lib/python3.9/socketserver.py", line 720, in __init__
self.handle()
File "/usr/lib/python3.9/http/server.py", line 427, in handle
self.handle_one_request()
File "/usr/lib/python3.9/http/server.py", line 405, in handle_one_request
if not self.parse_request():
File "/var/www/rpints/python/mod_pywebsocket/standalone.py", line 774, in parse_request
self._options.dispatcher.transfer_data(request)
File "/var/www/rpints/python/mod_pywebsocket/dispatch.py", line 297, in transfer_data
request.ws_stream.close_connection()
File "/var/www/rpints/python/mod_pywebsocket/_stream_hybi.py", line 848, in close_connection
self._send_closing_handshake(code, reason)
File "/var/www/rpints/python/mod_pywebsocket/_stream_hybi.py", line 817, in _send_closing_handshake
self._write(frame)
File "/var/www/rpints/python/mod_pywebsocket/_stream_base.py", line 141, in _write
self._request.connection.write(bytes_to_write)
File "/var/www/rpints/python/mod_pywebsocket/standalone.py", line 198, in write
return self._request_handler.wfile.write(data)
File "/usr/lib/python3.9/socketserver.py", line 799, in write
self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe
[2022-11-04 17:35:45,694] [ERROR] mod_pywebsocket.standalone.WebSocketServer: Exception in processing request from: ('::ffff:192.168.0.100', 53424, 0, 0)
None
2022-11-04 17:35:45 RPINTS: Sending Status;N;-1;0;0;0;0;|
 
Just wanted to drop in and say thank you to RandR+, and all the others that are keeping this running. Also, I want to remind everyone to backup their SD cards if they haven't done it recently. I had a scare last weekend where I thought my card was corrupt. Turns out I was just impatient and didn't wait for the PI to fully boot. You better believe that once it came back up that I backed up the card.

Now I've got a question, what weight sensors are people using on their systems? I'm thinking about building/adding a scale to keep track of my CO2 tank. I know I'll need an HX711, but what kind of load sensors are compatible? Do you use one sensor or a group (like 1 under each corner)? Also does the HX711 plug into the PI GPIO pins or does it plug into the Arduino (I'm running a Nano).
 
i have some errors in the log effectively
Most likely those error are because a screen refreshed and the python is trying to talk to the old connection. I thought i surpressed those errors as they arent a real problem.

You can try checking the database for the value, from the terminal
sudo mysql
use raspberrypints (or your database name)
select valvepinstate from tapconfig;


any tap that returns 0 should be on and that should indicate on the main tap list
 
Also does the HX711 plug into the PI GPIO pins or does it plug into the Arduino
while i dont use scales, I do know that the sensor hooks up to the PI GPIO pins as RPints uses python running on the PI to talk to it
 
select valvepinstate from tapconfig;

when i check my database, i see the correct pin number valvePin, and the valveOn to 0 (it changes to 1 when I click on "let it flow"), but for the valvePinState, i have NULL, and if I change that manually to 0, it changes the red cross to a green check, but not automatically...

just in case, i don't have the valves connected yet, i simulate them with the relays, (if it does change something...) i am just too impatient to try ^^
 
valvePinState, i have NULL
Are relays connected to the Pi or Shield?

If its the shield i found a bug in the python that would cause this. In python\PintDispatch.py ~line 711
change
str(-1*pin)
to
str(pin)

the python expects the pins to be on the Pi i will have to do something to fix that
 
Are relays connected to the Pi or Shield?

to the shield, it is easier for me, but i can try to connect them to the Pi when i have the time, i think i have still some available pins, and in this case, i need to check the case Valvle Pi pin ? and put the gnd between the relay and the Pi (instead of the shield) to have the pin's state loop.
 
to the shield, it is easier for me, but i can try to connect them to the Pi when i have the time, i think i have still some available pins, and in this case, i need to check the case Valvle Pi pin ?
I think if you can make that code change you shouldnt have to change the wiring. its just the update is trying to set the state for a negative pin but you only have positive pins
 
need to check the case Valvle Pi pin
Im going back on my last post, I realized the shield is the one that makes the decision to turn on or off the valves not the python. So if the valves are on the shield the python does not get an update that they changed.
So yes you can switch the wiring and check the pi pin for each tap or i can code up a new message that will tell the Python to update the database (which i will do eventually now that i know about this).
 
i tried to change the wires to the Pi, it works, the icon change to green check, but question ? is it possible to change the timing to refresh the web page ? because it refreshes too fast, and the update does not occur at the first automatic update of the database, but if i refresh the page again one second later, i see the change...

and with a RFID card, it opens the relays, change the valves to open, but i need to refresh manually to see the green check ^^ that's weird
 
Last edited:
I have a new problem with my installation, and i don't really know why, sometimes the valves close right after they open when I scan a RFID card, but not always...like 1 out of 10 maybe... not regular...that's the problem really, I tried to search for similar problem in the thread, and i found that I could be power dumb, but the pins valves are link to the raspberry (with a power only for him, I checked for undervoltage, it is fine), and i have a 12v power for the valves, the uno is link to the raspberry with USB, but it has its own 9v power...and I have only 3 valves.


Maybe in the script, is it possible to add some wait time after switch on relays between the valves? Like 200ms or so between each valves, to avoid that ? I don't know if it could help... Because like I said, it happens not so often.
 
Maybe in the script, is it possible to add some wait time after switch on relays between the valves?
It would be possible, in the Arduino code function piStatusCheck loops through the valves to turn them on, thats were the delay would need to be added.

Before that i would rather check the logs to see if they are being turned off right after turning on. To do that verify in /python/Config.py
config['flowmon.debug' ] = True
and
config['dispatch.debug' ] = True

if not set them that way and restart the service.

When it does happen, stop and look at /var/log/rpints.log
Towards the end of the file there should be a WP;1;3;<pin1>;<pin2>;<pin3> message then general logging after that, if you see a WP;0;3;<pin1>;<pin2>;<pin3> message after that then the logic is closing the valves and its not a power issue.

When I first started with valves I ran into the same issue and found that the new logic wasnt right so I added a lot of debug log to trace why they were shutting down. If you see the WP;0 message feel free to post the logs between WP;1 and WP;0 message for me to decode
 
I don’t have that option.
Looks like you are using the original RPints and not my version. You will need to add to the database manually.

from the terminal
sudo mysql
use <Database name> (probably raspberrypints)

INSERT INTO `beerStyles`( name, catNum, category, ogMin, ogMax, fgMin, fgMax, abvMin, abvMax, ibuMin, ibuMax, srmMin, srmMax, createdDate, modifiedDate ) VALUES
( 'New England IPA', '1A', 'IPA', '1.028', '1.04', '0.998', '1.008', '2.8', '4.2', '8', '12', '2', '3', NOW(), NOW() ;
 
feel free to post the logs between WP;1 and WP;0 message for me to decode
that's weird, i don't have the WP;1 or WP;0 in the log, i put True for the flowmon and the dispatch, but nothing in the log even after restarting^^

and i don't have much difference between a good one and a bad one as you can see: (the RFID:1 worked, and the RFID:3 did not in this case )

2022-12-02 18:43:33 RPINTS: RFID:1
2022-12-02 18:43:33 RPINTS: Sending Status;Y;1;0;0;0;0;|
2022-12-02 18:43:33 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:43:34 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:43:34 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:43:38 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:43:38 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:43:41 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:43:42 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:43:45 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:43:45 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:43:51 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:43:51 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:43:55 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:43:55 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:43:58 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:43:58 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:44:02 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:44:02 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:44:03 RPINTS: Shutdown All taps, no select
2022-12-02 18:44:03 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:44:04 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:44:04 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:44:05 RPINTS: RFID 136834114252 User Id b'3'
2022-12-02 18:44:05 RPINTS: Sending Status;Y;3;0;0;0;0;|
2022-12-02 18:44:05 RPINTS: RFID:3
2022-12-02 18:44:06 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:44:06 RPINTS: Sending Status;Y;3;0;0;0;0;|
2022-12-02 18:44:06 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:44:06 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:44:08 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:44:08 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:44:10 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:44:11 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:44:14 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-02 18:44:14 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-02 18:44:36 RPINTS: Shutdown All taps, no select
2022-12-02 18:44:36 RPINTS: Sending Status;N;-1;0;0;0;0;|

but i have some errors in the log before that: (but i'm not sure that it was that because the RFID1 worked juste after... ^^

2022-12-02 18:38:30 RPINTS: Sending Status;N;-1;0;1;0;0;|
2022-12-02 18:38:32 RPINTS: reconfigure trigger: valve
2022-12-02 18:38:32 RPINTS: updating valve status from db
2022-12-02 18:38:32 RPINTS: valve update: RPU:VALVE:0=0
Traceback (most recent call last):
File "/usr/lib/python3.9/socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.9/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/var/www/rpints/python/mod_pywebsocket/standalone.py", line 673, in __init__
CGIHTTPServer.CGIHTTPRequestHandler.__init__(
File "/usr/lib/python3.9/http/server.py", line 653, in __init__
super().__init__(*args, **kwargs)
File "/usr/lib/python3.9/socketserver.py", line 720, in __init__
self.handle()
File "/usr/lib/python3.9/http/server.py", line 427, in handle
self.handle_one_request()
File "/usr/lib/python3.9/http/server.py", line 405, in handle_one_request
if not self.parse_request():
File "/var/www/rpints/python/mod_pywebsocket/standalone.py", line 774, in parse_request
self._options.dispatcher.transfer_data(request)
File "/var/www/rpints/python/mod_pywebsocket/dispatch.py", line 297, in transfer_data
request.ws_stream.close_connection()
File "/var/www/rpints/python/mod_pywebsocket/_stream_hybi.py", line 848, in close_connection
self._send_closing_handshake(code, reason)
File "/var/www/rpints/python/mod_pywebsocket/_stream_hybi.py", line 817, in _send_closing_handshake
self._write(frame)
File "/var/www/rpints/python/mod_pywebsocket/_stream_base.py", line 141, in _write
self._request.connection.write(bytes_to_write)
File "/var/www/rpints/python/mod_pywebsocket/standalone.py", line 198, in write
return self._request_handler.wfile.write(data)
File "/usr/lib/python3.9/socketserver.py", line 799, in write
self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe
[2022-12-02 18:38:32,762] [ERROR] mod_pywebsocket.standalone.WebSocketServer: Exception in processing request from: ('::ffff:192.168.0.100', 34648, 0, 0)
None
2022-12-02 18:38:32 RPINTS: Sending Status;N;-1;0;0;0;0;|
 
i don't have the WP;1 or WP;0 in the log
I forgot your arduino is controlling the relays so you dont know what it is doing without it telling the python.

I just committed a change that Arduino will push the valve status to the pi so you can see the status on the webpage. If you get latest go into python/FlowMonitor.py and uncomment line 445 (remove # at the beginning of the line)

Now the log should show when the Arduino updates the valve pin with the message got a Update Pins Request
 
My Rpints is performing brilliantly. I would like to know if the font size in the beer description can be enlarged - there doesn't appear to be anywhere within the settings to be able to do this, so I expect a css file will need to be amended
 
font size in the beer description can be enlarged
No css setting in the Admin panel, you need to adjust css:

add

#beerNotes{
font: 3em Georgia;
}

to the end of <wwwroot>/style.css
Of course, adjust 3em to the size you want
 
Is there a link to your version? I have mine installed on a windows computer instead of a RPi.
Looks like you are using the original RPints and not my version. You will need to add to the database manually.

from the terminal
sudo mysql
use <Database name> (probably raspberrypints)

INSERT INTO `beerStyles`( name, catNum, category, ogMin, ogMax, fgMin, fgMax, abvMin, abvMax, ibuMin, ibuMax, srmMin, srmMax, createdDate, modifiedDate ) VALUES
( 'New England IPA', '1A', 'IPA', '1.028', '1.04', '0.998', '1.008', '2.8', '4.2', '8', '12', '2', '3', NOW(), NOW() ;
 
I forgot your arduino is controlling the relays so you dont know what it is doing without it telling the python.
My raspberry pi control the valves through the relays, not my Arduino, I only have the flowmeter on the arduino... But if i test that:
i think this time i only had 1 or 2 out of 3 valves that are closed right after the opening (it sound like that and after the 30sec the valves still open are closing...) so not a complete restart of the arduino i presume.

2022-12-03 00:57:05 RPINTS: RFID 136834114252 User Id b'3'
2022-12-03 00:57:05 RPINTS: Sending Status;Y;3;0;0;0;0;|
2022-12-03 00:57:05 RPINTS: RFID:3
2022-12-03 00:57:05 RPINTS: got a Write Pins Request: WP;0;3;36;38;40
2022-12-03 00:57:05 RPINTS: Sending DONE;3;0|
2022-12-03 00:57:05 RPINTS: Sending Status;Y;3;0;0;0;0;|
2022-12-03 00:57:05 RPINTS: got a Write Pins Request: WP;1;1;38
2022-12-03 00:57:05 RPINTS: Sending DONE;1;1|
2022-12-03 00:57:05 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-03 00:57:06 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-03 00:57:06 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-03 00:57:12 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-03 00:57:12 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-03 00:57:35 RPINTS: Shutdown All taps, no select
2022-12-03 00:57:35 RPINTS: got a Write Pins Request: WP;1;3;36;38;40


but with the error with all the valves closing right after i have that:
2022-12-03 01:03:12 RPINTS: RFID 332199026186 User Id b'1'
2022-12-03 01:03:12 RPINTS: Sending Status;Y;1;0;0;0;0;|
2022-12-03 01:03:12 RPINTS: RFID:1
2022-12-03 01:03:12 RPINTS: got a Write Pins Request: WP;0;3;36;38;40
2022-12-03 01:03:12 RPINTS: Sending DONE;3;0|
2022-12-03 01:03:13 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-03 01:03:13 RPINTS: Sending Status;Y;1;0;0;0;0;|
2022-12-03 01:03:13 RPINTS: got a Write Pins Request: WP;1;1;36
2022-12-03 01:03:13 RPINTS: Sending DONE;1;1|
2022-12-03 01:03:13 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-03 01:03:13 RPINTS: got a Write Pins Request: WP;1;1;38
2022-12-03 01:03:13 RPINTS: Sending DONE;1;1|
2022-12-03 01:03:13 RPINTS: got a Write Pins Request: WP;1;1;40
2022-12-03 01:03:13 RPINTS: Sending DONE;1;1|
2022-12-03 01:03:13 RPINTS: Sending Status;Y;1;0;0;0;0;|
2022-12-03 01:03:13 RPINTS: got a Write Pins Request: WP;1;1;36
2022-12-03 01:03:14 RPINTS: Sending DONE;1;1|
2022-12-03 01:03:14 RPINTS: got a Write Pins Request: WP;1;1;38
2022-12-03 01:03:14 RPINTS: Sending DONE;1;1|
2022-12-03 01:03:14 RPINTS: got a Write Pins Request: WP;1;1;40
2022-12-03 01:03:14 RPINTS: Sending DONE;1;1|
2022-12-03 01:03:14 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-03 01:03:15 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-03 01:03:15 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-03 01:03:20 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-03 01:03:20 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-03 01:03:25 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-03 01:03:25 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-03 01:03:43 RPINTS: Shutdown All taps, no select
2022-12-03 01:03:43 RPINTS: got a Write Pins Request: WP;1;3;36;38;40
2022-12-03 01:03:43 RPINTS: Sending DONE;3;1|
2022-12-03 01:03:44 RPINTS: Sending Status;N;-1;0;0;0;0;|

by the way, when i was playing with the debug, i saw that if i change the config['dispatch.debug' ] = True, then i see the change for the kegs (red cross => green check) automatically when I scan a RFID card, if i put False, the webpage doesn't refresh automatically. that better now :p
 
Last edited:
time i only had 1 or 2 out of 3 valves that are closed right after the opening
Based on the logs it seems like at least 1 valve is closing as soon as its opening, the first i see
2022-12-03 00:57:05 RPINTS: got a Write Pins Request: WP;0;3;36;38;40
2022-12-03 00:57:05 RPINTS: got a Write Pins Request: WP;1;1;38
Which means pin 38 is turned off right away

the second I see all three get turned off (twice)
2022-12-03 01:03:12 RPINTS: got a Write Pins Request: WP;0;3;36;38;40
2022-12-03 01:03:13 RPINTS: got a Write Pins Request: WP;1;1;36
2022-12-03 01:03:13 RPINTS: got a Write Pins Request: WP;1;1;38
2022-12-03 01:03:13 RPINTS: got a Write Pins Request: WP;1;1;40
2022-12-03 01:03:13 RPINTS: Sending Status;Y;1;0;0;0;0;|
2022-12-03 01:03:13 RPINTS: got a Write Pins Request: WP;1;1;36
2022-12-03 01:03:14 RPINTS: got a Write Pins Request: WP;1;1;38
2022-12-03 01:03:14 RPINTS: got a Write Pins Request: WP;1;1;40

Looking at the code the only thing that makes sense is that the manual control (hitting let it flow from the tap menu) is overriding the RFID, but I dont see how.

If you are comfortable modifying the arudino you can comment out line 397 (put // infront of the text) then upload and try again.
This will not allow you to manually stop a valve, but if it stops the closing then we have a root cause.

This isnt happening on mine and i am not sure why it is for you, If it was happening to me i would add more debug statements around lines 390-400 to capture what the arduino is thinking to figure out why its turning off the valves (if that were the spot causing the shut down, which i think it is because most other spots would log out why like: "Shutdown All taps, no select")
 
If you are comfortable modifying the arudino you can comment out line 397 (put // infront of the text) then upload and try again.
This will not allow you to manually stop a valve, but if it stops the closing then we have a root cause.

I can try yes, if you help me a little in the process with some steps...

This isnt happening on mine and i am not sure why it is for you,

This is weird yes, because sometimes it happens like twice in a row, and sometimes never during 10 or more test... ^^ it seems random, but maybe not
 
if you help me a little in the process with some steps...
the easiest way is from the Pi desktop, open arduino/raspberrypints/raspberrypints.ino by double clicking it, this will open the Arduino IDE.
find line 397 and type // Infront of the text.
Stop Rpints from the terminal
sudo /etc/init.d/flowmon stop
back on the IDE hit the upload button
1670076413680.png

this will compile the change and push to the board.

then start Rpints
sudo /etc/init.d/flowmon start
 
I may have something new, as I could not really try it before, but I just put some kegs that I had in my kegerator, and when I plug them, and try them, if I scan the RFID and all the valves stay open, once I start to pour, it closes the valve I am using ^^ instantly not the other one, and if i try an other one, it closes too...

so i may have a problem with my flowmeters or at least in my configuration, because they seem to work well when i tried them with water, alone without valves... :(
 
Last edited:
does 1 stay open? if so then i suspect you have the valve configured to the wrong tap so the tap that remains open is not the one pouring
no, it only close the one I'm using ^^ this is weird actually, i cannot make the flowmeters working again... i tried to remove the valves (thanks to quickfit tube ^^) the flowmeter doesn't count the poor, I will need to check all the wiring again, but it is a pain in the ass with my setup... and this is weirder because with the valves, it does shut them when I start pouring... so I assume it "feels" something...

I did not try with 3, 4 meters of wire between flowmeters and arduino, i don't know if it could be an issue...
 
Last edited:
it only close the one I'm using
definitely sounds like its detecting a pour and shutting down the valve.

The only place i could see this happening without more logging is ~line 292, here it only logs if it detects 10 pulses, but if it were to detect less than 10 then it would stop the valve without logging anything. You could try to change
if( pulseCount > 10 )
to
if( pulseCount > 0 )

and upload the sketch again. hopefully this will turn log out information to track this down.
 
this is weird actually, i cannot make the flowmeters working again
while thinking about this i realized i committed a change i was working on to improve timing of the pulses but i could not get it to work locally.
I thought i reverted before the commit but i was wrong

I just committed the fix and added some more logging to the write pins message. Could you get latest arduino code and try again
 
Could you get latest arduino code and try again

I got the latest arduino code, i put the changes (pulseCount > 0, and the // in front of the text lign 397), and i have something, the rfid open the valves, I started pouring, the 2 others valves are shutting, and the pour is counted...

2022-12-06 11:47:39 RPINTS: RFID:1
2022-12-06 11:47:39 RPINTS: valve update: RPU:VALVE:-1=0
2022-12-06 11:47:39 RPINTS: valve update: RPU:VALVE:-1=0
2022-12-06 11:47:39 RPINTS: valve update: RPU:VALVE:-1=0
2022-12-06 11:47:39 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 11:47:41 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-06 11:47:41 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 11:47:44 RPINTS: got a update: U;-1;5;26
2022-12-06 11:47:44 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 11:47:45 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-06 11:47:45 RPINTS: Tap Selected Pin 5 2
2022-12-06 11:47:45 RPINTS: SD NP L 5 2 138133 138104 29 300 51 50
2022-12-06 11:47:45 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 11:47:45 RPINTS: valve update: RPU:VALVE:-1=1
2022-12-06 11:47:45 RPINTS: got a update: U;1;5;56
2022-12-06 11:47:45 RPINTS: RT L 3 0 138591 138290 301 300 1 50
2022-12-06 11:47:45 RPINTS: valve update: RPU:VALVE:-1=1
2022-12-06 11:47:45 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 11:47:46 RPINTS: RT L 4 1 139036 138735 301 300 2 50
2022-12-06 11:47:46 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 11:47:46 RPINTS: got a update: U;1;5;82
2022-12-06 11:47:46 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 11:47:47 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-06 11:47:47 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 11:47:47 RPINTS: got a update: U;1;5;108
2022-12-06 11:47:47 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 11:47:48 RPINTS: got a update: U;1;5;134
2022-12-06 11:47:48 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 11:47:50 RPINTS: got a pour: P;1;5;152
Pourpour on pin: 5, count: 152, conversion: 540, amount: 0.28148148148148, amountUnit: ml, user: 1
2022-12-06 11:47:52 RPINTS: restarting fan timer after pour
2022-12-06 11:47:52 RPINTS: count update: RPU:FLOW:5=152:1
2022-12-06 11:47:52 RPINTS: RT L 5 2 142911 142610 301 300 152 50
2022-12-06 11:47:52 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-06 11:47:52 RPINTS: valve update: RPU:VALVE:-1=1
2022-12-06 11:47:52 RPINTS: SD NP L 5 2 142911 142610 301 300 0 50
2022-12-06 11:47:53 RPINTS: Sending Status;N;-1;0;0;0;0;|


but it does not stop the closing of the valves, it happens again... i and may have a problem with some sealing, and leaking ^^ maybe that's why it detects some "fake" pour and closing the valves.

2022-12-06 12:19:10 RPINTS: RFID:1
2022-12-06 12:19:10 RPINTS: valve update: RPU:VALVE:-1=0
2022-12-06 12:19:10 RPINTS: valve update: RPU:VALVE:-1=0
2022-12-06 12:19:10 RPINTS: valve update: RPU:VALVE:-1=0
2022-12-06 12:19:10 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:11 RPINTS: Sending Status;Y;1;0;0;0;0;|
2022-12-06 12:19:11 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:11 RPINTS: RT L 4 1 1346212 1345909 303 300 9 50
2022-12-06 12:19:12 RPINTS: valve update: RPU:VALVE:-1=1
2022-12-06 12:19:12 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-06 12:19:12 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:12 RPINTS: RT L 3 0 1346595 1346294 301 300 1 50
2022-12-06 12:19:12 RPINTS: valve update: RPU:VALVE:-1=1
2022-12-06 12:19:12 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:12 RPINTS: RT L 3 0 1346975 1346674 301 300 1 50
2022-12-06 12:19:12 RPINTS: RT L 4 1 1347134 1346674 460 300 1 50
2022-12-06 12:19:13 RPINTS: RT L 5 2 1347205 1346674 531 300 1 50
2022-12-06 12:19:13 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:13 RPINTS: valve update: RPU:VALVE:-1=1
2022-12-06 12:19:13 RPINTS: RT L 4 1 1347703 1347402 301 300 1 50
2022-12-06 12:19:13 RPINTS: RT L 5 2 1347780 1347402 378 300 1 50
2022-12-06 12:19:13 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:17 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-06 12:19:18 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:20 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-06 12:19:21 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:24 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-06 12:19:24 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:28 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-06 12:19:28 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:30 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-06 12:19:31 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:34 RPINTS: Motion Detector MD-PIR Detected Motion
2022-12-06 12:19:34 RPINTS: Sending Status;N;-1;0;0;0;0;|
2022-12-06 12:19:41 RPINTS: Shutdown All taps, no select

i made some tests without the one leaking, it seems to be ok for now ^^


what are the original numbers for the taps settings (counts) ? i changed the numbers because my count/L was 10 times less than i saw here with my flowmeters, but maybe i did a mistake...
 
Last edited:
why it detects some "fake" pour and closing the valves.
I think that is what is happening:
This trace indicates the arudinio is resetting all taps because after 300 milliseconds only 1 pulse was detected but the pour limit is 50 pulses
2022-12-06 12:19:12 RPINTS: RT L 3 0 1346975 1346674 301 300 1 50
2022-12-06 12:19:12 RPINTS: RT L 4 1 1347134 1346674 460 300 1 50
2022-12-06 12:19:13 RPINTS: RT L 5 2 1347205 1346674 531 300 1 50

since 1 < 10 we didnt see that message before to know for sure.
Im thinking probably need to throw away the pulses when less than tap selection but not close the valves. I just committed that change, i didnt spend a lot of time testing it but i noticed it still shutdown taps that were not pouring then the pouring tap after the pour stopped.


i changed the numbers because my count/L was 10 times less than i saw here with my flowmeters, but maybe i did a mistake
I dont think the count/L is going to affect this, but if you have a lower count/L you should lower your pour trigger count. Which it looks like you have set to 50 and i have set to 200 so you should be good there
1670337719265.png
 

Attachments

  • 1670337771024.png
    1670337771024.png
    7.6 KB · Views: 0
Is there a way for me to upgrade without losing everything or do I just need to start over?
I would start and take a backup of your system.

You can then run the latest /sql/update.sql from github (I just updated it) against your database it should add most of the new table and columns that i added.

I did not test it with the code but did a static compare of the database and it looks like it got everything. It should keep your data while allowing you to update to the latest. let me know if you have issues after updating
 
Back
Top