Modifying Miele@home prepared refrigerator

I bought a new refrigerator, model K 34673 iD, which I wanted to add to my Miele@home system. It was marked as “Prepared” for Miele@home, which I assumed meant that it was simply a matter of adding an XKS module to it. I already bought an XKS 3000 Z (ZigBee) module two years ago at the same time as I placed an order for the previous model, K 34473 iD. That order was unfortunately cancelled, so I ended up with the XKS 3000 Z module and a retrofit kit, XKV 3000 KF.

The new model was prepared for the XKS 3130 W (Wi-Fi) module, but as this is an upgrade that should be backwards compatible, I had hope that XKS 3000 Z would also be forwards compatible. Back to that later. Both modules look exactly like this:

XKS module

The first problem was that I could not find anywhere to connect the XKS 3000 Z module on the back of the refrigerator as documented. I eventually gave up and desperately created a support ticket at Miele Denmark. A technical employee called me back pretty quickly and instructed me how to perform the operation. This is where the retrofit came into the picture. I was told that I needed a special cable, and that he would send it to me. This is the cable I already got:

Product name: XKV 3000 KF
Materialnummer: 9788210
EAN: 4002515415245

And this it the cable that was sent to me:

Materialnummer: 11034080
EAN: 4002516106159

The cables look pretty identical, but I’m not sure they are. It could actually be the case that some models would need one cable type and others would need the other. Otherwise I don’t see why they would change the product number etc., but of course, you never know.

The modification I had to do involved dismounting the display panel on the front of the refrigerator. A screwdriver was needed to remove the covers on each side of the panel, but this I had to do anyway, since I need to change the door hinging. After reading the manual a few times, I succeeded with this without leaving any visible scratches from the front. Next, the display had to be removed. This can be done without any tools, but it requires a lot of force. The cables are long enough so it can be safely pulled out. It was hard to do, especially at the sides, but it worked out:

Front panel dismounted

Next challenge was to connect the cable and get it to work. This is actually very easy, but a simple mistake delayed my project with more than a week, cost me € 80 and a lot of frustrations. Again I was saved by the same Miele employee that called me the week before.The mistake was this:

Main electronics
Wrong slot

The connector fits perfectly into this socket. But this is the wrong place, and it took me a week to figure that out. In the meantime I was struggling with error “FF” – the refrigerator will not function when a module is connected to this socket. The display will just blink and switch between displaying “FF” and “–“. In the meantime I ordered the XKS 3130 W module, because it could be compatibility issues with the old XKS 3000 Z module, and also this old module wasn’t supported.

The module should not be connected to the main electronics, but instead on the side of the display panel:

Correct slot

After correcting this mistake, everything started to work. I tried the XKS 3000 Z module first, and it worked:

Miele@home configured

Note: It might take up to a minute before the Miele@home logo displays. To perform the configuration click the menu button (second rightmost), then click up or down until the symbol is blinking. Now click OK, and “0” is displayed. Click Up so that it changes to “1” and click OK again. Now add the device on the XGW 3000 Z gateway.

Next I tried the XKS 3130 W module for comparison. The configuration is different. In this case you just have to use the Miele@mobile app to add the module to the Wi-Fi network. This worked out pretty easily.

I haven’t been able to spot any differences in terms of functionality between the two modules, so I have decided to mount the refrigerator with the ZigBee module instead of the Wi-Fi one. Since I own the XGW 3000 Z gateway, this way I will not create a dependency to my router/Wi-Fi network, and the ZigBee module will perhaps even help creating a better ZigBee mesh network together with my other ZigBee Miele@home devices. Functionality of both modules – from app and Homebus protocol:

  • Reading of current temperature.
  • Reading of target temperature.
  • Reading of state “door open”.
  • Starting and stopping super cooling.
  • Starting refrigerator when off (only through Homebus, Miele’s app doesn’t support this).

That’s it. You do this kind of project because you can, and for no other reason. I’m not letting people get to me by asking why. It’s simply because I can, and because it’s fun. 🙂 Time for wrapping up, having the new cable nicely put into place:

Top cover unmounted

And put top cover back on again:

Top cover mounted

The new appliance as seen in the Miele@mobile app:

Power consumption

As bonus info, I made some power measurements before integrating the refrigerator. Here are the numbers:

  • Idle without any module installed: 1.0 W
  • Idle with XKS 3000 Z installed: 1.5 W
  • Idle with XKS 3130 W installed: 1.9 W

Twin refrigerator

Fun fact: Miele K 34673 iD seems to be a rebranded version of Liebherr IKBP 2360-20. It would be interesting to try to integrate a Liebherr refrigerator into a Miele@home system. The model number and serial number is identified though, so it might not be possible. Price difference: >300 EUR.

Miele XGW3000 firmware 2.3.4

New firmware, this time noticed a bit late, since XGW3000_version.txt is still showing 2.3.0. I guess I should switch to http://GATEWAY/Rest/Update/ and check “AvailableVersion”, or once again reverse engineer how the gateway checks the version. Anyway, here goes…

Release 2.3.4 – 12.09.2018

  • Improved Miele@mobile behavior in conjunction with ZigBee appliances
  • Stability improvements and bugfixing

Good news is the this fixes the Miele@mobile app so it doesn’t crash anymore on startup. I guess this reveals that they changed the API between the app and the gateway in app version 2.9.4 and didn’t provide backwards compatibility for the existing gateway API. So the app was constantly crashing until the gateway firmware received an update. Not elegant.

First observation: It seems like phases for my oven (H 5581 BP) isn’t supported anymore. Running self-clean/pyrolysis:

Homebus

<information>
<key name="Appliance Type" value="Oven"/>
<key name="State" value="Running" type="state" raw="5"/>
<key name="Remaining Time" value="1:21" type="duration" raw="81"/>
</information>

Rest

{"SignalFailure":false,
"TargetTemperature":[0,0],
"Temperature":[0,0],
"SignalInfo":false,
"ProgramID":2348810240,
"InternalState":0,
"RemainingTime":[1,24],
"RemoteEnable":[0,0,0],
"Status":5,
"ProgramPhase":3072,
"ProgramType":1,
"ExtendedState":"000C100500110000000100000000110400000000000000000018010000000000000000000242000000000000400000000000000000000000000000",
"ElapsedTime":[0,42],
"SignalDoor":false,
"Light":0,
"ProcessAction":0,
"StartTime":[0,0]}

These are my notes for ProgramPhase 3072 and pyrolysis:

			case 3072:
				// Purpose unknown, seems to be set when the oven is just turned on.
				// Catch it here to avoid excessive logging.
				return setPhase(PHASE_UNKNOWN);
[...]
			case 3076:
				return setPhase(PHASE_PYROLYSIS);

Also, temperature is now reported as 0°C. Removing functionality for my oven is just sad, since it’s the appliance with least functionality already (for example, ProgramID’s are not supported). Here’s how it looks in Miele’s own app now:

Miele@mobile screenshot

Update/precision: This bug was probably caused by the fact that I upgraded the firmware on the gateway while the oven program was running. Since the phase didn’t change after the gateway rebooted, the gateway probably had some uninitialized values. I guess it should be possible to query the devices after a boot to get updated values, but I don’t know which limitations may exist. So the bug is there, but it’s rare.

Miele XGW 3000 gateway firmware 2.3.1

New firmware the other day. First it was 2.3.0, then quickly after 2.3.1:

Release 2.3.0 – 01.08.2018

  • Improved device sign on
  • Stability improvements and bugfixing

I wonder what’s in 2.3.1, but probably something was broken in 2.3.0, then quickly fixed.

No changes observed so far. Known bugs persist, new ones not discovered yet. That’s not entirely true. I still don’t know if Miele fixed the random change of name of some appliances. In my case it’s always the dishwasher (my only Wi-Fi device), and I have seen it change to “Oven” or “Washing machine”, i.e. names of my other appliances. Update: This bug is still present.

The app

The Miele@mobile app for Android also received an update a few days later (Wednesday, August 8th): version 2.9.4. This app has generally been of great quality, but this time it’s completely broken:

  • Always crashes on first startup. Never happened before.
  • Notifications doesn’t work anymore.
  • The appliance list sorting algorithm is changed from logical to random, e.g. turned off appliances at the top while other appliances are running.
  • Wrong reporting of power consumption. Reports 1.0 kWh when it should be 0.1 kWh (washing machine).
  • Oven program is reported as “APP_MISSING_LOCALIZATIONKEY_-1946157056 (H 5581 BP, XKM 3000 Z). The JSON value for ProgramID is weird (e.g. “2348810240”), don’t know if this bug is in the ZigBee module, the oven or the gateway. However, the app didn’t show this before.
  • When trying to edit product name to default: Object reference not set to an instance of an object.

It seems someone was back from vacation and decided it was time to push out a new release because of the new Miele logo. But forgot that it was still untested. Please fix. Rescue: Version 2.6.0

Miele XGW 3000 gateway firmware 2.2.0

I upgraded last week and today I investigated this firmware version a bit. From the release notes:

Release 2.2.0 – 21.02.2018

  • Stability improvements and bugfixing

Bugs I have found to be fixed

  • In the Homebus 1.0 protocol, Wi-Fi devices will no longer return HTTP code 500 (internal error) when in state “Waiting to Start” (numeric value: 4)

Bugs (still) not fixed

  • The additional name for my dishwasher (“Dishwasher”), keeps changing to “Washing machine” from time to time.
  • The ElapsedTime value for my Wi-Fi dishwasher is always:
    "ElapsedTime":[0,0]

New bug found: After a power outage today, my washing machine showed up as “mac-001d65feff02237b” (obscured a bit due to general paranoia) instead of its UID. I was still able to access it through http://GATEWAY/Rest/Devices/mac-001d65feff02237b/Ident, though. After another reboot, it was back to normal.

Miele XGW 3000 gateway firmware 2.1.0

None of the bugs mentioned in my previous post about 2.0.9 is fixed in this release. No new features discovered. See release notes:

Release 2.1.0 – 26.10.2017

  • Support for SMA Sunny Homemanager 1.x adapted
  • Improvement of the Miele@mobile remote access connection
  • Datasynchronisation improvements
  • Stability improvements and bugfixing

Oh, and yes, they changed the versioning and renamed previously released versions. So when I’m now referring to 2.0.9, which I called 2.09 in my previous post, it isn’t by mistake.

Miele XGW 3000 gateway firmware 2.09

Seconds after publishing my previous post, I was a bit confused after reading the firmware release notes again, while checking that I got the version number right. It seems that Miele pulled back version 2.09, which of course it not possible to do after people, including myself, have upgraded. The release notes was also edited to reflect this, so the notes about 2.09 are gone. http://GATEWAY/Rest/Update/:

{"AvailableVersion":"2.0.7","UpdateInProgress":false,"Type":"XGW3000","ReleaseNotes":{"href":"http://www1.miele.com/media/ex/int/service/downloads/xgw3000_release_notes.html"},"NewerAvailable":false,"CurrentVersion":"2.0.9","Rev":"1.4.6"}

Direct link to release notes.

Now I wonder if the bugs mentioned in my previous post was also present in version 2.07. Version 2.09 was released on September 27th. I know because I upgraded over VPN from CPH Airport while waiting for my flight – just after receiving a notification from my app that it was available.

Miele XGW 3000 firmware 2.09 and new dishwasher with Wi-Fi

I got a new dishwasher (G 6895) with Wi-Fi integrated and at the same time received a new firmware update the my XGW 3000 gateway. So I now have three ZigBee appliances (XKM 3000 Z) and one Wi-Fi applicance (EK039W). I was curious to see how this integration with the existing system would work.

Homebus 1.0
Integrated nicely – the devices shows up with id=hdm%3ALAN%3AUID%230 instead of id=hdm%3AZigBee%3AZigBee address%23210. However, when programmed, the gateway will return HTTP code 500, i.e. internal server error:

500 No message

Homebus 2.0 (Rest API)
The device is not included in http://GATEWAY/Rest/Devices/. However, when accessing http://GATEWAY/Rest/Devices/UID/ directly, JSON is returned with relevant ident/state information. Including water/power consumption in ExtendedState:

000702040F0000000000000080000000020026030001041B
                              ^^^^^^^^ 0.2 kWh/3.8 L (0x26/10)

I have not figured out how to interact directly with the dishwasher, and would also prefer not to, since this would complicate matters. However, it’s a shame that the Rest implementation is partly broken. For now I’ve hardcoded the new UID in the app I’m working on (as well as my water/power monitoring system running on my Linux server), but I’ll probably end up having to combine the two protocols in order to do what I need. I’ll probably do this anyway, since I also haven’t figured out how to perform actions using the Rest protocol.

Another thing that is broken when accessing the gateway through the Rest protocol is the ElapsedTime value, which is always:

"ElapsedTime":[0,0]

Actually, I think the value is dependent on the current value when booting the gateway. At one point it was always [1,14] until the next reboot, and this was quite possibly the first value it saw when first booting up.

So the value cannot be used at all, e.g. for creating a progress bar. Too bad, since this is one of the advantages of using the Rest protocol over the old XML protocol.

Protocol values

Values found so far:

	static final int PHASE_PRE_WASH    =  2;
	static final int PHASE_MAIN_WASH   =  3;
	static final int PHASE_RINSES      =  4;
	static final int PHASE_FINAL_RINSE =  6;
	static final int PHASE_DRYING      =  7;

	static final int PROGRAM_ECONOMIC         = 28;
	static final int PROGRAM_QUICK_POWER_WASH = 38;

Mapping to Homebus 2.0 phases:

@Override
boolean setProgramPhase(int programPhase) {
	super.setProgramPhase(programPhase);

	switch (programPhase) {
		case 1792:
			// Purpose unknown, observed when programmed (without phase) and off.
			return setPhase(PHASE_UNKNOWN);
		case 1794:
			return setPhase(PHASE_PRE_WASH);
		case 1795:
			return setPhase(PHASE_MAIN_WASH);
		case 1796:
			return setPhase(PHASE_RINSES);
		case 1798:
			return setPhase(PHASE_FINAL_RINSE);
		case 1799:
			return setPhase(PHASE_DRYING);
		default:
			setPhase(PHASE_UNKNOWN);
			return false;
	}
}

Miele XGW 3000 firmware 2.06

Another firmware upgrade released yesterday. First thing I’ve noticed is that my tumble dryer (TKR 350 WP) and oven (H 5581 BP) now also include numeric/raw values in the Homebus XML, i.e.:

<key name="State" value="Off" type="state" raw="1"/>

Excellent! So my previous theory about this feature missing in the XKM 3000 Z module firmware version 1.02 was wrong – it was missing for certain device types in the gateway firmware (2.0.3).

Miele@mobile 2.02

By incident I found out yesterday that the Miele@mobile app was updated in Google Play back in May. For some reason Pushbullet didn’t notify me, and I’m not allowed to download the app from Google Play myself, since I’m resided in Denmark and Miele@home is not supported here. Strangely, the only visible change I found in this update since 2.01 was a complete Danish translation. Nice – hopefully this means that Miele@home support in Denmark is not too far away. Update, September 6th 2016: I just found out that the geo-restriction in Google Play is also gone, or at least expanded to include Denmark. It’s now also possible to select Miele Denmark as origin for the Miele user account.

Today’s small rant:

  • Why this geoblocking? I’m allowed within EU to buy all the hardware in Germany, but the only app that exists for the system, I’m not allowed to use. With my very expensive appliances and Miele@home gateway/modules I might add. Luckily in Android there are ways to get the app anyway, but my girlfriend can’t download the app for iPhone and use the system at all.
  • Why not open up the new JSON-RPC API, so better 3rd party apps could be written, that didn’t have to depend only on the old broken Homebus protocol? This would make the system more useful since new ways to use the sytem would arise.

Miele XGW 3000 firmware 2.03

For quite some time, I’ve been holding back a post introducing my Miele@home Android project. So in the wrong order, here’s an attempt to get in touch with some fellow Miele@home geeks: Sharing my findings about the new XGW 3000 firmware upgrade, which was released last week.

My findings are only about the Homebus protocol and multicast packets, since the new JSON-RPC protocol isn’t for public consumption (or so it seems). So here we go – changes since version 2.0.0:

  • Element ‘type’ in http://<gateway>/homebus/ seems to be working again (e.g. <type>WMV960</type>). I’ve never seen this work since the original firmware of my gateway (1.1.0).
  • Prior to 2.0.3, multicast packets would refer to a ZigBee MAC address (at least when communicating with XKM 3000 Z modules): “id=hdm:ZigBee:<MAC>”. This is now changed to device UID.
  • For some devices numeric values are now included in the http://<gateway>/homebus/device XML:
    <key name="State" value="Running" type="state" raw="5"/>
    <key name="Program" value="Cottons" type="program" raw="1"/>
    <key name="Phase" value="Rinses" type="phase" raw="5"/>
    

    This is true for my WMV 960, but not my TKR 350 WP or H 5581 BP. They all have the XKM 3000 Z module, but the WMV has firmware version 1.16, while the other two are version 1.02 (does anyone know if these modules are firmware-upgradeable and/or where to find a changelog?).

Bugs still present:

  • Language parameter not respected for http://<gateway>/homebus/device?language=en. Gateway language is always used.
  • Bizarre values for key “Start Time”. Will update the post on this later.

That’s it for now. I’ll return later with more information about my project as well as rants about the Homebus protocol and Miele’s secrecy and lack of support.