Domoticz to control my coffee machine

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.

Moderator: leecollings

Post Reply
bntdumas
Posts: 3
Joined: Monday 06 July 2015 8:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2563
Contact:

Domoticz to control my coffee machine

Post by bntdumas »

Hello all,

I added WiFi to my coffee machine and connected it to Domoticz so I can prepare myself a coffee while I'm sitting at my desk or setup a timer to have a fresh coffee ready when I wake up :)



Adding WiFi to the machine
Image
Using an esp8266 for the WiFi connection, I connected a transistor to each button of the machine, and connected the screen back light signal to my circuit in order to get the current status of the machine (back light color changes from green to red to yellow depending on what's going on).


Image
The circuit is completely embedded in the machine and is totally invisible, it is connected to the machine power so it doesn't need any external buttons or anything. of course the machine works exactly as before, each button is still fully functional.


Programming
I use LUA (with a NodeMCU formware) on the esp8266, with a TCP client (to get commands from Domoticz) and a TCP server (to send out status at regular intervals).
On Domoticz I have four defined devices, three outputs and one input:
- Machine power
- Machine status
- Small coffee
- Large coffee

I'm using Dashticz as an alternative dashboard, and I made a custom bloc that gather information from these 4 devices into one, resulting in a nice looking and easy to use interface for my WiFi coffee machine:
Image

Some links
Source code is here https://github.com/Bntdumas/DomoticzCoffeeMachine
My Dashticz fork is here: https://github.com/Bntdumas/Dashticz (I made some bug fixing in the original code and started adding a French translation for it, will do a pull request once it's a bit more polished)
Detailled project log is here: http://www.bntdumas.com/2015/07/15/how- ... e-part-1//
Imgur album: https://imgur.com/a/NZQ1L
It was a very fun project to work on, I'd love to hear your thoughts on it!
Benoit
Last edited by bntdumas on Wednesday 15 July 2015 22:17, edited 2 times in total.
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Domoticz to control my coffee machine

Post by Thomasdc »

great project! hanks for sharing!
jjnj

Re: Domoticz to control my coffee machine

Post by jjnj »

Awesome, will try to work it out soon! Thank you very much for sharing
User avatar
kivster
Posts: 6
Joined: Thursday 08 January 2015 21:59
Target OS: Linux
Domoticz version: beta
Location: United Kingdom
Contact:

Re: Domoticz to control my coffee machine

Post by kivster »

You Sir, are my hero!

Great job! I'm going to have to try and replicate this!
Raspberry Pi + Domoticz + Aeon Labs Z-Wave USB
1x Aeon multi-sensor, 1x Popp dimmer, 1x Fibaro dimmer, HRT4-ZW thermostat/ASR-ZW receiver, home-made oil tank monitor - http://www.domoticz.com/forum/viewtopic.php?f=38&t=7275
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Domoticz to control my coffee machine

Post by jannl »

A question. When I start my coffee machine it starts first cleaning. After that i have to put an empty cup. How did you deal with this?
bntdumas
Posts: 3
Joined: Monday 06 July 2015 8:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2563
Contact:

Re: Domoticz to control my coffee machine

Post by bntdumas »

I had the same issue, the machine rinses both when turned on and off.
However, the process can be stopped, during the rinsing cycle a stop button appears, which prevents any water from dripping.
Because there's no way for me to read the screen and look for the "stop" being displayed, I (programmatically) click on the button until the screen turns green. It worked great so far.
Because the rinse function is still useful, I turn on the machine during the night and let it turn itself off automatically (that's two rinse cycles).
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Domoticz to control my coffee machine

Post by jannl »

But then you can't wake up with fresh coffee.
But still a very neath idea.
bntdumas
Posts: 3
Joined: Monday 06 July 2015 8:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2563
Contact:

Re: Domoticz to control my coffee machine

Post by bntdumas »

jan_nl wrote:But then you can't wake up with fresh coffee.
But still a very neath idea.
Oh but I can :)

Check the function "tryStopRinse" in my lua code: https://github.com/Bntdumas/DomoticzCof ... achine.lua

Code: Select all

-- Try to interrupt the rinsing cycle
function coffeeMachine.tryStopRinse()
    print("tryStopRinse")
    -- after one minute, stop clicking, there's something wrong...
    tmr.alarm(1, 40000, 0, function()
        tmr.stop(2)
    end)
    tmr.alarm(2, 1500, 1, function()
        -- every 1.5s, try pushing the button stop if the screen
        -- color is still yellow
        if coffeeMachine.colorStr() == "yellow" then
            coffeeMachine.pushButton(pinTopLeftButton)
        elseif coffeeMachine.colorStr() == "green" or
                coffeeMachine.colorStr() == "red" then
            tmr.stop(2)
        end
    end)
end
I automatically stop the rinsing cycle before any water starts dripping.
Raspberry Piet
Posts: 158
Joined: Saturday 11 January 2014 16:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: NL
Contact:

Re: Domoticz to control my coffee machine

Post by Raspberry Piet »

Just want to say this is very awesome!!!
dieseljohn
Posts: 3
Joined: Friday 17 July 2015 8:11
Target OS: Windows
Domoticz version:
Contact:

Re: Domoticz to control my coffee machine

Post by dieseljohn »

Wow nice video its simply great for preparing coffee.
User avatar
bewo
Posts: 74
Joined: Monday 13 July 2015 12:27
Target OS: Linux
Domoticz version: 2021.1
Location: Bavaria - Germany
Contact:

Simple Electronic Question

Post by bewo »

Great project bntdumas! :D
Last edited by bewo on Monday 16 November 2015 20:37, edited 1 time in total.
Individual projects:
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
u01pei

Re: Domoticz to control my coffee machine

Post by u01pei »

Nice!
Parts are on order as we speak!

Thanks!
dynasticorpheus
Posts: 115
Joined: Monday 12 October 2015 15:26
Target OS: Linux
Domoticz version: 2.3295
Location: NL
Contact:

Re: Domoticz to control my coffee machine

Post by dynasticorpheus »

This is so COOL, great job!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests