breakfast.py 2.73 KB
Newer Older
1 2 3
from pycirculate.anova import AnovaController
import datetime

4 5 6
# Recipe https://recipes.anovaculinary.com/recipe/sous-vide-egg-bites-bacon-gruyere
# Set the temp to 172.0F.
TEMP = 172.0
7
TIME = 60
8 9 10 11

# Can be found with `sudo hcitool lescan`
ANOVA_MAC_ADDRESS = "78:A5:04:3E:42:F3"

Brendan O'Leary 🐢's avatar
Brendan O'Leary 🐢 committed
12 13 14 15 16 17 18 19 20 21
class bcolors:
    HEADER = '\033[95m'
    OKBLUE = '\033[94m'
    OKGREEN = '\033[92m'
    WARNING = '\033[93m'
    FAIL = '\033[91m'
    ENDC = '\033[0m'
    BOLD = '\033[1m'
    UNDERLINE = '\033[4m'

22 23 24
def main():
    ctrl = AnovaController(ANOVA_MAC_ADDRESS)
    print datetime.datetime.now()
Brendan O'Leary 🐢's avatar
Brendan O'Leary 🐢 committed
25
    print "Current Temperature (F): " + ctrl.read_temp(), ctrl.read_unit()
Brendan O'Leary 🐢's avatar
Brendan O'Leary 🐢 committed
26
    print "Current Timer: " + ctrl.read_timer(), ctrl.read_unit()
Brendan O'Leary 🐢's avatar
Brendan O'Leary 🐢 committed
27
    print "Setting temperature to: " + bcolors.WARNING + ctrl.set_temp(TEMP) + bcolors.ENDC
28
    print "Setting timer to: " + bcolors.WARNING + ctrl.set_timer(TIME) + bcolors.ENDC
Brendan O'Leary 🐢's avatar
Brendan O'Leary 🐢 committed
29
    print "Current Timer: " + ctrl.read_temp(), ctrl.read_unit()
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
    print ""
    print bcolors.HEADER + "GitLab AutoBreakfast" + bcolors.ENDC
    print ""
    print "           \033[38;5;88m`                        `"
    print "          :s:                      :s:"
    print "         `oso`                    `oso."
    print "         +sss+                    +sss+"
    print "        :sssss:                  -sssss:"
    print "       `ossssso`                `ossssso`"
    print "       +sssssss+                +sssssss+"
    print "      -ooooooooo-++++++++++++++-ooooooooo-"
    print "     \033[38;5;208m`:/\033[38;5;202m+++++++++\033[38;5;88mosssssssssssso\033[38;5;202m+++++++++\033[38;5;208m/:`"
    print "     -///\033[38;5;202m+++++++++\033[38;5;88mssssssssssss\033[38;5;202m+++++++++\033[38;5;208m///-"
    print "     .//////\033[38;5;202m+++++++\033[38;5;88mosssssssssso\033[38;5;202m+++++++\033[38;5;208m//////."
    print "     :///////\033[38;5;202m+++++++\033[38;5;88mosssssssso\033[38;5;202m+++++++\033[38;5;208m///////:"
    print "      .:///////\033[38;5;202m++++++\033[38;5;88mssssssss\033[38;5;202m++++++\033[38;5;208m///////:.`"
    print "        `-://///\033[38;5;202m+++++\033[38;5;88mosssssso\033[38;5;202m+++++\033[38;5;208m/////:-`"
    print "           `-:////\033[38;5;202m++++\033[38;5;88mosssso\033[38;5;202m++++\033[38;5;208m////:-`"
    print "              .-:///\033[38;5;202m++\033[38;5;88mosssso\033[38;5;202m++\033[38;5;208m///:-."
    print "                `.://\033[38;5;202m++\033[38;5;88mosso\033[38;5;202m++\033[38;5;208m//:.`"
    print "                   `-:/\033[38;5;202m+\033[38;5;88moo\033[38;5;202m+\033[38;5;208m/:-`"
    print "                      `-++-`\033[0m"
    print ""
    print bcolors.ENDC
54
    print ctrl.start_anova()
Brendan O'Leary 🐢's avatar
Brendan O'Leary 🐢 committed
55
    print ctrl.start_timer()
56 57 58 59 60 61
    print ctrl.anova_status()


if __name__ == "__main__":
    main()