Help with Tuya Coffee Maker- Able to set options but not start

Another one of the Tuya devices I have been playing around with for local control is a Sunbeam electric heating pad. The control is still not as solid as I would want it do be, but maybe possible. I have an external python app from HA that using MQTT to communicate with HA for status and command to the blanket. I have HA controlling it and some of its functions and status exposed to Google Assistant. So as part of Google ‘Good Night’ routine it pre-heats the bed and announces on the Google Homes to the significant other :
‘Your Majesty, the Royal Mattress is preheated and ready for your Royal derriere.’

Hopefully you can find something that works on the morning side for coffee! :wink: Good hunting!

Anyone ever figure anything out with this coffee maker?

I am looking for a new one and if this could be started from HA it looks like it could be a home run assuming the coffee is decent.

So I have a Korex brand coffee maker which is essentially a Tuya device which I did get working with Tuya Local and can turn it on/off.

That sounds encouraging. I am very tempted to take the plunge but would like to know if I can start it in the morning with an automation.

@Anemoi you should be able to. I don’t have an automation setup to auto-start it in the morning, however I setup an actionable notification that I get when the coffee maker turns off that allows me to turn it back on from the notification when I know there is still coffee left in the pot.

1 Like

Hey guys, tuya integration + local tuya gives you all the options you could want.

The auto brew is a helper I created, and have an automation grab the time I set and start it.

Time left is a template I created based on how how long it takes to grind and brew 2 cups multiplied by whatever the water level is, when the status changes to brewing I have a countdown progress bar appear with the correct value.

Power, warming time, carafe, water level, status are available from local tuya. Ground/bean and strength are available from the cloud integration.

This is one of the most reliable tuya devices I have in regards to connection and just always works.

EDIT: oh and the coffee is great, I love how it grinds the correct amount of beans based on the water level. Their support is amazing, the clock ran fast on mine and after troubleshooting didn’t fix it, they sent me a new one, no questions asked. So now I have home assistant handle the schedule, and a brand new one in a box for when this one gives out completely :grin:

1 Like

Thank you so much for this reply this is all the assurance I need to pull the trigger on this and finally ditch the $20 Mr Coffee.

Being able to automate the making of coffee has been on my “holy grain” list for awhile because it’s something that is done everyday.

Thank you again, I may follow up with questions at some point if that’s alright.

No problem, the model I have is the Atomi Smart Coffee Maker with Grinder, the one thing about it that I hate is the capacitive buttons. So much so that if I’m standing in front of it, I’ll ask Google to start it for me if I’m not in home assistant.

The last thing I plan to do is set an automation that checks how many cups were brewed, and turn it off after 30min for 2 cups, 1hr for 4 cups and so on. This way you avoid burnt coffee :coffee::+1:

Once you get something like this, it’s an addiction :joy:. Just had a baby, and found out they make smart bottle makers, wife thought I was crazy, but has become both of our favorite smart device in the house.



Hi @rfam13 , I’ve just bougth the same device, already configured on IoT tuya, but can you help me providing instruccions for add my device sensors and switchs/selectios on card like you?


There is some information on debug option on IoT, but how can add it? thanks!

Hi, on Iot Tuya (API Explorer → Device Control → Get Device Specification Attribute) i found more detailed information about de data points DP for this machine:

  "result": {
    "category": "kfj",
    "functions": [
      {
        "code": "concentration_set",
        "dp_id": 4,
        "type": "Enum",
        "values": "{\"range\":[\"concentration1\",\"concentration2\",\"concentration3\"]}"
      },
      {
        "code": "material",
        "dp_id": 3,
        "type": "Enum",
        "values": "{\"range\":[\"material1\",\"material2\"]}"
      },
      {
        "code": "cup_number",
        "dp_id": 103,
        "type": "Enum",
        "values": "{\"range\":[\"2\",\"4\",\"6\",\"8\",\"10\",\"12\"]}"
      },
      {
        "code": "start",
        "dp_id": 1,
        "type": "Boolean",
        "values": "{}"
      }
    ],
    "status": [
      {
        "code": "work_state",
        "dp_id": 2,
        "type": "Enum",
        "values": "{\"range\":[\"status1\",\"status2\",\"status3\",\"status4\",\"status5\"]}"
      },
      {
        "code": "material",
        "dp_id": 3,
        "type": "Enum",
        "values": "{\"range\":[\"material1\",\"material2\"]}"
      },
      {
        "code": "countdown_left",
        "dp_id": 104,
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":1440,\"scale\":0,\"step\":1}"
      },
      {
        "code": "cup_number",
        "dp_id": 103,
        "type": "Enum",
        "values": "{\"range\":[\"2\",\"4\",\"6\",\"8\",\"10\",\"12\"]}"
      },
      {
        "code": "start",
        "dp_id": 1,
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "concentration_set",
        "dp_id": 4,
        "type": "Enum",
        "values": "{\"range\":[\"concentration1\",\"concentration2\",\"concentration3\"]}"
      }
    ]
  }

But some DPs are in both sections, so i’m not sure how to create:

For example, “dp_id”: 1, is a binary sensor? or switch? Besides there are some DPs that are not present on localtuya (red ones)

Thanks!

1 is the power switch so you can define as switch to control it. Everything else I’ve found is a sensor

I use the cloud integration for material and concentration since I was unable to figure out how to control it from local tuya.

Edit: should be warming time left minutes*

Hi @rfam13 , thnaks for yor tips! for my side a found that using Select in localtuya, concentration can be set:

image

Main view:

Selection view:
image

My reference informacion until now:

1 Like

Looks awesome

Looks like it take alittle bit of figuring to get all the functions showing up in HA but once you do this does everything.

I am planning to pair it with a bed sensor so once I get out of bed the coffee starts up.

Currently don’t have kids but some close family members have harped the importance of scheduled feedings and automating that seems like a no brainer if possible. Its very exciting to see a company tackling some of these small home appliances since many of them are repetitively used in a way that lends its self to automating.

How did you change status to say Idle? Mine says status1,status2, etc.

What model is this coffee maker? I’d love to try find one here in NZ, but regional support for things here is atrocious.

Hopefully better late than never! You can use templates. Here is mine, by no means is this the best way to code this, but it works for me haha

- sensor:
    - name: "Coffee Maker Warming Time"
      unique_id: coffee_maker_warming_time
      state: >
        {% set ct = states('sensor.104') | int %}
        #formats the time left into 1hr 30 or just 30min for example
        {% if ct > 60 %}{{ ct // 60 }} hr {{ '{:0>2d}'.format(ct%60) }} min{% else %}{{ct}} min{% endif %}


- sensor:
    - name: "Coffee Maker Status"
      unique_id: coffe_maker_status_friendly
      state: >
        {% if is_state('sensor.2', 'status1') %}
          Idle
        {% elif is_state('sensor.2', 'status2') %}
          Brewing
        {% elif is_state('sensor.2', 'status3') %}
          Warming
        {% else %}
          Error
        {% endif %}
- sensor:
    - name: "Coffee Maker Carafe"
      unique_id: coffe_maker_carafe_friendly
      state: >
        {% if is_state('sensor.101', '0') %}
          On Base
        {% elif is_state('sensor.101', '2') %}
          Off Base
        {% else %}
          Error
        {% endif %}
      icon: >
        {% if is_state("sensor.101", "0") %}
          mdi:coffee-outline
        {% elif is_state('sensor.101', '2') %}
          mdi:coffee-off-outline
        {% else %}
         mdi:alert-remove-outline
        {% endif %}

    
- sensor:
    - name: "Coffee Maker Time Left"
      unique_id: coffe_maker_time_left_friendly
      state: >
        # this is about as close as I can get to an accurate time left of brewing, definitely not exact, I really just wanted this so I could add the reverse progress bar as a countdown you can see in the screenshot above.
        {% set cups = states('sensor.102') | int %}
        {% if cups > 0 %}{% set seconds = ((cups * 75)) %}
        {{ seconds }}
        {% else %}
        0
        {% endif %}

I haven’t gotten to use this yet but this looks great. Thank you!

I truly hate the buttons on it (you’ve been warned) but if you’re like me, you’ll want to do it from home assistant anyway.

However I can’t say enough good things about their customer service. The time on mine runs fast, I contacted them, they asked me to reset it, started doing it again after a week. They shipped me out a new one no questions asked. So I have 2 now, one with a funny clock.

It looked like a good option, and Amazon listed it as “ships to NZ”… for almost half the price of the unit in shipping.
Ouch.

image

Hello All,

This is very close to the beginning of my HA journey so be gentle.

Largely based on this thread I’ve purchased an Atomi AT1489 coffee maker with grinder.

Boy… I’ll admit it’s kind of a mess. Little did I appreciate how dependent these systems are on the cloud based Tuya ecosystem. I saw somewhere that there may be an ESP inside it, but I don’t have time to reflash anything right now… soooooo… I learned about HACS… I set up my GitHub account and got my token, I got the custom repository for Local-Tuya and Tuya Local… blah blah… I signed up for the Tuya developer account. I signed in to the Tuya smart app on my phone. I linked those accounts, I set up the coffee maker in that account…

Mind you… the whole point of HA, in my mind is to avoid the broad dissemination of all the details of my life to random cloud platforms… rolls eyes

So I get all of this done and integrate my developer account in to Local-Tuya… I find my device… and there’s no understanding of it whatsoever. It wants to present as a switch or a heater or some simple thing… so now I’m looking at @rfam13 and thinking there must be a yaml file that I’m missing here. I have no idea what syntax I should be using or what all the values are, but through a bunch of debugging and poking around this is what I’ve come up with as far as querying the device properties in the grudgingly created dev account:

{
  "result": {
    "properties": [
      {
        "code": "switch_coffee",
        "custom_name": "",
        "dp_id": 1,
        "time": 1689838679774,
        "value": false
      },
      {
        "code": "status",
        "custom_name": "",
        "dp_id": 2,
        "time": 1689838679374,
        "value": "status1"
      },
      {
        "code": "material",
        "custom_name": "",
        "dp_id": 3,
        "time": 1689838679374,
        "value": "material1"
      },
      {
        "code": "concentration",
        "custom_name": "",
        "dp_id": 4,
        "time": 1689838679374,
        "value": "concentration2"
      },
      {
        "code": "time_coffee",
        "custom_name": "",
        "dp_id": 5,
        "time": 1689845195867,
        "value": "AQAA"
      },
      {
        "code": "time_umber_coffee",
        "custom_name": "",
        "dp_id": 6,
        "time": 1689845281334,
        "value": 1172
      },
      {
        "code": "fault",
        "custom_name": "",
        "dp_id": 101,
        "time": 1689838679774,
        "value": 0
      },
      {
        "code": "remind",
        "custom_name": "",
        "dp_id": 102,
        "time": 1689838679774,
        "value": "10"
      },
      {
        "code": "cup_number",
        "custom_name": "",
        "dp_id": 103,
        "time": 1689832446511,
        "value": "2"
      },
      {
        "code": "countdown_left",
        "custom_name": "",
        "dp_id": 104,
        "time": 1689838679774,
        "value": 0
      },
      {
        "code": "lack_water",
        "custom_name": "",
        "dp_id": 105,
        "time": 1689838679774,
        "value": false
      }
    ]
  },
  "success": true,
  "t": 1689845293267,
  "tid": "bfc7643226df11ee804ade073cb82c5d"
}

In going through log files I got the following friendly names:

Product Category
kfj


"1" = "Power"

"2" = "Status" = Standby Mode,Brewing

"3" = "Brew Type" = Coffee Beans,Ground Coffee

"4" = "Brew Strength" = Mild,Medium,Strong

"5" = "Schedule" = AQAA

"6" = "Remaining time of appointment (coffee machine)" = 4 digit + m

"101" = "Carafe" = Boolean 0

"102" = "Water Level" = int 1-10

"103" = "Cups" = unknown

"104" = "Countdown" int + min (minutes)

"105" = "Not enough water" = boolean

Has someone already done this work or am I forging new territory?