My first addon, bring your AppKettle back to life

Hi all. I’ve made an addon which allows AppKettles to interface with and be controlled by HA. The company is no more and the app is no longer updated so doens’t work on newer phones. Provided it is connected to your wifi and you’re able to block it from accessing the internet they you’re good to go.

Enjoy!

2 Likes

Looks awesome. My Appkettle is one of my favourite things and I was so disappointed when the company died. Thanks so much for doing this!

Is “ha_addons” a sensible name for this? What if you want to create more addons, am I subscribing to them all?

Sorry, I’m newish to HA and not familiar with addons that aren’t already in HACS. Do I just add the url to HACS?Edit: Oh it’s an addon, I’m running HA in a docker so I can’t use this. What’s the barrier to making it an integration?

I’m spinning this up in a docker manually. Silly question perhaps but how do I pass the kettle ip and imei to it?

Hi mate, I’m glad someone has a need for this, i think you should be able to spin up in docker without too much trouble, you could also run it as a service if you like. If you run the python script without any arguments it will send a discovery frame to which the kettle should respond with its IP and IMEI, the script will then exit and you just need to run it again with those arguments. You can add your mqtt broker details using:

--mqtt [broker_ip] [port] [user] [pwd]

Once you’re getting sensor data you’ll need to find out the empty and full volume values and restart the script using

--calibrate [min] [max]

To answer your original question, the blocker to it being an integration is simply my lack of knowledge/skills to do it. The Addon is based on a standalone script which i’ve updated and wrapped in an addon. I would love to get it as an integration though.

…and re-reading your question, you should just be able to pass the ip and imei as arguments:

appkettle_mqtt.py 192.168.0.100 123123123

Hi sorry I’m noobing it up here - to run the Docker what should the variable BUILD_FROM be set to? Is that like alpine base image or something? Edit: it seems happy with “alpine”

Great add on really well done. Finally able to use my wifi kettle again.

I’ve noticed though that the kettle seems to lose connection with the addon every 12hrs or so. The kettle is still connected to wifi but is no longer detected by the add on. The only way to resolve is to turn off the kettle at the wall and turn on again.

Anyone else had this issue?

Connected succesfully to socket on host 192.168.50.32
Length does not match the received packet, ignoring msg: aa001803000000000000007a360000c800020000416402aa550000c4

I really happy that it’s working for you mate! I’ve just checked my logs and am not seeing any disconnects from my kettle. I am aware that it does occasionally spit out the message you posted but it’s not resulted in a disconnect for me. I didn’t write the original code which deals with constructing/decoding the raw data to/from the kettle so not really sure why that message occurs and what it means I’m afraid.

Just to update, i noticed the kettle was getting through to the internet despite me thinking i had blocked it. I tried another method using router parental controls and its stayed connected ever since. Once again, great work on the addon

1 Like

Ah great, glad it’s sorted for you, thanks for the update and for the thanks!

I finally got around to testing tinaught · GitHub (which worked) with the goal of integrating to HA and then realised that you’d already created this! Fantastic! Thank you @longmover !

There’s a couple of glitches that I’ve noticed:

  1. The power switch will not switch to ‘confirmed’ on status. This is because the appKettle/status/power message sent back to HA via MQTT always says ‘OFF’ - even though the kettle is on. This may be a bug in the original code that you based this off. I noticed this by looking at the MQTT messages sent.

  2. My kettle will only turn on if it is filled with approx 4 cups of water. I think this is a water-fill sensor hardware problem in the kettle. Do you have that? When turning the kettle on manually via the button it beeps to tell me that there’s not enough water. When turning the kettle on via HA mqtt switch there’s no feedback.

Even with these glitches it’s great to have back in HA, and allows me to fully use the kettle again. I’d really like to fix the water sensor issue, so that it will boil with a lesser amount of water (as it did when new) though.

Hi filcole,

Thanks for flagging the power issue, i can see what you mean, the status topic does update to reflect power on/off but the command topic doesn’t if the kettle has been manually switched on. I’ll see if i can correct that.

Regrading the fill issue, you’re right it’s the kettle doing this. You might be able to improve it by recalibrating though, have a look at this post for instructions.

Just to caveat, I am pretty sure that just resets the calibration and doesn’t reset wifi but be aware that if you do reset the wifi as well then you likley won’t ever be able to connect it again!

I think i’ve fixed the command status issue, v1.0.4 should now be available, let me know if it works for you.

I’ve just tried to install the addon and received the following error:

Failed to install add-on

The command ‘/bin/ash -o pipefail -c pip install paho.mqtt pycryptodomex’ returned a non-zero code: 1

Any ideas?

Hi, hmm, not sure on that, what platform are you running on? Also i assume it’s a typo and is /bin/bash not ash?

That’s the weird thing I’ve cut and paste the error so it is ash and not bash. As for the system I’m using a Home Assistant Green that I’ve only just received so I may have done something wrong, although other github addons seem okay.

Ah, no, it is ash, stands for ‘almostshell’. I am not sure why it’s failing though, might need someone else to weigh in there as I’m not sure how to troubleshoot this

Managed to get it working by changing:

RUN pip install paho.mqtt
pycryptodomex

To

apk add --no-cache
python3
py3-pip
py3-paho-mqtt
py3-pycryptodomex

Thanks for bringing my kettle back to life. Been missing the scheduling function so much I’ve bought a couple of coffee machines!

Fantastic, glad you got it working mate, I’ll try to investigate why this happened when i get a chance.

Cheers!

I’ve bought an Appkettle from eBay, then realised it wasn’t straightforward to get on the WiFi now the app doesn’t work (no logon / account) as the company has stopped trading.

In case it helps someone else as my Googling didn’t lead anywhere:

  • I put a WiFi card into monitor mode
  • Turned on the Appkettle and monitored traffic with tcpdump
  • Saw the kettle was looking to join a WiFi network. Took note of the SSID. This will be as set up by the previous owner.
  • Set up an open WiFi on one of my APs with that SSID
  • Fortunately the kettle joined the open WiFi. I hope it does join open WiFi by default, maybe I was lucky and the previous owner didn’t use a password.
  • Did some security so only the Appkettle Mac address could join the open network. Also blocked internet access as suggested here.
  • That was it, with an IP number and the Appkettle on the network got it into Homeassistant where its been working nicely since.
1 Like