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

I got a smart coffee maker and grinder from Atomi. Luckily they use tuya internals, so I was able to add the coffee maker in the Tuya app and use the integration to pull it into home assistant. Unfortunately, now that it is in home assistant all I can do is change the settings form HA, number of cups, strength, and source (beans or grounds). Is there any way to access a switch to start the coffee maker?

I am wondering they same thing, after looking in the device information on tuya cloud development, there is a start boolean in the json for the coffee maker. Not sure how to make the integration grab the switch, but possibly we could make an API call for on/off.

Below link is a little about my experience with controlling Tuya devices locally :slight_smile:

That’s great! Thank you for the direction. I just created scenes for on and off for the time being because HA imports those with the other options, but I will be diving into this with the info you provided, as I’d like to have real power button status. Thanks again!

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 %}