Anova sous vide control over MQTT

I wanted to link my Anova Precision Cooker to Home Assistant. I have the WiFi model, but didn’t want to rely on an external web service. So my solution connects to the Anova over Bluetooth, and creates an MQTT bridge.

For my house, I put a Raspberry Pi Zero W in the kitchen, which talks to the Anova with the built-in Bluetooth interface. I have Home Assistant running on another machine, using the MQTT HVAC component to interface with my bridge. The Anova timer can be controlled by adding an MQTT sensor and switch.

With thanks to a couple of contributions, most of the functionality of the sous vide is supported. AnovaMaster can switch the device on and off, set the temperature and units (Celsius or Fahrenheit), as well as full control of the timer. The documentation covers how to get the python daemon installed and running, and includes a sample Home Assistant configuration to use it.

If you’re interested, check it out at https://bitbucket.org/pjhardy/anovamaster

9 Likes

Thanks for sharing. I have been looking forward to this integration for a while. Will give it a try and report back.

Awesome work, I came across this today as I was trying to get my WiFi model connected with HA. As much as I dislike having anything rely on external services, I do not want to have to add more hardware to my kitchen for this functionality.

I got it all setup with my Google Home which was nice, but I will have to dig deeper to get it going with the WiFi.

Thanks for taking the time to share this with the community.

That’s fair enough. Anova haven’t published an API for interacting with their web service, but you may be interested in GitHub - bmedicke/anova.py: Python 3.6+ module to interface with the Anova 👨🏽‍🍳 Sous-vide cooker ⏱️ private API. , which reverse engineered it and looks to be fairly functional.

Very minor update to my script. I’ve added real logging, instead of just printing to stdout. Part of my plan to eventually have it running as a real service, instead of something I’m just launching from a terminal.

Is there a way to run this on hassio ?

This is a separate program that runs outside of Home Assistant, and communicates over MQTT. I run it on a separate Raspberry Pi in my kitchen. If you’re going that route, it’ll operate with hassio just fine as long as you install the MQTT addon.

There’s currently no way that I know of to run it on the same machine as hassio. It could definitely be turned in to an addon as well, but I have neither the knowledge or time to do that work, sorry.

Devin Vitone has attempted that pulling your work and trying to build a hassio addon. https://bitbucket.org/dvitone/anovamaster
I tried installing as a local addon install. Does not run yet.

Thanks for your work on this.

Oh, wow. I saw them forking the repo, but lost track of the work they were doing.

What sort of errors are you getting? Taking a quick look at the Dockerfile in that repo, I suspect it might not have all the bits required for a bluetooth stack, but don’t really have a test environment to play with it in.

Have gotten a little more down the road. Anova local addon for hassio from the bitbucket above starts. Currently getting error below. My setup is hassio on intel nuc.

Running script
Traceback (most recent call last):
File “/run.py”, line 29, in
main()
File “/run.py”, line 14, in main
my_anova = AnovaMaster(config)
File “/AnovaMaster/AnovaMaster.py”, line 20, in init
command_callback = self.mqtt_command)
File “/AnovaMaster/MQTTController.py”, line 17, in init
client.connect(config.get(‘mqtt’, ‘server’))
File “/usr/lib/python2.7/site-packages/paho/mqtt/client.py”, line 768, in connect
return self.reconnect()
File “/usr/lib/python2.7/site-packages/paho/mqtt/client.py”, line 895, in reconnect
sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
File “/usr/lib/python2.7/socket.py”, line 575, in create_connection
raise err
socket.error: [Errno 22] Invalid argument

Checkout my PR here for native support inside homeassistant: https://github.com/home-assistant/home-assistant/pull/15745

No MQTT needed with this, uses the bluetooth directly on your home assistant box. Should work fine inside Hass.io too.

2 Likes

Interesting! Thanks for letting me know about your work. Hope it goes well.

My decision to use MQTT was deliberate - this code runs on a separate machine a long way from my HA server. But there’s definitely value in providing a component. And when your proposed architecture changes get in I’ll happily work on an MQTT cooker. :smiley:

1 Like

Ahh, that sounds fantastic! Your work was part of what helped me get started with this, thank you!

An MQTT platform for remote setups would be amazing

Do you know how it’s going with the component? Really looking forward to it!

1 Like

@arbreng me too!

Hey guys, I’m still working on this! August was pretty crazy; lots of travel and I got engaged!

I’m finally going to have time to finish the code this weekend :slight_smile:

3 Likes

Thanks for all the work. Do you know which Anova devices will work with this integration? There’s the wifi model, the 2nd gen Bluetooth model and the nano, do all 3 work?

The integration is using Bluetooth so the 2nd gen and nano should work. I have a 2nd gen so that’s the only one I’m actually testing.

The nano is listed as 4th gen; was there ever a 3rd gen?

WiFi is also doable but that’s a later step, and it’s a pain because it requires man-in-the-middling your cooker so you can get it’s https secret. Bluetooth is plug and go by contrast

1 Like

For what it’s worth, the wifi Anova cookers also have a bluetooth radio. I only use mine with Bluetooth, it’s never been paired with a wifi AP.

1 Like

Thanks for the work! would love to test it.