Hello Drinkbot links
- Facebook group for Hello Drinkbot.
- Github repository of case designs and sample code
- Hello Drinkbot fork of the Bartendro software
- Email Rich.Gibson at Gmail.com
Hello Drinkbot links
Welcome to people who saw the Tasty Tech article in Make Magazine.
The article says to come to this site to get the latest disk image. Unfortunately the image I currently have is huge (due to my expanding it to fill the SD Card), and I don’t know how to shrink it, and I should really create a stripped down image, and etc.
My plan is to do that. But in the meantime, if you just install a normal Raspberry Pi image you will be on your way. I will update with a full set of instructions ASAP
The Maker Faire workshop was a lot of fun, and many lessons were learned!
On the plus side, I think that all of the robots went home able to dispense liquids. Yay!
I am working on some tweaks, improvements, patches, and bug fixes. I will be uploading a new sdcard image, and instructions to write it to your sdcard. Or I can send you a new sdcard. Email me at Rich.Gibson at gmail.com if you would like to swap out your sdcard.
The initial ‘big changes’ to get the Bartendro admin mode to work is to change your /etc/hosts file.
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 hellodrinkbot
And to update your file /etc/nginx/sites-available/bartendro.conf to look like this. This is a bit of a kludge, where I am tweaking a sample conf file and I am pretty sure that there are better ways to do this. So please let me know if you have a better version.
upstream hellodrinkbot {
server 127.0.0.1:8080;
}
Listen on all interfaces of eth0
server {
root /usr/share/nginx/www;
server_name hellodrinkbot;
access_log /var/log/nginx/bartendro-combined.log combined;
error_log /var/log/nginx/bartendro-error.log notice;
location / {
proxy_pass http://hellodrinkbot;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# This allows you to use Bartendro via its IP address. This is good for setting up # for the first time: proxy_set_header Host $server_addr; # If you have set a custom DNS record for your Bartendro, uncomment the following # line and enter the DNS name for your bartendro and then comment out the· # proxy_set_header line above:· #proxy_set_header Host "bartendro.example.com"; proxy_redirect off; }
}
listen on the bartendro private wifi and redirect all traffic to bartendro
the server name here is always set the "bartendro".
server {
listen 10.0.0.1:80;
root /usr/share/nginx/www;
server_name hellodrinkbot;
access_log /var/log/nginx/bartendro-combined.log combined;
error_log /var/log/nginx/bartendro-error.log notice;
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location / {
proxy_pass http://hellodrinkbot;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host "hellodrinkbot";
proxy_redirect off;
}
}
server {
listen 10.0.0.1:80 default_server;
server_name _;
rewrite ^ http://hellodrinkbot? redirect;
}
The Cocktail Robotics Grand Challenge is Sunday July 21st, 2019. It is a fun event!
You can register as a contestant, which costs a bit, or you can ‘exhibit’ your robot for free. There are cash prizes if you register as a contestant.
Please bring a robot!
Please…if you have a better way to do anything please let me know. I·
made it up as I went along…
The motor hat has 4 full H bridges which allow it to control four DC motors in forward or reverse. We are splitting the H bridges into two half H bridges, allowing us to control eight motors.
Associate with the ‘HelloDrinkbot’ access point and then go to hellodrinkbot.local
in your browser. Or 10.0.0.1.
You can make drinks by calling the restful interface
Example
http://hellodrinkbot.local/ws/drink/12?booze14=75&booze11=75
The Hello Drinkbot repository has some utility programs demonstrating how to
talk to the motor control hat from Python.
cd hellodrinkbot/software/utility # this will test all of the pumps, turning each on for 2 seconds, and then moving to the next python ./pumptest.py 2··
Your bot has a version of ChatScript installed for the Raspberry Pi.
ChatScript is a chat engine written by Bruce Wilcox.·
The Wikipedia page has a good description.
The official pages and the Github repository are·
filled with fascinating documentations and explorations into the issues involved with using natural language.
This article How to build your first chatbot using ChatScript has a nice introduction. Shorter version:
Connect to your pi, either connect a monitor/keyboard/mouse or ssh in. cd Chatscript BINARIES/LinuxChatScript64 local Enter your name when prompted (or any identifier. ChatScript maintains persistence with a user across sessions) Interact with the bot. After a couple of questions it will ask if you want a cocktail. If you say yes it will pour a tiny cocktail. There are multiple ways you can interface ChatScript with your bot.
After I am finished I run water through all the pumps, and then I run some vodka through.
Either connect a monitor, keyboard, and mouse to it, or access via ssh.
(Putty is an ssh client for Windows)
If you connect to the Pi via wireless you can ssh to the wlan0 interface. The username
is: pi, the password is: raspbery Yes, leaving the default username and password is a·
security risk. You can change it if you want.
ssh pi@10.0.0.1
You can connect the pi to your computer or hub via ethernet cable. If you·
have a Mac enable internet sharing (System Preferences -> Internet Sharing)
Your Pi will probably get the first address 192.168.2.2
ssh pi@192.168.2.2
The pi is setup with ‘Multicast Domain Name Service’ (mDNS) and so you should be
able to connect to it as hostname.local. The hostname is set in /etc/hostname
to hellodrinkbot.
ssh pi@hellodrinkbot.local
The ssid, the access point name, is set in /etc/hostapd/hostapd.conf.·
You can look at the logs by ssh’ing into the pi over any interface (10.0.0.1, possibly 192.168.2.2,·
or hellodrinkbot.local)
System logs are in /var/log and the web and bartendro logs are in /var/log/nginx
The following commands may be useful
tail -f /var/log/nginx/bartendro-error.log tail -f /var/log/nginx/bartendro-combined.log tail -f /var/log/nginx/access.log tail -f /var/log/nginx/error.log tail -f /var/log/syslog
Click on the Bartendro logo in the upper right corner of the screen.
Default password is bartendro with password boozemeup
Exit admin by clicking on ‘menu’ on the upper left
···
Connect to Hello Drinkbot - see above Upgrade software +-- 2 lines: cd bartendro----------------------------------------------------------------------------------------------
ssh to your robot
cd bartendro ui
sqlite3 bartendro.db
Identify your booze:
select id, name, image from booze where name like ‘Vod%’;
1|Vodka|
55|Vodka, Blavad Black |
58|Vodka, Bacon Infused|
Update the picture:
sqlite> update booze set image=’potato.jpg’ where id in (1,55,58);
Put the pictures in bartendro/ui/content/static/images/
(there should be a way to add pictures at the Booze admin screen. Patches welcome 🙂
Here is an Amazon list of all the parts needed for a Hello Drinkbot except wire and the laser cut frame. Here is an Amazon ‘Idea’ List.
They include a 7″ touch screen as an example. I have tried doing some prototype cases, but so far I don’t have a case which lets you cleanly mount the touchscreen. Also, if you go with the touch screen, or an external monitor, you may also want a keyboard. I have this wireless keyboard. It includes a trackpad, and has worked well so far.
Here is a google sheet with the Bill of Materials broken out on a per-bot basis.
I am a member of the Chimera Art Space in Sebastopol, California. It is an art and maker space. We have a nice wood shop, a good selection of metal machining and welding equipment, a jewelry shop which is fantastic, and relevant to my interests a 100 watt laser cutter with an almost 4 foot by 3 foot cutting area.
Here is the laser cutter and one of the work tables, and five bots dry fitted because I wanted to make sure everything was working. And also because I like seeing lots of robots in progress.
I’ve now cut parts for about 30 bots.
I set up a Hello Drinkbot at a part we had recently. I loaded it with various flavors of Torani syrup and set the shot size to 10 ml.
My Grandson Finn took over bartending duties and enjoyed dispensing italian soda’s for people!
The peristaltic pumps can’t dispense carbonated liquid, so people would put their own ice and carbonated water into their cups and hand them to Finn.
He used the ‘Shots’ menu of the Bartendro software. This shows a list of the loaded ingredients and lets you dispense shots from those ingredients.
I have not been writing updates because all of my free time has been me preparing for Maker Faire.
There will be a cocktail robot making workshop at 11am on Sunday. Participants will walk away with a working four pump Hello Drinkbot.
I have the laser cutting done for close to 30 bots (the workshop should use 20 of those), I think everything I’ve ordered has arrived, and I have been working on the sdcard image.
I keep thinking of new little goodies and easter eggs to put on the sdcard. For example, it has a copy of Bruce Wilcox’s Chatscript engine compiled for the Raspberry Pi.
And then last night about ten pm I got an idea for a ‘Shorty’ version of the case, and so I have parts cut for about ten of those. This is just the top part of the normal case, which contains the pumps and electronics.
It is intended to be set on a shelve, or attached to another frame.
I will be at Maker Faire Friday by 11 (knock wood :-).
I still need to work on the instructions and presentation for the workshop, and I would like a handout about Cocktail Robotics and Hello Drinkbot for the booth.
So…busy me, happy me!
Here is a link to the Hello Drinkbot fork of the Party Robotics Bartendro software.
Check it out of git and then:
cd bartendro/ui
cp bartendro.db.default bartendro.db
export BARTENDRO_SOFTWARE_ONLY=1
./bartendro_server.py --debug
You can now go to http://127.0.0.1:8080/ to see it in action. You can specify the address it is running on:
./bartendro_server.py --debug -t 10.1.10.214
The main current differences are to create a copy of /ui/bartendro/router/driver.py to /ui/bartendro/router/hello_drinkbot_driver.py