Kegberry/Kegbot New Installation


#21

@danc,

Alright so it looks like I had a mistake in how I created the ZIP file, and also it looks like Github doesn’t carry over permissions for the files in the ZIP.

I’ve corrected the ZIP file, so hopefully now when you run the UNZIP command you get the mypkgs folder rather than having it embedded in another my_kegbot_packages folder.

I suggest you delete all of your files in the /home/pi directory, and then pick back up from step #1 under Get My Updated Kegbot Packages and Scripts, I’ve updated the instructions with 2 additional commands to enable execution of the install scripts.
EDIT: I figured out how to have the zip file hosted on Github with the correct permissions, so I’ve removed the extra steps as they are no longer required.

Otherwise, since you’ve already got the files, you can just run the sudo chmod 777 command on the install.sh and install_part2.sh files within your /home/pi/my_kegbot_packages/mypkgs/ directory and then proceed with running the scripts.


#22

error messages after step 5 from Get My Kegbot Packages and Scripts
i know that some were expected
Package libmysqlclient-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘libmysqlclient-dev’ has no installation candidate

ERROR : Command returned error:
ERROR : Command: sudo bash -c "DEBIAN_FRONTEND=noninteractive apt-get -yq install build-essential nginx-light libjpeg-dev supervisor python-setuptools python-dev libmysqlclient-dev mysql-server redis-server"
ERROR : Return code: 100
Traceback (most recent call last):
File “/usr/local/bin/kegberry”, line 7, in
app.run()
File “/usr/local/lib/python2.7/dist-packages/kegberry/app.py”, line 210, in run
command_fn(*args)
File “/usr/local/lib/python2.7/dist-packages/kegberry/app.py”, line 242, in install
self._update_packages()
File “/usr/local/lib/python2.7/dist-packages/kegberry/app.py”, line 235, in _update_packages
’ '.join(REQUIRED_PACKAGES)))
File “/usr/local/lib/python2.7/dist-packages/kegberry/app.py”, line 142, in run_command
raise e
subprocess.CalledProcessError: Command ‘sudo bash -c “DEBIAN_FRONTEND=noninteractive apt-get -yq install build-essential nginx-light libjpeg-dev supervisor python-setuptools python-dev libmysqlclient-dev mysql-server redis-server”’ returned non-zero exit status 100
pi@raspberrypi:~ $
Thanks again
Dan


#23

see step #4 under “Fix issue with missing Six module and libmysqlclient-dev”

Updating the app.py file with “default-libmysqlclient-dev” should resolve that error.

FYI: I also discovered an error in my install_part2.sh script. This has been corrected and an updated file is available on Github, so you will just need to run the “wget” command from step 1 above and unzip to get the latest files


#24

i am getting the same error message as previous, after continuing to : “Open the file /etc/mysql/mariadb.conf.d/50-server.cnf”

mysql file is not in etc
once again time and help


#25

Thank you for your time and help
dan


#26

@danc,

No problem at all.

Did you successfully the execution of the install script successfully get past the run in Fix issue with missing Six module and libmysqlclient-dev?

This piece of the installation script should install the mysql client and create the directories in the /etc/ folder. It will then hit the error I mentioned about permissions for ‘root’@‘localhost’. Is that the error you’re seeing now?

I’m trying to put together a YouTube video of the complete installation but may not be ready for a couple days.


#27

when i change the entry for libmysqlclient-dev to default-libmysqlclient-dev
and try and save the change it says "looks like this file or folder is not writable"
This may be where i am getting messed up i cant save the file , i made the change before but didnt try to save the change


#28

try using the “nano” program as a test editor and opening with sudo.

sudo nano /usr/local/lib/python2.7/dist-packages/kegberry/app.py

Once you’ve updated the libmysqlclient-dev to default-libmysqlclient-dev, use CTRL + X to close Nano and it will ask you whether or not you wish to save. Enter ‘Y’ and press ENTER to commit your changes.

You’ll need sudo nano multiple times to edit files that require elevated permissions to edit.


#29

Thank you for your write ups they were a great help I am up and running now moving on to flow meters and temp

Once again THANK YOU
dan


#30

i have at this point two problems
1)seting up mail i can not locate /home/kegbot/.kegbot/local_settings.py
all i have is
/home/kegbot There is no local_settings.py
2) in setting up the arduino you refered to “Controllers” screen. I cant locate that

Thanks Dan


#31

The ‘.’ in front of the kegbot folder means it’s hidden so running a regular ‘ls’ command will not show that folder. If you run the command

ls -lah

That will list all folders in the directory, including the hidden folders and you can also cd into that directory. In there you will find your local_settings.py file.

The “Controllers” screen can be found on the Admin tab if you have enabled Flow Sensing. If you did not choose the option to enable flow sensing on your initial setup, you can turn it on from the Admin > General screen.


#32

from the admin tab after i click on controllers this is the response:

Note: Controllers can be created and edited in the Kegbot app.


#33

Yeah, controllers will not show up until you’ve connected a properly flashed Arduino to the Raspberry Pi USB. Once the server detects a board, you will see the controller show up on that page.

It can be a little buggy and may not pop up right away so you may have to disconnect/reconnect the arduino a few times before it’s detected.

You can also execute the python script located at /home/kegbot/kegbot-pycore.venv/bin/kegboard-monitor.py which will show you the status and messages coming from the Arduino. You should see “hello” messages being passed which should trigger the server to add a Controller.


#34

THANK YOU
Dan


#35

the Arduino shows up and the pings are counting
do i need to have the Flow meter attached and not use the pings to get the server to add the controller


#36

I was having the same problem with my 3B+ installation not detecting the board.

Take a look at the file here: /home/kegbot/.kegbot/pycore-flags.txt. The contents should look something like this:

–api_url=http://localhost/api
–api_key=2a54012341ba932a264182d45d35fe69

Make sure there’s nothing else in this file and both lines have the double-hyphens in front of them. If you make any edits, save the file and then reboot the Raspberry Pi to reset everything with the kegboard/arduino disconnected.

Once it reboots and you can access the web-server, re-connect your Arduino and refresh the Controllers page and if it doesn’t pop-up disconnect and re-connect a few times again.

I had some extra lines in this file so I have a feeling the “pycore” service which runs on the Pi to manage the kegboard and relay events to the server was having issues.

Let me know if this doesn’t work.


#37

Hello!
I also had that issue on my first installation of kegbot, turns out to be an incompatible bootloader.
Found this solution, but you will need to boot it on a older raspberry until bootloader is updated, https://raspberrypi.stackexchange.com/questions/81725/raspbian-8-on-raspberry-pi-3-b

With this you can use the customized kegberry image. :slight_smile:

Stumbled on this project when planning for automated irrigation for our greenhouse… We have a octoberfest party in August (?) and thought this would be a really cool addition to the bar :grin:
Just about to start learning more python and django, so this will be a project to return to whenever my skills has grown, might even have to buy my own keg and tap system. :smiley:

Regards,


#38

-e --api_url=http://localhost/api
–api_key=a005d963ea7053016660a7211bf39074

This is what
showed up on my scree it is showing–api_…
i will remove -e and see where we go


#39

thank you it worked great the controllers showed up
moving on to flow meter and temp probe


#40

Fantastic!!

Thanks for bringing this up, I’ll have to add that to my install guide instructions.