All Projects β†’ bmedicke β†’ anova.py

bmedicke / anova.py

Licence: other
Python 3.6+ module to interface with the Anova πŸ‘¨πŸ½β€πŸ³ Sous-vide cooker ⏱️ private API.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to anova.py

Eelbrain
eelbrain.readthedocs.io
Stars: ✭ 38 (-22.45%)
Mutual labels:  anova
bruceR
πŸ“¦ BRoadly Useful Convenient and Efficient R functions that BRing Users Concise and Elegant R data analyses.
Stars: ✭ 110 (+124.49%)
Mutual labels:  anova
measures-of-effect-size-toolbox
Collection of Matlab functions for the computation of measures of effect size
Stars: ✭ 25 (-48.98%)
Mutual labels:  anova
MachineLearning
Machine learning for beginner(Data Science enthusiast)
Stars: ✭ 104 (+112.24%)
Mutual labels:  anova

what is it?

Python 3.6 module to interface with the Anova private API.

motivation

API access is something we’re considering for the future, and we’re researching the ways people would want to interact with it.

That was more than a year ago. This is a little nudge ;)

how to use it

import anova

cooker_id = 'anova xxx-xxxxxxxxxxx'
secret = 'xxxxxxxxxx'

cooker = anova.AnovaCooker(cooker_id, secret)

# get status of the device. all methods return json:
print(cooker.get_status())
{
  "status": {
      "cooker_id": "anova xxx-xxxxxxxxxxx",
      "current_temp": 27.3,
      "is_running": false,
      "speaker_mode": true,
      "target_temp": 30,
      "temp_unit": "c"
  }
}

Examples:

# set temperature and start it:
cooker.target_temperature = 60
cooker.running = True

# check if running:
print(cooker.running)
#  True

# get current temperature and unit:
print(cooker.current_temperature)
#  59.8
print(cooker.temperature_unit)
# 'c'

# to use the timer we have to create a job.
# 45 degrees (currently set unit), 900 seconds:
cooker.create_job(45, 900)

# 80 degrees Fahrenheit, 600 seconds:
cooker.create_job(80, 600, 'f')

TODO: add documentation

installation for development

# clone it and cd to the project folder.
pip3 install -e .

getting your cooker_id and secret

Since the implementation of certificate pinning the previous method no longer works.

You can still get the cooker_id and secret with the method mentioned in this issue: Certificate Pinning? #1.

getting your cooker_id and secret (deprecated)

Due to the implementation of certificate pinning the following method no longer works, see the section above for a workaround.

You will need to intercept the https traffic between your phone and the Anova API server.
We'll be using mitmproxy to run a man-in-the-middle attack.

on the intercepting server

# install mitmproxy
pip3 install mitmproxy

# now run it:
mitmproxy

# or if you prefer a browser UI:
mitmweb

on your phone

  • set up an http proxy with your server's IP address and 8080 as the port (mitmproxy default)
  • go to http://mitm.it and install the certificate
  • run the Anova Wi-Fi app

back on your server

  • filter for api.anovaculinary.com and look for any POST or GET request
  • your cooker_id is the string between https://api.anovaculinary.com/cookers/ and ?request_key
  • your secret is the string after &secret=

Don't forget to remove or disable the http proxy when you are done. You might also want to remove the certificate too.
Please don't hammer the server. The iOS app polls about once every 5 seconds, try to stick to that. The cooker does not even seem to update that often, so there is no point in polling any faster.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].