#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ https://stefangourmet.com/2015/03/25/rabbit-sous-vide-time-and-temperature/ """ import anova cooker = anova.AnovaCooker('', '') print(cooker.create_job(temperature=75, seconds=28800, temperature_unit='c'))
results.output) if __name__ == '__main__': #Parse out all the arguments m, t, d, u, s, o = check_arg(sys.argv[1:]) #Logging all the passed variables logging.info('Method is: %s', m) logging.info('Temp is: %s', t) logging.info('Duration is: %s', d) logging.info('Unit is: %s', u) logging.info('Stop alarm flag is: %s', s) logging.info('Output type is: %s', o) #Set up the connection to the cooker_id cooker = anova.AnovaCooker(cooker_id, secret) #Get the current cooker status cooker_status=cooker.get_status() parsed_json = json.loads(cooker_status) is_running=dictator(parsed_json, "status.is_running") #Core if statements base on method specified on the command line if m == "status" : logging.info('Calling method status') display=cooker.get_status() elif m == "silence" : logging.info('Calling method silence') display=cooker.stop_alarm() elif m == "stop": logging.info('Calling method stop')