Coffee machine (Moccamaster) Z-wave hack

I wanted to make my coffee machine smarter. I started out by plugging it into a smart plug. That was fun, but not perfect.
For starters, I prepared the machine the night before a few times, only to find out the next morning that I forgot to set the power switch on the machine to “on”. Home Assistant did turn on the smart plug, but since the machine was turned off itself, no cuppa for this guy. Big disappointment.
Another bit of irritation with this setup was still having to turn on the power plug after having turned on the machine manually.

The confusion I ran into is of course the result of having two distinct power switches for a single device, where both switches have to be turned on to make the machine work. That is why I came up with the plan to hack the coffee machine by installing a power switch that can be controlled by both Home Assistant and the physicial switch on the machine. That way, there is only one power switch, removing all confusion.

I ended up installing a FIBARO switch and so far I love the results.

Pictures and a description of my hack can be found on my github page

Also thanks to my cat Harry, which was a great help during construction.

6 Likes

Really awesome work!

Wonder if anyone has seen a water kettle that I could do the same thing to?

Thanks!

I did look at our kettle too, but its casing does not allow for building in a switch. There’s simply no space available at all. One idea that I have for it, is to keep the switch on the outside. I think that could be done by connecting another power cable with 5 wires instead of 3 (preferably with earth, L, N and two Q wires in it). When doing this (and when the switch in the kettle allows for it):

  • The earth wire goes directly to the kettle
  • The L of the power plug (brown) goes into L on the Z-wave switch
  • The N of the power plug (blue) goes into N on the Z-wave switch and is split off to go to the N input of the kettle
  • The other L of the Z-wave switch goes (via the brown wire) into the switch of the kettle.
  • The other lead of the switch returns (via a black wire) to S1 on the Z-wave switch
  • The Q output of the Z-wave switch goes (via a black wire) to the L input of the kettle.

That should about do it IMO. I haven’t looked into it any further than this, but this seemed to me the way to have the Z-wave switch on the outside and allowing the original power button to work in coop with it.

I haven’t checked if this kind of 5 wire cable is available at all. Another way would of course be to add an extra cable with 2 wires to the setup (which might even be more practical, when looking at the cable routing).

I have some other projects on my list, but the kettle is too. When I can find a good integration hack for it, I will surely post it here.

Update:
And the moment I hit the post button, it hits me (hard): my kettle has a power switch that must be in the “on” position to make the water boil and flips to the “off” position automatically once the water boils. So there is a mechanical component that cannot be replaced with a remote controllable switch :frowning:
I think this is the same for many of the kettles around, possible making a smart power plug as good a solution as a full integration.

1 Like

Same! It’s frustrating.

You guys probably don’t remember the days when kettles did not switch off when they boiled.

Fill kettle, turn on, distraction occurs (phone, visitor), kettle boils dry, magic smoke comes out.

Usually the smoke would come out before it burned the house down.

4 Likes

I remember those, and worse. How about the basic glowing-spiral-on-a-power-cord that you dumped straight into your mug of water? Forget those during cooking and the water boils out, after which the weight of the device / contraption could even tip over the mug, after which the spiral would drop and and wreak havoc.

Yeah, those were the days :grinning:

1 Like

It’s expensive but the zojirushi water boilers work really well with a smart plug. Set the temp in the settings and when the smart plug is turned on it starts warming. I have the VE hybrid one and love it.

Also the x-wing toasters that didn’t pop up could be exciting.

In my first year flatting I could put the toast on side one, run to the gate to get the newspaper and run back. Side one done, flip the bread, do side two.

But if the newspaper deliverer hid the paper behind a bush, the delay was enough that the toast burned on side one.

Happy days.

1 Like

Perhaps someone can help me out. My Technivorm (741.84) was slightly different in that the switches had larger bezels, the main power switch had 4 legs instead of 3 and the wire colors appear to be reversed (blue neutral, brown line). But I reviewed the safety instructions diagrams and believe the 741.81 matches my pot. I wired the first two blue (direct from wall + another wire somewhere in the water tower) to N, first brown to Q (this wire jumps to the pot switch) and last brown (direct from wall) to L.

Anyways, on to the problem, I got everything wired up and it sort of works. However, the device will cut on for almost exactly 6 seconds and then cut off. It’s the same whether I use the physical momentary switch or z-wave controls. I thought there was an issue with my configuration (Param 20 set to 0 for momentary), but I can confirm now that the device is showing the right setting (I’m using hubitat). Through a bunch of trial and error, I realized that it only cuts off when there’s water in the reservoir. When it’s empty, it stays on without issue.

Since it works empty, I’m thinking it’s not the Fibaro switch. Any ideas?

currentProperties : {11=[0], 44=[2, 88], 12=[0, 50], 13=[0, 5], 58=[14, 16], 59=[14, 16], 28=[0], 29=[0], 200=[0], 9=[1], 50=[10], 40=[3], 51=[10], 41=[3], 20=[0], 42=[3], 53=[0, 100], 10=[0], 43=[3]}

dev:264	2020-01-16 07:19:37.207 am	info	New coffee pot was turned off [physical]
dev:264	2020-01-16 07:19:31.907 am	info	New coffee pot was turned on [digital]
dev:264	2020-01-16 07:19:27.732 am	info	New coffee pot was turned off [physical]
dev:264	2020-01-16 07:19:22.051 am	info	New coffee pot was turned on [digital]

Here’s the wires before I touched anything for reference.

Do you also have a picture of the end result for us? In the spare parts PDF on my github, there’s a diagram for 784.81. That seems the closest that I have to your model. Combined, we can check if all wires are in place and such.
I agree that it’s likely not the switch installation itself that is wrong here, given the fact that the behavior changes with or without water, but still good to check this step by step.

Appreciate the help. Here you go. I used wire nuts for temporary purposes so that I could make sure everything works before putting in more solid crimp connectors.
I was also using the 741.81 (which is what I think you meant to say :slight_smile:) from the PDF.

Power Line White > two blue wires (A and A+1) > N terminal.
( B ) > Q terminal
Power Line black/grey > brown wire ( C ) > L terminal
(A, B, C correspond to the letters on your switch picture)

The switch itself isn’t visible, but I think there’s not much that can go wrong with that. One wire from an L-terminal to the switch and the return write going to S1 on the Z-Wave switch, right?. Looking at the wiring and the original diagram, things look like they should look IMO (which is confirmed by the fact that you can power the device to some extend).

The difference between water or no water, would be that the floater switch in the water tank would trigger the heater to switch on. So the issue might be found in relation to that heater being active.

What is the exact behavior here? You switch on the coffee machine, its light goes on and the Z-Wave switch reports that it’s on. After 6 seconds, the light goes off and the Z-Wave switch reports that it’s off? That is what happens, right?

I don’t think this it’s the case, but my first idea would be that the Z-Wave switch turns off because of a current protection. Reason for this is that heating draws a lot more current than only feeding the hot plate. My machine does about 1400 Watts when heating the water, and 54 Watts when only the hot plate is on.

Do you already have access to the power readings as emitted by the Z-Wave switch? It would be interesting to see if you’re readings are along these lines, of if especially the heating power is way higher.

In the manual of the FIBARO Switch 2, I found the following passage:

"Overheat and overcurrent protection:
The Switch 2 after detecting overheat or overcurrent will:
• switch off its relay/relays,
• send information about switching off the relay/relays to the
controller,
• send Notification Report to the controller (Heat Alarm for overheat, Power Management for overcurrent). "

So it might very well be the overcurrent protection being the thing that kicks in here.

One wire from an L-terminal to the switch and the return write going to S1 on the Z-Wave switch, right?.

Sorry I missed that, but you can see the wires existing the Fibaro. You’re correct though. One from the second L terminal and one to the S1 terminal.

What is the exact behavior here? You switch on the coffee machine, its light goes on and the Z-Wave switch reports that it’s on. After 6 seconds, the light goes off and the Z-Wave switch reports that it’s off? That is what happens, right?

Yes, the Fibaro switch ‘clicks’, power comes on and the light illuminates. As I was repetitively testing, water will actually heat (you can hear the boil briefly) and exit the head in a pretty small amount. Then the 6 seconds passes, the Fibaro ‘clicks’ again and power stops.

Do you already have access to the power readings as emitted by the Z-Wave switch? It would be interesting to see if you’re readings are along these lines, of if especially the heating power is way higher.

Yes, but the time is brief. Looking back through my testing logs, it seems that it hits 1400+ W when trying to boil water and 50-80 with the boiler plate.

So it might very well be the overcurrent protection being the thing that kicks in here.
I was thinking something similar. And combing through the Fibaro manual, made sure to set all of the alarm reactions (params 41, 42, 43) to 3 - flash after receiving the alarm frame.
There doesn’t seem to be a setting for OverCurrent Protection, probably due to safety. I did not see any alarms of any type listed in my hubitat logs. There’s no particular alarm handler in the device code, but there is a generic handler for all unhandled events which should log the description of the event.

It seems the the switch 1 (fgs-212) may have no overcurrent protection and maxes out at 2500W for 240v and 1250W for 120v.
Assuming the switch 2 (fgs-213) is similar, i could very well be hitting the max @ 120v. But aren’t you using the same switch without issue?

Definitely, the same switch type on my side. And the power usage that you see during the heating phase is in line with the usage that I see on my setup, so it’s not something like an introduced short circuit somewhere, making the current spike.

But, you might be on to something there. I am on 240V here, not 120V. The peak of about 1400W is below the max for 240V, but below the max for 120V.
During heating the water, on 240V, the current would be 5.8A. On 120V, the current would be 11.6A. That 11.6A is above the 10A that is mentioned in the Switch 2 manual (it recommends a 10A breaker).

Edit:
Yes, things are clearing up. It must indeed be the difference in current that is leading. Take a look at this thread elsewhere in which the same kind of issue is discussed. I also found info about 2500 Watt max load before modding my coffee machine, but it’s really about the amperage here.

What might be interesting for you, is the Aeotec heavy duty switch that is talked about (didn’t look up how big that one is yet) or the addition of a slave relay that you switch on and off from the FIBARO switch.

I thought you might be on 240v. Well, at least we figured it out. :smiley:

That Aoetec one looks huge (big as a hand) and is 100$. I’ll look at the relay and/or just swap out the timed switch with a regular one and keep using my Jasco outlet for control.

Appreciate your help sir! :beers:

1 Like

You’re welcome. I never dislike a good puzzle :wink:
I updated the documentation of my mod to point out the overcurrent issue.

Nicely done! I like this.
I’ve done almost the same recently with my espresso EspressoWorks machine.

For anyone still reading this, the Shelly 1 appears to be a good candidate for 120V based household power.
Unfortunately it’s wifi rather than zwave, however it’s 15A rated, only ~$12 ea, and slightly smaller than the Fibaro 2 at 41 x 36 x 17 mm.

Will report back once everything is hooked up!

Thanks @ mmakaay for the excellent write-up!

1 Like