[Version 2 Release] RaspberryPints - Digital Taplist Solution

HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Help Support Homebrew Talk:

RandR+

Supporting Member
HBT Supporter
Joined
Oct 5, 2015
Messages
789
Reaction score
244
Attached the DB and the latest logs
Loaded your database on my test system with the latest from GitHub and my test hx711 and its working
so we need to add a few more trace statement to your version
1614891202715.png



in admin/includes/managers/manager.php
Line 66 put
echo $sql."\n";
1614891493590.png

and save
that should start logging out the update statement of keg where we should be able to see the weight being set.
1614891527261.png


if the weight looks correct in the update statement then could you copy that update statement from the trace and run it against the database manually.
 

Naesstrom

Well-Known Member
Joined
Nov 4, 2019
Messages
63
Reaction score
13
Location
Växjö, Sweden
Ok I think you're on to something now... the correct values in the right fields:
Tap:1
Keg:2
UPDATE kegs SET label = NULLIF('Keg 2',''), kegTypeId = NULLIF('1',''), make = NULLIF('Kegland',''), model = null, serial = null, stampedOwner = null, stampedLoc = null, notes = null, kegStatusCode = NULLIF('SERVING',''), weight = NULLIF('270267.5',''), weightUnit = null, beerId = NULLIF('1',''), onTapId = NULLIF('1',''), active = NULLIF('1',''), emptyWeight = NULLIF('4.2600',''), emptyWeightUnit = NULLIF('kg',''), maxVolume = NULLIF('18.9271',''), maxVolumeUnit = NULLIF('ml',''), startAmount = NULLIF('18.92710',''), startAmountUnit = NULLIF('ml',''), currentAmount = NULLIF('266917698.00777',''), currentAmountUnit = NULLIF('ml',''), fermentationPSI = NULLIF('10.00',''), fermentationPSIUnit = NULLIF('psi',''), keggingTemp = NULLIF('5.00',''), keggingTempUnit = NULLIF('C',''), hasContinuousLid = 0, modifiedDate = NOW() WHERE id = '2'
Tap:2
Keg:3
UPDATE kegs SET label = NULLIF('Keg 3',''), kegTypeId = NULLIF('1',''), make = NULLIF('Kegland',''), model = null, serial = null, stampedOwner = null, stampedLoc = null, notes = null, kegStatusCode = NULLIF('SERVING',''), weight = NULLIF('39926.5',''), weightUnit = null, beerId = NULLIF('2',''), onTapId = NULLIF('2',''), active = NULLIF('1',''), emptyWeight = NULLIF('4.2600',''), emptyWeightUnit = NULLIF('kg',''), maxVolume = NULLIF('18.9271',''), maxVolumeUnit = NULLIF('ml',''), startAmount = NULLIF('18.92710',''), startAmountUnit = NULLIF('ml',''), currentAmount = NULLIF('39085798.138119',''), currentAmountUnit = NULLIF('ml',''), fermentationPSI = NULLIF('10.00',''), fermentationPSIUnit = NULLIF('psi',''), keggingTemp = NULLIF('5.00',''), keggingTempUnit = NULLIF('C',''), hasContinuousLid = 0, modifiedDate = NOW() WHERE id = '3'

So I followed your suggestion to run it with the db and...
SQL:
MariaDB [raspberrypints]> UPDATE kegs SET label = NULLIF('Keg 3',''), kegTypeId = NULLIF('1',''), make = NULLIF('Kegland',''), model = null, serial = null, stampedOwner = null, stampedLoc = null, notes = null, kegStatusCode = NULLIF('SERVING',''), weight = NULLIF('39945.0',''), weightUnit = null, beerId = NULLIF('2',''), onTapId = NULLIF('2',''), active = NULLIF('1',''), emptyWeight = NULLIF('4.2600',''), emptyWeightUnit = NULLIF('kg',''), maxVolume = NULLIF('18.9271',''), maxVolumeUnit = NULLIF('ml',''), startAmount = NULLIF('18.92710',''), startAmountUnit = NULLIF('ml',''), currentAmount = NULLIF('39103910.530248',''), currentAmountUnit = NULLIF('ml',''), fermentationPSI = NULLIF('10.00',''), fermentationPSIUnit = NULLIF('psi',''), keggingTemp = NULLIF('5.00',''), keggingTempUnit = NULLIF('C',''), hasContinuousLid = 0, modifiedDate = NOW() WHERE id = '3';
ERROR 1264 (22003): Out of range value for column 'currentAmount' at row 1
but why does my installation think the value is to large when it works in yours?
 

RandR+

Supporting Member
HBT Supporter
Joined
Oct 5, 2015
Messages
789
Reaction score
244
but why does my installation think the value is to large when it works in yours?
I tried your update on my test Virtual Machine and it worked, but gave a warning and set current amount to max value (99999.999) but on my actual pi the update errors out and doesnt do anything. Im not sure how the configuration changed on my Test VM, I dont remember changing it.

But now that we know the issue is, I think the best way to solve it is to add a scale Ratio. I update the logic to print out errors that occurs so we can see it and also added the upper limits check when setting the volume to prevent this from happening. Updating should get you to see the weight in real time.

Once you can see the real time weight, You will have to calibrate the scale yourself to fine the correct scale ratio (reference unit)
From the Example you used earlier
The correct calibration of the weight sensor and the Raspberry Pi balance is crucial. For this we need a comparison object whose weight we know. For example, I have taken two packs of rice (1kg each), since it is recommended to choose an average value of the maximum (my load cell could be used up to 5 kilograms). Place it on the scale and run it again with sudo python example.py. The displayed values can be positive as well as negative. In my case were displayed at 2kg (= 2000 gramm) values around -882000. My reference value is thus -882000 ÷ 2000 = -441.
 

Naesstrom

Well-Known Member
Joined
Nov 4, 2019
Messages
63
Reaction score
13
Location
Växjö, Sweden
OMG you're so awsome!
I calculated the ratio (271587/1020 = 266.26) and added to the ratio field but sometimes it shows the raw value:
1614954647399.png


But sometimes when updating the page it shows the correct one?
1614954736988.png

Changed the ratio to 266261 since I noticed it was reporting in g and not kg

Should I Tare after adding the ratio and removing the weight before it works?
 

Attachments

RandR+

Supporting Member
HBT Supporter
Joined
Oct 5, 2015
Messages
789
Reaction score
244
sometimes it shows the raw value:
I want it to report the raw value from the load cell including the ratio. This way if the ratio is 1 then the scale can be recalibrated without looking at the logs.
After the ratio is added it shouldnt flip back and forth between the original raw value and the referenced value, I can setup my test system, it may have something to do with what the load cell logic is doing (sometimes report the referenced weight other times report raw.

Should I Tare after adding the ratio and removing the weight before it works?
Yes i would tare so that it reads close to 0 when nothing is on it. then you should be able to physically put the keg on it and get the current amount
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
Hi all, new member and first post.

Also a total n00b on programming...

I am trying to get Rpints w/flow meters running, but it stops on step 8: configuring Rpints. I cannot connect using my IP.
I have followed all steps up to this, but as the guide is outdated i had to change a few things, i installed the LAMP stack using an updated guide as some of the stuff in the original guide is obsolete.
I also changed the path in apache config to /var/www where the Rpints files are located. Shall Rpints not be installed in any way? Just unziped to that folder?
I can connect to the Myphp setup site...

Really at a loss of what to do here.
 

Naesstrom

Well-Known Member
Joined
Nov 4, 2019
Messages
63
Reaction score
13
Location
Växjö, Sweden
I have followed all steps up to this, but as the guide is outdated i had to change a few things, i installed the LAMP stack using an updated guide as some of the stuff in the original guide is obsolete.
If you followed the old site yes it's super outdated, now we just enter a single line into the shell on the Pi and it will guide you through everything, takes a couple of minutes! :D

curl -L install.rpints.com | sudo bash
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
If you followed the old site yes it's super outdated, now we just enter a single line into the shell on the Pi and it will guide you through everything, takes a couple of minutes! :D

curl -L install.rpints.com | sudo bash
OMFG, that is a couple of days i will never get back! :D

Thank you so much for that command!

Now it is up and running on the Pi, but i cannot connect to it with my Iphone using the IP, page not found.

It installed refering to Alamode. I use an Arduino Uno, i suppose i will have to change something?
 

Naesstrom

Well-Known Member
Joined
Nov 4, 2019
Messages
63
Reaction score
13
Location
Växjö, Sweden
OMFG, that is a couple of days i will never get back! :D
Been there, done that! The new script is literally wort it's weight in gold! :D

It installed refering to Alamode. I use an Arduino Uno, i suppose i will have to change something?
Not sure if that's the problem, it should boot up anyway. But if you want to redo it just run the same command again and select reinstall.
Check the logs to if you see some errors in there. When you connect to the pi the logs is in /var/log/rpints.log so one easy way is to just run
view /var/logs/rpints.log
and it will open up. To quit the viewer type :qa! and enter
 

RandR+

Supporting Member
HBT Supporter
Joined
Oct 5, 2015
Messages
789
Reaction score
244
It installed refering to Alamode. I use an Arduino Uno, i suppose i will have to change something?
During installation you just need to specify USB as the connection method, that is the only difference

Iphone using the IP, page not found.
Are you on the same local network?
Are you on a the same network segment (i.e. my network has 2 wifi's one is a "guest" wifi and that wifi cannot get to my Pi)
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
During installation you just need to specify USB as the connection method, that is the only difference


Are you on the same local network?
Are you on a the same network segment (i.e. my network has 2 wifi's one is a "guest" wifi and that wifi cannot get to my Pi)
I choose USB so i guess that will be ok once i connect the flowmeters, havent bothered to solder them in yet.

Yes, i am at the same network.

I did the install after having tried a LAMP stack install. Could there be something there making trouble? Maybe better to start of with a new and fresh Raspbian instead?
 

RandR+

Supporting Member
HBT Supporter
Joined
Oct 5, 2015
Messages
789
Reaction score
244
Could there be something there making trouble? Maybe better to start of with a new and fresh Raspbian instead?
Certainly could be an issue if you made any adjustments during the LAMP install.
A fresh Raspbian may be quicker then troubleshooting if you have nothing else on the pi.
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
Tried a fresh install from scratch, but still no contact via Iphone using IP.
Any suggestions to where to start looking?

Edit: it was a adress error on my part, works fine now...
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
Ok, probably a stupid question;
In the Arduino raspberrypints.ino file i can find the line to define the number of flowsensors, but not where i should asign pins. I suppose it have changed since the instructions where written?
 

Naesstrom

Well-Known Member
Joined
Nov 4, 2019
Messages
63
Reaction score
13
Location
Växjö, Sweden
At the tap list check settings at top and that "Show pin settings" are active:
1615200264558.png


Then on each tap you have a "flow pin" and a "Count per unit"
1615200317615.png
 
Last edited:

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
^You my good man rock!
What count pr litre should i use on a Swissflow sf800? The spec sheet says 5400-6100.
 

Naesstrom

Well-Known Member
Joined
Nov 4, 2019
Messages
63
Reaction score
13
Location
Växjö, Sweden
^You my good man rock!
What count pr litre should i use on a Swissflow sf800? The spec sheet says 5400-6100.
Try the new calibration function, I'm not using flowmeters anymore since I got problem with foam with my cheap versions.
Pour a set amount that you can measure and see what it gives!
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
Ok, thanks. Will try tomorrow.
Can anyone recommend a cheap temp-probe?
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
Thanks again, ordered one of Ebay.
What is a small resistor? Less then 1K?
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
Thanks again, great support here!

I see it is connected to thi Pi itself, canit be connected to the Arduino Uno instead? I will have a temp sensor and a motion sensor when they arrive, but its easier to connect both to the Uno as the case for that is slotted over the connections.
 

Naesstrom

Well-Known Member
Joined
Nov 4, 2019
Messages
63
Reaction score
13
Location
Växjö, Sweden
I want it to report the raw value from the load cell including the ratio. This way if the ratio is 1 then the scale can be recalibrated without looking at the logs.
After the ratio is added it shouldnt flip back and forth between the original raw value and the referenced value, I can setup my test system, it may have something to do with what the load cell logic is doing (sometimes report the referenced weight other times report raw.


Yes i would tare so that it reads close to 0 when nothing is on it. then you should be able to physically put the keg on it and get the current amount
I thought I would give you a few days off from my bloody load cells :D
This gif shows 4 minutes with a 2s refresh of the page but I've speeded it up. Tap 1 have a keg on it but with just a little beer in it and tap 2 is empty so should show 0. Whenever it just shows 4.26 that's the value I've entered for the empty kegs.


Attached the latest DB if you get an urge to have a look!

Poured and remaining looks really interesting, wish I had 150 000 liters left :bigmug:
1615279904620.png
 

Attachments

RandR+

Supporting Member
HBT Supporter
Joined
Oct 5, 2015
Messages
789
Reaction score
244
This gif shows 4 minutes with a 2s refresh of the page but I've speeded it up.
That looks like the load cell isnt reporting consistently. you may want to run the Load Cell Python from the example and see if it gives the same results. If it is returning consistent values then I need to go back and look at how RPints is using the weight (Note RPints uses an average of 20 results to get the current weight where as the base file using just 3)

Poured and remaining looks really interesting, wish I had 150 000 liters left
Once the load cells are verified/working properly you are going to want to setup the taps/Rpints with the values needed to do the calculations of weight to volume. RPints needs Altitude/Fermenation Pressure/Kegging Temp to do the conversion
Under the settings in the tap list you can specify the defaults to use for all Taps or on each tap specify the values per tap.
If you dont want to do it per tap then hit the Only Use Defaults checkbox

1615299435435.png

1615299495473.png
 

Attachments

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
My beers are disappearing!

My taps keep reseting so the beers on display goes blank, i can go to tha taps setting and choose tap and everything comes back, but after some hours it is gone again.

I also get some crazy ghost pours (3-3.5litres).

Any ideas?
 

RandR+

Supporting Member
HBT Supporter
Joined
Oct 5, 2015
Messages
789
Reaction score
244
I also get some crazy ghost pours (3-3.5litres).

Any ideas?
you can turn off kicking kegs when they are empty to prevent them from disappearing
Under personalize
1615359224486.png

turn Kick Kegs from Tap When Kill Is detected to Off
1615359213824.png



check your wiring for loose wires, they may be causing the extra pulses. You may also want to completely disconnect the keg to make sure there isnt any CO2 bubbles causing it. You can also completely disconnect the wire to make sure your its not something on the Uno itself

Its unlikely, but make sure you didnt enable dispatch.debugMonitoring in python/Config.py
it should look like this
1615359349261.png
 

Attachments

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
The Python config.py has the same text lines, but they are at line 20 and 21, so something is different there.

I have not checked for loose wires, but i soldered it up so good that i really doubt it. (I KNOW how to solder).

I would think the error is software related, or a bad connection as you suggest since the pours are that big? 3.5l is close to 1gallon.

I get ghost pours on 2 of my three taps so far.

Only thing i know i have done different then i should is powering the UNO via USB with the PSU connected directly to the Pi since i didnt bother to change connector on the PSU.
 

RandR+

Supporting Member
HBT Supporter
Joined
Oct 5, 2015
Messages
789
Reaction score
244
I would think the error is software related, or a bad connection as you suggest since the pours are that big?
What is your pulses per liter per the taps?
you may need to check the Show Pin Settings
1615384229148.png

1615384216512.png



The software records the raw pulse count and the conversion factor that it used to calculate the pour volume, you can look into the Pours table in the database to see these pour's pulses and conversions.

The Uno code for counting pulses has been proven. it uses interrupts to count the pulses.

I also was getting large ghost pours on a tap. I disconnected the wire and they went away, then when I plugged it back in they didnt start back up. Im pretty sure it was a loose connection that caused them.
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
Count pr/l is set to 6100, i have not been able to verify the measured volume as i dont abuse alchohol (not willing to throw it away), will check that on friday.

Knock on wood, but it seems the ghostpour problem went away after i changed the kick keg setting, but to read the python file i had to reconnect a mouse and keyboard, so it is possible i have "fixed" a bad connection on the board itself when i moved it. The sensors are just plugged in.
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
Seams like both. To early to tell for shure, but have not seen either problem after i changed that setting. None of the kegs are empty and they are not logged as empty either.
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
When i calibrate the flowsensors and put in last poured value in ml, last time 550ml (i use metric values) and return to the main screen last poured value shown is 145,29 which is the equivalent of gallons from 550litres. What unit should i use to calibrate?
 

beerNbikes

Supporting Member
HBT Supporter
Joined
Jul 3, 2020
Messages
10
Reaction score
0
Hi RandR+,
I have my pi running a screen above my home bar. There is no mouse or keyboard. When I make changes on the pi from a remote computer (add a keg, change a glass type etc.) I only know two ways of making the pi refresh its screen. I tell it to reboot, or I have to pour a beer. Is it possible to have a button on the admin page that will refresh the host's display?
Cheers!
 

Roadrune

Active Member
Joined
Mar 7, 2021
Messages
34
Reaction score
1
When i calibrate the flowsensors and put in last poured value in ml, last time 550ml (i use metric values) and return to the main screen last poured value shown is 145,29 which is the equivalent of gallons from 550litres. What unit should i use to calibrate?
No one knows?

I have tried to use both ml and oz to calibrate, but both give wrong results by a lot.
 

RandR+

Supporting Member
HBT Supporter
Joined
Oct 5, 2015
Messages
789
Reaction score
244
What unit should i use to calibrate?
It should be the display units you have setup. if you have it setup to display gallon/ounces then enter ounces, if you are showing liters then milliliters.

I will test locally to see if i have an issue with not converting a unit
 
Top