-
Notifications
You must be signed in to change notification settings - Fork 5
IOT and HelloDrinkBot
Sending commands to the HelloDrinkBot API:
Visiting the correct url will send a 'make drink' request to the DrinkBot.
Example Request:http://10.0.0.1/ws/drink/12?booze1=120&booze79=120
In the above URL:
-
http://10.0.0.1/ws/drink/
contains the Pi's local IP address and the start of the API endpoint -
12?
contains the drink number (found in the bartendro drinks table) -
booze1=120&booze79=120
tells the Pi which booze to pour and how much (in mL)
Using If This Then That is a quick and simple way to connect your Pi with other services. Since we have an API endpoint (above) that we can use to mix drinks, it's possible to connect DrinkBot to external devices, like a switch or an Echo.
HelloDrinkBot operates locally right out of the box. This means it can interact with any computer that is logged in on your home wifi. You can do a lot with this, like make your own wireless drink dispensing remote.. Working within your home network is secure and can only be accessed behind your router's firewall.
To connect to the web, or to allow cloud-based services to send commands to your Pi, you'll need to find a way to securely allow the commands to come through. Some options include:
- Port Forwarding & Dynamic DNS --(less secure)
- Creating a 'tunnel' using NGROK -(more secure)
- Use an online service like Webhook Relay or Dweet.io to subscribe to the request. (most secure)
- -Controlling gadgets with Google Home, IFTTT and Node-RED
- -IFTTT Maker Channel Behind a Router
- -Operating a Garage door with IFTTT and rPi
- -Trigger A Local Python App Remotely