Close

A 2016 alternative to HTCPCP [updated video]

A project log for Coffee machine v2

Automatic Slow Coffee Machine | home information device | music player

ronaldRonald 08/15/2016 at 18:440 Comments

As said before, HTCPCP is fundamentally flawed. In two ways: (1) there is no way the amount of coffee can be controlled, (2) it assumes a teapot cannot brew cofee.

It's time for a new HTPCP-like protocol that solves both of these problems. Things that need to be supported:

  1. Brewing coffee
  2. Small talk while deciding if one wants coffee
  3. Making sure nobody ever believes tea pots cannot make coffee
  4. At least some control over who is allowed to brew coffee.

As data carrier, pigeons were considered. However, no quality trained pigeons were available, so Telegram was picked. Telegram has a nice bot api. Further, some nice people wrote a Python library for communicating. This solves requirement 4, and eases the development of code for 1-3.

The core telegram bot communication code can be found in telegram.py and may be a useful example to others. The code for implementing requirements 2-3 is also in this file.

The koffiezetter.py has been updated to react to telegram, and to be a little more verbose over telegram, too.

Protocol

As for the protocol, current computers and even the Raspberry Pi have enough processing power to do some amount of written language recognition. Supported commands:

Brewing more than 3 cups over telegram is not allowed (yet) since no phyisical checks are being made before brewing starts. Read: it can get a big mess, and for <=2 cups this is considered an acceptable risk.

Video is updated, as well as the source on Github.

Discussions