Many thanks for your thoughts and clarification. I configured the firewall and isolated the Miele Device. The firewall log showed that the Miele Device now and then tries to contact the IP 52.136.223.17. Maybe for getting a software update? I’m less concerned about the MieleRESTServer as I can see from the source code what it’s doing.
I don’t know – it’s all behind TLS (encryption), and TLS is designed precisely to prevent you from seeing what’s inside. If you’re curious enough, you could try to generate a spoofed certificate and see if the device accepts it. Or find some other issue with the TLS implementation to recover the plaintext. But other than as an exercise in network security (which, of course, is always glorious and a purpose in itself), not quite sure what that would give you – the devices all work fine offline
@akappner thank you for everything you’ve done!
I bought 4 Miele products, so this comes very handy (as I don’t want to use cloud).
None the less, I have few issues, I tried multiple approaches:
Install Docker on Synology NAS
I modified port from 5001 to 7001, because port 5001 uses Synology.
I can’t access web server from outside of NAS (not sure why).
When I SSH into NAS while web server works, what I get: “404 Not Found”
– your screenshot shows that you’re using the “bind” parameter to instruct the server to bind only to 127.0.0.1 (which is the default, both for the bare metal installation and the provided Docker build).
If you want the server to be reachable from other hosts, change the 127.0.0.1 to 0.0.0.0 .
– “404 not found” is the server’s response to you requesting the / endpoint (or any other endpoint that doesn’t exist). Try the /generate-summary endpoint.
Note that the server won’t do anything meaningful until you give it at least one Miele device in the configuration.
I copied exmaple conf file to /etc/ directory. In the etc folder with ls command I don’t see MieleRESTServer.config file though, but I can open it while I’m trying to edit it with nano.
So results: /generate-summary/ results in 404 /generate-summary.html results in 404 /generate-summary results in 500
it seems like you simply copied the example config over without modifying it to match your local configuration, so the server tries to connect to a Miele device at 10.0.0.11. Unless you actually happen to have a Miele device at that IP, this will never work.
You need to follow the steps in the Readme to provision the Miele device with keys, connect it to your network, and then the server will be able to talk to it.
@akappner Thank you for all the effort (and probably time) you’ve put in this.
I have been trying to get my Miele dryer TSF763WP connected using your scripts without success.
The first step, getting it connected to my home network, works every time without any problems. But the commissioning step never succeeds.
I have been trying the same steps with Postman where the second step now gives me a 200 reponse with the following body
[
{“Failure”:{“groupId”:null}},
{“Failure”:{“groupKey”:null}}
]
The body I send looks like this:
{“groupId”:“00…A4”,“groupKey”:“9F…DB”}
The keys are generated with the same functions you use in your script.
Do you have any idea what I could try next except from sniffing my network?
I have tried Wireshark but I am not an expert at this and using pcapdroid on my smartphone blocks the Miele app somehow when trying to set my dryer.
did you also try the “provision-key.sh” script, and it didn’t work, or you are simply trying to reimplement the provisioning step in Postman and that didn’t work?
My first suspect would be that these JSON fields are case sensitive… GroupID and GroupKey, not groupId and groupKey. My script sends the former, not the latter – not sure if the latter can work.
just wanted to report that I have successfully connected my “WWE460 WPS” to the REST server (set up as docker container) and Home Assistant following the instructions - and a little help from gpt-o4 (only for reading basic info so far, not remote start etc.)
after testing I can now also confirm that the remote start of the “WWE460 WPS” is working
I didn’t have to set “Mode 97” manually but the POST request to this machine has to be sent to /start/washer (after selecting a washing program and setting a timer so “DeviceReadyToStart” is set true)
edit: wakeup also works with /wakeup/washer
but for “curl http://127.0.0.1:5001/walkdop2tree/washer”
i get: {“error”: “DOP2 Root Node not found”, “device”: “xxx.xxx.xxx.xxx”}
Thanks for the report on the basic info and remote start; added it in the Readme.
Regarding DOP2, very mysterious. Not sure why the DOP2 endpoint is disabled on so many of these. I’m confident it’s there internally but I’m not able to access it. Ultimately, it may be necessary to use some more invasive methods to get remote code execution on the device and see what’s actually there internally, and how it can be enabled. I’ll try my best.
new to HA and already digging into the integration of our Miele devices into HA and then into Apple HomeKit.
So far with the normal HA Miele Integration it is working but, honestly, shame on the Miele cloud services. The reliability is horrible. Because of that I came across this thread and wanted to join.
Could you go a bit more in detail regarding the following statement “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.”
Without having tested it myself, I believe this means you have to “factory reset” your Miele network module (and thus remove it from the cloud) and re-pair it with the REST server according to the instructions here. It can’t be connected locally and to the Miele servers at the same time.
After pushing the new key to the Miele Device, is there a way back? In case anything is broken and you need the customer support, you’ll need to do a factory reset. Right?
Is there (already) a way of updating the Miele device without the Miele cloud?
Are there any critical cons against no
in order for my software to talk to your device, they need to share a common encryption key. Generating and setting that key is what Step 2 in the instruction does. In order for Miele’s app and cloud services to talk to your device, they need to share a common encryption key as well. Miele’s app can generate that key for you as well – but unlike my code, it won’t tell you the key nor will it allow you to specify your own. So to use both simultaneously, you would need to figure out a way to either a) generate the key with my code and somehow force the Miele app to use that same key, or b) generate the key with Miele’s app, somehow read it out, and put it into my server. An obvious way to do that would be to man-in-the-middle the initial communication between the Miele device and the app, or to write code that simulates a Miele device and prompts the app to issue a key. So until someone completes that exercise, I can’t tell you a way to do it. Happy to accept a pull request from you if you take on that challenge.
You can always reset the key stored in the device (that’s “Step 0” in the instructions) to go between the Miele app and my server.
Not gonna opine on how warranty is affected by you installing custom keys – that’s a legal question, and I’m (most likely) not a lawyer in your jurisdiction (: just assume you lose all warranty the moment you even think about using my code.
Device firmware updating through the REST server is a work in progress – for now, the answer is “no”. I have found various “Update” endpoints, but have not been able to test them because I have not been able to get hold of a valid firmware binary. If you have one, let me know.