Skip to content

lagerbeer/kegcop_home_assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kegcop_home_assistant

Port of Keg Cop to Home Assistant

Here are the steps that I took to build this port of kegcop to home assistant.

You should have some knowledge of home assistant before starting this project. it is not that hard but it does take some time to learn each step used in this setup.

The first step should be to add the following from the addon store:

  1. ESPHome
  2. Mariadb
  3. Studio code server
  4. phpmyadmin (not required but need for testing your sql in mariadb)

image

Next you should set up mariadb and you config.yaml file.

image

You will need to get some frontend cards from HACS to for the dashboard:

  1. bar-card
  2. horizontal-stack
  3. mini-graph-card
  4. vertical-stack
  5. gauge

Check the dashboard YAML for all of the cards that are used.

image

Install the flowmeter code into the esp32

This is the code that works for me, you will need to test to make sure it works for you type of flow meter:

  • platform: pulse_counter state_class: measurement name: "count_1" id: count_1 pin: number: GPIO4 inverted: true mode: input: true pullup: true update_interval: 30s internal_filter: 13us count_mode: rising_edge: INCREMENT falling_edge: DISABLE unit_of_measurement: "pulses" accuracy_decimals: 2 filters:
    • debounce: 0.1s
    • lambda: return (x / 1);

image

Next you will need to create a date field and a number field within the device and services helpers tab.

image

I created one each for each keg, here is a date example:

image

Here is a number example:

image

OPERATION:

The tool is managed in the screen below. There are only three functions that need to be managed.

  1. New Keg Date: enter in the date that the keg is tapped. The tool will add up the pulses based on the start date. Change date when the keg is empty and replaced with a new keg.
  2. Keg Size: The keg volume will be based off of the amount selected in the slider.
  3. Pulse per Oz calibration: Pour a measured amount and then change this number to get the correct calculation per pour. For example, pour 8 oz of liquid and check the control panel results for that pour. You can hard code your pulse per oz results in the input_numbers.yaml in the initial field. If your home assistant instance restarts it will reset this number back to the initial value.

box1: name: Keg 1 PPO calibration initial: 27 min: -20 max: 135 step: 1 mode: box

image

About

Port of Keg Cop to Home Assistant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published