Kegberry/Kegbot New Installation

@moad, great info and glad you’re back up and running.

But is there some issue with the standard database restore if you build a fresh Kegbot Install following one of my walkthroughs? I’ve never actually done the DB restore process before, but any additional insight you could share as to the correct steps to make the restore successful? Thanks!

It is probably more my unfamiliarity with Linux than your guide mate. The main issue was that I would activate the virtual env and run the restore command and it would fail with permissions issue. Trying to run as sudo would ask for kegbot user account credentials which I don’t know.

I’m more familiar with installing manually but your scripts certainly helped to get all the packages and components in place so the setup piece was a breeze.

I should have documented the steps but once all of your packages were in place it was essentially following the standard server install guide.

The nginx and supervisor config i reused which from memory was the tricky part to get running automatically.

Hey @johnnyruz

Just integrated the real-time enhancement, I think there are a couple of typo’s in the readme… ?

/home/kegbot/kegbot-server.venv/lib/python2.7/site-packages/pykeg/web/kegweb/templates/kegweb/templates/kegweb/

should read:

/home/kegbot/kegbot-server.venv/lib/python2.7/site-packages/pykeg/web/kegweb/templates/kegweb/

Also " Update line 204 in fullscreen.html" was line 226 using fullscreen.html from 19th April '19

Lastly, in advanced setup…
“/etc/supervisor/cond.d/kegbot.conf” should read "/etc/supervisor/conf.d/kegbot.conf " (conf.d not cond.d) - Just for the copy and paste people.

@johnnyruz you are a beast. Great work on your write ups and all the help you have provided!

2 Likes

Thanks @andymemo you’re right there are some typos there.

I’m actually working on an updated process for getting all the latest changes installed, including an automated install of the Node stuff so I’ll be updating all of the documentation with the new procedure in the coming days.

In the meantime, this post has links to the two new scripts that “should” get both Kegbot and the Node stuff up and running without jumping through the hoops of my initial methods.

What RFID model do you recommend for the Kegbot and did you enclose it

I have not enclosed my RFID reader, but I have attached it behind a facing board on my bar, so I scan my cards/tags against a special spot on my cabinets and it registers fine behind 3/4" plywood.

I’m using a super-cheap RC522 based reader, this is the exact one I’m using: https://www.amazon.com/HiLetgo-RFID-Kit-Arduino-Raspberry/dp/B01CSTW0IA

Thanks for the info

Thanks, new install scripts works flawlessly… So easy and quick…
Just one thing… After installing node.js server, is there a way of changing live pours to millilitres? The total volume poured is in mL, but live pours (while pouring) is in oz, even with metric selected everywhere.
Thanks in advance

NO!!! Imperial and US Measurements Only!!!

JK :grin: Great suggestion and should be pretty easy to implement, give me a few days!

Oh Thanks Johnnyruz That will be great… Ur Awesome !

Ok so I’ve pushed an update to the Github Repository that has the unit change for the live pours.

It was a little bit more complex than initially expected since I wanted it to adjust to the settings of the server so I had to add some logic there to expose it to the “live” piece.

FOLLOW AT YOUR OWN RISK TO KEGBOT DATA!!

If you’re installing from scratch, the standard installation scripts will apply:

  1. Install Kegbot Server bash <(wget -qO- https://raw.githubusercontent.com/johnnyruz/kegbot-server/add_my_pkgs_to_github/install_latest.sh)
  2. Install Node: bash <(wget -qO- https://raw.githubusercontent.com/johnnyruz/kegbot-server/add_my_pkgs_to_github/install_node_latest.sh)

However, if you’ve already got an installation up and running and just want the updates, you should be able to just run:

  1. kegberry upgrade
  2. Install Node Again: bash <(wget -qO- https://raw.githubusercontent.com/johnnyruz/kegbot-server/add_my_pkgs_to_github/install_node_latest.sh)

You may want to check the contents of the file /usr/local/lib/python2.7/dist-packages/kegberry/app.py to make sure that the package locations are pointing to my repository, which they should be if you installed with my scripts initially.

Let me know if you run into any issues!

Great stuff… Will give it a bash and report back
Thanks again

Hi Jonny
Did a fresh install, all went well, it now shows mL on the kegberry, but think conversion error somewhere, For example pouring 60 millilitres only shows 6mL on the kegberry. Not flow meter problem, connecting and using the kegbot app it measures correctly… Any ideas?
Thanks in advance

Yep! Issues with how I checked stuff into Github. You should be able to just run the node installer again bash <(wget -qO- https://raw.githubusercontent.com/johnnyruz/kegbot-server/add_my_pkgs_to_github/install_node_latest.sh) to get a working version.

Okay, so ran the node installer… Not showing the pours on the kegberry. I then did fresh install but same issue… Also at the bottom of home screen, just below the little beer mug it shows NOdejs error! Kegbot… Am i doing something wrong?

Hey @Necro,

You’re definitely not doing anything wrong, bugs on my side again. Admittedly the solution is a little flaky but a few steps to troubleshoot and hopefully get the Node Server up and running and be able to re-start it if it does have an error.

First, I fixed typo in one of the files on Github, so run the installer yet again to pick up those updates. Hopefully that gets things running but if not.

  1. The NODEJS ERROR message at the bottom means that the browser was unable to connect to the server. There are a few possible reasons for this.
  • Server isn’t running: the server should start up on installation and with Kegbot, but occasionally something will happen. The command `ps -ef | grep node’ will tell you if it is running. You should see something like this:

If you only see the line grep --color=auto node that means the server is not running. You can either start it manually by running node /home/kegbot/kegbot-server.venv/node_server/server.js & OR restart all kegbot services with sudo supervisorctl restart kegbot:*

  1. If you inspect the file /home/kegbot/kegbot-server.venv/node_server/server.js, you should see a version comment of 3/6/2020 which means you have the latest server version.

  2. Finally, if you still are unable to connect and are getting the NODEJS error, make sure networking is setup to hit the correct ports. If you’re accessing within your local environment it shouldn’t be a problem, but if you’re accessing from outside there may be other configurations necessary. By default the node server runs on port 3000 and connects to the IP address specified in the setup script. You can make sure that looks good by inspecting the file /home/kegbot/kegbot-server.venv/lib/python2.7/site-packages/pykeg/web/kegweb/templates/kegweb/fullscreen.html and looking at line 189 to make sure it’s pointing to the correct URL and Port.

Please keep pinging me if you run into issues. There is work going on to hopefully simplify the whole process and increase the stability.

Great!!NODEJS error seems fixed, and pours showing up now on the kegberry now mL’s.but,
The pours don’t seem to register on server though. Comes up fine if I use the kegbot app.
It only shows first pour on new keg, addition pouers not showing up anywhere.

I actually set this up a few months ago but never got around to using it(Needed a keg), I was starting everything back up in preparation for a keg during this stay at homer order, but I noticed my test flows are not being logged either, I don’t remember if this is normal when using the test flow.py or if I’m having the same issue as you

Also having the NodeJS issue, but I’m sure I just need to rerun the updated Node installer as you’ve updated
–EDIT: Running the node update script resolved the error message

Again, you da man @johnnyruz

I think the main dashboard could use some work, but I code in django/python all day, so I think I am going to update a few things. I’ll share what I end up with!

1 Like