Water volume with flow meter

So this is different than other inquiries that I found so I am hoping for some guidance / help in this realm.

I have installed a flow meter prior to my water filter. As you will see with the pictures and links etc. I have wire the flow meter to the RPI based on the diagrams I have found. ( would appreciate input if I need to make changes to this so I don’t break anything.

The intent is to use the software / code (which one?) to basically establish how much volume of water has passed through and made it into the HLT & Kettle and then be able to tell the ball valves when to turn on and off based on the volume that has been reached based on brew style etc.

This is what I have compiled thus far, keep in mind I am a N00b to all this so a step by step of how to input this into the “current” and or future BrewPi configuration. Or is this something I do in the Portainer page for the different containers?

Flow Meter:

How it could be applied for a different application than mine, same general concept though:

A quick view of layout
flow%20meter

How the Flow meter is powered / connected (directly without the board)

  1. issues / arguments for how its wired?
  2. Is this the right code to use? Is there something better?
  3. How to implement for BrewPi? Does this go in Portainer as a container somehow, and how?

TIA - really appreciate it. Don’t worry when its all hooked up and working I’ll post an enter How-to

I don’t have answers to your questions, I’m afraid. But just wanted to check if you have noticed that the accuracy of that flow meter is only ±10%? My understanding is that flow meters are pretty inaccurate in general. Particularly cheap ones.

@j616s yes I am aware and I have gone through this type of info:

I am not using an Arduino in this case, and the flow rate will be relatively accurate. And based on the software and doing numerous tests you can get the accuracy closer. I’m not expecting exact everytime but relatively close is what I’m aiming for with the type setup I have.

Based on this post My Franken-fridge build
and the listed power diagram - can the brewpi / brewblox? If so what is the pin out structure for the RJ12 connections?