There are ample integrations available for Miele@home devices, but none of them can talk directly to the Miele device – they all go through some third-party cloud service.
I have attempted to resolve this by implementing a REST server that can be paired with, and afterwards talk directly to, Miele devices on a local network. This can be integrated in HA using the REST sensor, and provides basic status updates (which program is the machine running, what’s the progress, when is it done, what was it doing an hour ago). It is also possible to remote-start the Miele device, but more development is needed to make this practicable, so the functionality is not exposed through HA. The key generation and pairing functionality is also not yet exposed through HA; scripts are provided for that purpose.
So far, I was only able to test this on 2 Miele@home devices (a washer and a dryer). I would appreciate logs, success or bug reports, and feedback from any other Miele@home device owners. Ultimately, the goal is to develop a fully functional local integration that can do everything the cloud integrations can (or more).
Please note that the pairing is likely incompatible with any existing Miele@home cloud-based integrations. The REST server needs to know a 256bit AES key shared with the device to encrypt and sign device communications; this key needs to be set in the device to establish communications. So you will need to decide if you want your device controlled locally, or through the cloud.
Example HA sensor data from a Miele@home washer below.
The third-party cloud service isn’t able to start my dishwasher, so I’d love to give this one a try. I only have to find some time to play around with it!
Subscribing to your thread in the meanwhile…
What’s the model of that dishwasher, and what integration/cloud service are you currently using? Does the device have a “remote start” option on its physical control panel?
Try it out I haven’t tested it against a dishwasher, but I’m confident it’ll work.
I need Python to run this, can I run this on something like a HA Yellow? Or should I setup a different server with Python on it?
Is there any risk with uploading the generated device key to your Miele device?
Firewalling the outbound traffic from the Miele device seems necessary? I already have my devices on a seperate network, but I haven’t finished that configuration yet. I’ll have to finish that first it seems.
(1) From what I can tell, the HA Yellow is a Raspberry CM4 “under the hood”. That thing has plenty of resources compared to what this small server needs; you will not have an issue running both on the same device.
(2) During testing, I uploaded both garbage WiFi info and a garbage key once, and was able to reset the appliance from the local control panel with no issue. So I’d expect the worst realistic outcome to be having to do that… but hey, this is all reverse engineered code – nobody’s tried it before with your device, so in theory, anything can happen.
Not necessary for the server to work, but recommended because the Miele device opens up outbound network connections without being asked to do so. Frequently, these types of devices run severely outdated OS and software versions that may create a security risk if you put them on the internet, or they they do other annoying things with the connection (e.g. x.com) .
that´s awesome! Thank you! I´m working on integrating a dishwasher. First steps are done, but I get an Error 400 by trying to provision the key:
–2025-02-06 13:30:20-- https://192.168.1.1/Security/Commissioning
Verbindungsaufbau zu 192.168.1.1:443 … fehlgeschlagen: Network is unreachable.
h@Mac helpers % ./provision-key.sh 192.168.6.126 ./keys.json
Trying HTTP
–2025-02-06 13:30:43-- http://192.168.6.126/Security/Commissioning
Verbindungsaufbau zu 192.168.6.126:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 400 Bad Request
2025-02-06 13:30:43 FEHLER 400: Bad Request.
Any ideas what I can change or what I can provide to help finding out what the dishwasher needs to connect?
Best,
Holger
Update: After setting up a fresh ubuntu-instance, I installed the service. Unfortunately it exits on line 196 with an Attribute Error : ‘list’ object has no attribute ‘items’. Maybe that’s the consequence of the non-distribution of the keys?
it appears that an error 403 from the provisioning endpoint means “your device is already provisioned”, whereas an error 400 means “your request does not conform to the protocol”. Your device is giving an error 400, so I was suspecting an issue with the provisioning code, and I think I found the problem. Please grab the latest version of the repo and run step 2 from the beginning again (including the “generate-keys” command).
I followed the other steps, too. Unfortunately, the Server.py throws the still the same error - exit at line 196. Do you have a good idea on this, too?
Update:
Perfect. I got it running so far. But on the way I faced a few issues:
the list issue counts for the other lines, too. I had to delete all tabs to make a list out of it.
there is an hardcoded IP in the MieleRESTServer.service which will bind a wrong IP
But now it runs, if I call it manually - the service still exits. But even on the manual started server, it only gives me an error 500:
Ha! I got it. I change the route to auto and than it worked! The auto-route puts 000 to my serial number - this might help others, too. Now, I will try to get it into HA. And to get it running as a service.
Again, thank you very much for you work on this!!!
Yes my bad… the YAML has to be a mapping, not a list. Please remove the leading hyphen before the device name in your config file. I’ll also update the example config.