Raspberry Pi flow meter

Hello,

Finally got around to adding the code to github:

plenty of things are hard coded, but it will do the basic job of reporting the flow meter results to the server.

Hi Steven.

Just discovered Kegbot, and have managed to put together my first dual tap with the use of a Arduino one, (As the project shop is closed- RIP) I was just wondering about this new baby of yours, Is this approxomatly the same, just without the arduino bit? Hope you can clearify …

Hi Thetra,

The Pi is being used as a replacement for the Arduino. The flow meter is connected to the Pi pins and pulses are being sent by the program running on the Pi to the server instance.

Thanks for the reply Steven, Sounds really awsome, one less gadget to take care of, and it also will free up the charge port on my tablet :smiley: Happy day`s! Will there be a tutorial for this setup as well ? I have to say that my beer drinking skills are better than my raspberry/ gadget skills…! Anyway! Keep up the good work! you should have a Donate button for sure on this page!!

1 Like

Stephen,
This is fantastic. I had the same idea, just wasn’t sure how to integrate into the existing kegbot software. I think I understand how your code works, but I was trying to integrate into my system and had some integration questions.

Do you install it as another supervisorctl program, or run some other way?

I just ran it standalone to test, but my system of course doesn’t have any kegboards attached, and therefore no meters are registered with the system. How do you get the fake.1 meter registered?

Good work, thanks for putting this out there.
Aaron

Hey Caaron,

The functionality for adding controllers/taps is pretty rough a the moment. I have some commented out code for adding a controller:
#old testing code, includes adding controller

#syntax for adding controllers
#payload_add_controller = {‘api_key’: KEY, ‘name’: ‘fake’, ‘serial_number’: ‘0101’, ‘model_name’:‘fake-pi’ }
#add_controller = requests.post(BASE_URL+‘controllers’, data=payload_add_controller)

Just remove the comments (#) and run ‘add_controller’.

You could add this to supervisorctl, but since I have this on the pi as a stand alone I just run it in screen session.

Note you’ll also need to adjust, mlVolume = clicks*2.25 to whatever your flow meter is rated at. You can try commenting this out and modifying this value server side but I was not getting accurate readings.

Stephan,
Thanks for the quick reply. I suspected that was the case and tried it, but my raspi kegbot kept giving a 400 response, so the subsequent drink posts to fake.1 failed.
I had to kick the keg I had, delete the tap, and then it would add the controller.

Thanks for the help!