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 betweenhttps://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.