Smarter Coffee / iKettle

Learned a couple of things:
Found the device on my network - by unplugging / replugging the base station to the mains and watching for changes to my routers wifi clients. It’s a 2.4Ghz client that named itself HP1860243874D2
Also realized that the MAC address is the last 12 chars of the device id as shown in the app. ie ignore the ‘3000’ part, and my MAC starts with 0c2a690e….
So now I’ve definitely identified my kettle on the lan, but I just can’t connect to it on either port 2000 or 2081 as it is refusing connections. Tried the ikettle add on, my .net app and telnet.

Starting to think this might actually be an ikettle 3, looks like that was on the market in about 2019, which could have been when I bought mine.

Smarter Kettle v3 integration almost ready
Screen Recording 2024-04-12 at 5.33.28 PM.mov [video-to-gif output image]

It’s very rough right now, and will likely fail after some amount of time running. I need to subscribe to all of the home assistant events, and polish up the extension, but the core of the integration is ready.

If anyone here has experience with HASS custom components, and wants to lend a hand, hit me up.

3 Likes

This looks so cool! Any chance to test it?

Thank you so much for offering. I will definitely make it available for you to test in the next couple days. I need to solve one issue with session refreshing first though. After the token expires a few times, I’m getting rate limited by the refresh token API. I will have to see how I can get around this.

Then I just need to package it up in a git repo, because right now it’s in a HA core dev container repo

Would love to help you hack on this if you need anything!

That could be fun. What’s your expertise? Also welcome aboard. I’m flattered that this is your first post :grin:.

I think I have the session issue figured out, so it should be stable enough (keyword “enough”) for some folks to give it a drive. I’ll make a repo tonight.

I’m curious if you all think this needs services and events.

Right now I just have sensor entities and a switch to start boiling. That should cover most cases I think

After MVP is stable I want to add some services (potentially), formula mode, alarms, etc. I’m not actually sure what alarms are for right now.

Way down the line, if someone wants to help add support for devices other than v3 kettle, that could be great.

I didn’t have enough time to really wrap up yesterday, but I’ve pushed what I have so far.

It is in two repos, because I eventually want to try to get this into the core repo, and it is the best practice.

https://www.github.com/kbirger/smarter-client

The second repo has the files for the integration on the dev branch, but I haven’t tested it in this format yet. It will happen when I have time.

update: 4/16
Odd that my devcontainer of hass-core didn’t catch this, but there’s a version discrepancy between the latest HA core version of requests (2.31.0) and the latest of the pyrebase4 client I’m using. Sad times, but it will take a few more days to produce something fully working. Looks like someone already forked the package and patched for the latest version of requests. Not sure if he intends to put up a PR or just use a private package.

@standardtoaster if you have time, it would be a great help if you could get a proper version of Pyrebase4 with the latest requests package. It doesn’t have to be on pypi (probably?), but could be consumed via github

is live and installable through hacs. This is considered an alpha version.

I’ve got the basic deployment going, but I have a lot of lint errors, due to time constraints. Next step is to tidy everything up, and then I can work on polishing the extension itself.

Looking for help:

  1. You know your way around home assistant custom components and want to polish up the packaging / ci/cd / linting process
  2. you know your way around writing HA cards and want to help provide a custom card for this component
2 Likes

Sorry, the previous error was appearing when I was adding the configuration in Ui, but it was due to nginx add on thar had to be restarted.

However, im still having issue Invalid authentication after entering username/password.

You probably have the wrong password. I’m not sure what this password is tied to, because I changed my password on smarter.am, and this password didn’t change. The pages on this site say it’s the same as you use for the “Smarter 3.0 App”. It is not a problem with the component most likely. You can verify your password by following this link:

https://smarter-live.appspot.com/signin?client_id=ifttt%40smarter&redirect_uri=https%3A%2F%2Fifttt.com%2Fchannels%2Fsmarter%2Fauthorize&response_type=code&scope=ifttt&state=x

You will likely get an error after logging in, because the state param is broken, but you will see if you have the right PW.

You can also try to reset your PW from your app.

Many thanks, and you were right, resolved by resetting password. Even though I used correct password from the app, the account was linked to another account rather than email.

How’s it working for you?

Working Great for me. Thanks for your work on this.

1 Like

Thank you very much. Just installed it and it works great! Finally I could add this one to HA.
Maybe one way further, Is the Coffee machine to be fixed this way too? Probably they work the same kind of way.

@kbirger

I cant get it to work and the problem starts before i have the possibility to add my account.

After installing it from hacs i go to set it up. And it starts with the message “Starting configurations help…” Then after 10 sec i get "The configuration feed could not be loaded {“message”:“Invalid hander specified”} "

My homeassistant is running in haos. Is there any log that i can share to solve this problem?

I’m not familiar with running on home assistant OS. You are welcome to share your home assistant logs though.

Haos is pretty much a homeassistant running as docker in a premade os…

Found this in the systemlogs!

2024-05-04 14:33:47.823 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by integration ‘config’ at homeassistant/components/config/config_entries.py, line 179: return await super()._post_impl(request, data) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1270: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at Issues · home-assistant/core · GitHub

2024-05-04 14:33:47.826 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration smarter: cannot import name ‘gaecontrib’ from ‘requests_toolbelt._compat’ (/usr/local/lib/python3.12/site-packages/requests_toolbelt/_compat.py)

Hm. So is this a containerized install? It looks like your system is missing some dependencies. These aren’t dependencies I’m using directly.

Can you try installing thoss packages?

Sure, but which dependencies?

It seems like you might be not be using the latest version of the component. This package is used by pyrebase4. I switched off of that dependency as it was not updated for the latest requests package.

The dependency I’m using in the latest version does not use requests_toolbelt