Custom Component: Smarter Kettle and Coffee

I’d like to make sure I understand. When you say “your options”, are you referring to the entities which I have affected to the alpha, or the script I added to debug?

It is possible that changing the settings has no effect until you hit brew, but that would be inconsistent with how the kettle operates.

Yes Entities
And yes I have tried all whilst brewing - but no different

Sorry forgot to mention - but guess you are possibly aware (maybe translation file)?
But the kettle is messed up in ver 4.0 dev 0 boil is always on and temperature and water level are unknown

Yes, please use the latest dev build

I am using v0.4.0-dev.0 - cant see anything later

Sorry, it should show up now.

Observations so far…
in app slider for ‘Keep warm for’ goes from 0 to 40 mins
in app selector for Strength options: Weak Medium Strong
in app selector for Brew Type options: Filter Bean
in app selector for ‘Preheat’ goes from 0 to 5 mins

I set it to: 40m keep warm
strength: Weak
Brew Type: Filter
Preheat: 1Min
when you press Start it goes through ‘Preheating’ counting down from 59s
when complete goes to ‘Brewing’
when set to number of Cups (1 to 12) only 4 to 12 show on LCD display in app you can set it to (2 to 12)
and using your slider can be set (1 to 12)
brewing time comes up as follows for specific cup selection (trickle of hot water)
1 cup 2m
2 cups 3m
3 cups 4m
4 cups 5m
5 cups 5m
6 cups 6m
7 cups 7m
8 cups 7m
9 cups 8m
10 cups 9m
11 cups 10m
12 cups 11m

it then once complete shows ‘Keeping warm’ for time selected in slider above 0 to 40m
water gauge on side shows you can fill it from 250ml to 1500ml

Still no change in your list of sensors apart from ‘carafe present’ using latest dev 1 version

Switches in both kettle and coffee still showing as being ON

Hope this helps a bit more

This helps, but I still need the output from the device_debug script, so that I know what values represent things like “weak” “medium” and “strong”

I don’t really understand running ssh scripts but will see if I can do it.

In the meantime I have noticed this, when you use your ‘coffee strength’ slider, setting it to 20 shows ‘Weak’ on the LCD display, setting to 50 shows Medium and setting it to 80 shows strong. I believe that is what those numbers represent in what you said were arrays where its listed 12 times, also the 12 lines I think are the cup numbers that go from 1 to 12.

I could be wrong but its a thought and a coincident that they match

If you have python on your desktop, you can run it from your desktop.

If you know how to SSH, and you are running HA directly on that machine (no containers), then you just SSH in, and run the commands exactly as I mentioned in my first post.

Hi, just found this topic and went and blew the dust off my Coffee 2.0 to see if it still works - and yes, I can still talk to it from the phone app!
So I’d be happy to help with any testing or tracing - my background is mainly Windows software dev, but over the years I’ve done my share of analysing comms protocols in the industrial world on other hardware too.
I can well appreciate that getting things working from python code first is the logical first step, before going too far with the HA end.
Got a python instance ready to go on my dev PC - where should I start if I can help?

Hi @Willowmart!

Happy to hear it’s working, at least somewhat. Fortunately, no need to analyze anything complex anymore. It’s just a firebase API.

The only thing that needs to be decoded is which commands do what, and what data points mean.

You can help by running the debug script and analyzing which actions on your device, as well as actions on the native app invoke which commands.

That’s the debug_device script.

The discovery script will just give you a raw output of your devices, as well as all of their supported commands. It’s similar to the first message sent by the device when you run the debug script

This is fantastic! I have a Smarter Kettle 3 and a Smarter Coffee V2. I’ve tried v0.4.0-dev.5 and dev.4, but both give errors. Dev.3 installed without any issues, but a few minor things seem to be broken. Anyway, I’ll keep following the development. Let me know if there’s anything I can do to help. Thanks again for the great work!

Hi @BorisTS thanks. I’m glad you’re enjoying so far. If you want to help, you can check the thread for instructions on running the device_debug script.

If you understand how to read json, you can try to correlate the messages you see with the functions performed. I don’t have a coffee machine, so I rely on users to provide info.

When you encounter errors, please tell me what the errors are.

1 Like

I’m not familiar with all that stuff json, ssh but I’ll try your different versions and report the errors that I see.

You can check out the latest version. @Tynmar says it’s working well

Hi @kbirger - thanks so much for this, I’ve been hoping for something like this for a long time. I’m a Coffee 2nd Gen user.

I’ve run the debug script with just about every app permutation, and tried to annotate with comments as best I can. Please see the gist here Smarter Coffee debug data · GitHub

I’ll try to remember to start the debugger recording when I brew coffee in the morning, but wanted to get you the first set of data as soon as possible.

@wjs thanks for this. I have fairly positive feedback from one user for the latest dev build, so feel free to give it a shot.

Are the default settings something that would be useful for you in a HA integration or no?

Regarding

imp_updated": {
        "ts": 1733394920 // Not sure what this timestamp relates to
      },

They use a technology called Electric Imp (Google it). It’s an agent based model.your kettle has a chip called an imp. It phones home and connects to the “mother ship”. Then it can receive commands. That way they don’t open any ports for inbound connections.

I tried to reverse this at first, but I couldn’t figure out how to determine my device’s ID… Since only the device knows this and reports it to the main server.

Can confirm that the latest dev build controls the main settings on the device & allowed me to trigger coffee this morning!

Interesting about Electric Imp - not something I’d come across before!

On your question about default settings - obviously just my perspective, but I don’t think I’d need them in the HA integration (I’m not entirely sure what the point of them, vs just updating the values directly is).

I logged what was going on while my coffee brewed this morning - and almost all of it was represented in what you’ve pulled out for the component so far - thanks!

{"path": "/commands/start_brew/-OGxNPoTIiOum7M7GjxD", "data": {"user_id": "ESdCPH1XeZfZaro4XZv5UXwFhyX2", "value": true}, "event": "put"}
{"path": "/status", "data": {"state": "Opening Doors for Grinding"}, "event": "patch"}
{"path": "/status", "data": {"state": "Grinding"}, "event": "patch"}{"path": "/status", "data": {"state": "Preheating"}, "event": "patch"}
{"path": "/status", "data": {"brewing_started": {"cups": 5, "ts": 1737270423}}, "event": "patch"}
{"path": "/status", "data": {"state": "Brewing"}, "event": "patch"}{"path": "/status", "data": {"water_level": 6}, "event": "patch"}
{"path": "/status", "data": {"state": "Dripping"}, "event": "patch"}
{"path": "/status", "data": {"brewed_keeping_warm": {"cups": 5, "ts": 1737270713}}, "event": "patch"}
{"path": "/status", "data": {"keep_warm_time_remaining": 40}, "event": "patch"}
{"path": "/status", "data": {"state": "Keeping Warm"}, "event": "patch"}
{"path": "/status", "data": {"keep_warm_time_remaining": 39}, "event": "patch"}
{"path": "/status", "data": {"keep_warm_time_remaining": 38}, "event": "patch"}

I’ve annotated the exposed sensors with my experience from this brew in case that’s useful:

Otherwise I agree with the previous feedback you got, this is very nearly perfect!

Awesome! I’m glad to hear it. I didn’t really bother pulling the events in to the kettle or the coffee. That is, an event when brewing or keep warm starts. is that something that is useful to you?

Are there any features that you would like that are missing?

I am currently away for the weekend, so can’t check the code, but are those unavailable sensors new? Or were they from an older build and no longer being provided?