Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

"LarryBot" is an automated dog treat dispenser that let's live viewers on give treats to a good boy on command.

See full blog post at


The server is a Node.js/Express server and can be run locally on your machine.


  • Node.js
  • Python
  • npm install --global --production windows-build-tools (If on windows)
  • Setup a MongoDB database (e.g. MLab)
  • Add 3 collections to database 'treats', 'admins', 'settings'
  • Add initial document to 'settings' collection.
    { "type": "system", "systemStatus": 1 }
  • Add your Twitch Username in a new document to the 'admins' collection. This lets you bypass the cooldown restrictions that other users would have. You can add as many admins as you would like (e.g. channel mods)
    { "name": "YourTwitchName" }
  • Setup a MQTT server (e.g. EMQTT or CloudMQTT)
  • Create a new Twitch account to be used as your bot user
  • Generate your OAuth Password for the bot account at
  • Create a file called .env in the root of your server directory. Add the following replaced with your information and save
TWITCH_BOT_OAUTH="oauth:YourOauthKey Get from"  
SLTOKEN="YourStreamLabsToken If you want to give treats when someone follows automatically. Go to your > API Tokens to find your token"  
  • Run npm install
  • Start the server with node server

The dashboard can be accessed at http://localhost:8090

The Robot

Robot Schematic The source code here is only for the dispenser. The LED strip lighting source code is not included at the moment. Take a look into NeoPixelBus as there can be conflicts with servos/interrupts and LED strips.

See Waltermixxx's Thingiverse & post for information on building the 3D printed dispenser. I used 3DHubs for printing.

Robot Schematic

This is the IR beam splitter I used and the servo

I used an EMQTT broker running on the same machine as the Express server to be my MQTT server, rather than using a free cloud MQTT server, it was much faster and more reliable. If you do this, you should go into your router and assign a dedicated IP address to your computer running the server so the arduino/esp8266 can connect easily (e.g.

You may need to download and add certain dependencies that are missing. This was developed for use on a NodeMCU/ESP8266 board, but can likely be easily modified to work with an Arduino

WifiManager library is being used for wifi. On the first run, a wifi access point will be available that you can connect to from your phone. From there you can configure your wifi settings.

Update the MQTT server settings with your own.


”LarryBot” is an automated dog treat dispenser that let’s live viewers on give treats to a good boy on command.






No releases published


No packages published