@kmclaughlin best to check the docs for latest, but when I last used it there was no way to set the temp via IFTTT
You can set the keep warm time and boil temperature in IFTTT so it’d be possible to have some type of temperature picker in Home Assistant but with IFTTT now charging a fee for using more than 3 applets it might be worth looking at other solutions.
Edit: just noticed this thread was about appkettle and not ikettle so ignore my post
Looks like something has written a python api to talk straight to the kettle…
I have no clue how to use this to create a custom component though
As it provides an MQTT interface no custom component needed.
I guess what i’m missing here is how to piece it together…
I suppose i need to run the python script somewhere and then set up the sensors / swtiches in HA using MQTT… but what i’m missing is really how to make it all work…
I know this will likely be difficult / impossible until atleast I have the appkettle in my hands (which will also realistically be after the end of the month and i’ve given it to the wife for her birthday)… but the github is obviously aimed at people who know what they are doing…
I haven’t got an appkettle, so I cannot figure out exactly what messages are passed to the MQTT broker. But when you have one we can play.
@danmed in the linked github repo the API for the kettle was reverse engineered, and this could be used to create a custom integration for the kettle. However since this is a reverse engineer job there is no official support and it could be broken at any time. A fun project for someone perhaps
It looks like https://www.myappkettle.com/ is dead. I think it’s fair game to start creating a homeassistant integration based on tinaught/appkettleapi
Has somebody connected the kettle to mqtt/Home Assistant using https://github.com/tinaught/appkettleapi and could share how to do it?
Yes there is an MQTT script, this could easily be turned into a Hassio addon. The only thing that slightly discouraged me is that you need to put the kettle on a seperate network without internet
I’m here because I want to l exactly this too…
Why is this necessary please?
Ir is explained in the github page.
Appkettle app no longer works on IFTTT. Can still see existing Applets that reference it, but can’t create new Applets that use Appkettle.
No need to have it on a seperate network if you can block the kettle’s IP on your router/firewall. I’ve got the python script running as a service on a Ubuntu box and it works a treat. I’ve only just recently got into HA so i’m in the process of slowly migrating over from Hubitat and looking at the best way to get the kettle working, i’m planning to alter the script so that the MQTT output is compatible with HA autodiscovery, i’m still a noob so it may take a while to get right!
Can you perhaps post a guide for noobs on how to do this as well as the config on the HA side
thank you
Sure. Some dependencies:
- A router/firewall which allows custom rules
- A Python 3 environment
- Paho.mqtt installed (via pip)
- An MQTT broker
Firewall
This bit I can’t help much with as the procedure will be different for each router/firewall vendor. In essense you need to determine the IP address of your kettle which should be avilable in the DHCP section of your router. You then need to create a firewall rule which blocks all IP traffic from the kettle to the internet. Doing this will force the kettle into local mode.
Running the script
Run the appkettle_mqtt.py script on the host of your choice (I use a Ubuntu VM for stuff like this) with no arguments, it will return the IMEI of your kettle, make a note of this. Then run the script again with the following arguments:
appkettle_mqtt.py --mqtt [ip_or_hostname_of_mqtt_broker] [mqtt_port_usually_1883] [mqtt_username] [mqtt_password] [kettle_ip] [IMEI]
All being well you should start to see messages appear on the terminal and also in your mqtt broker
Running as a service
Assuming the script works you can run it as a service by using the service example on the github repo above, just alter the ExecStart line to reflect the path to the script and the arguments you used in the above step. Copy the service file to /etc/systemd/system/
and run sudo systemctl enable [name of service file]
then sudo systemctl start [name of service file]
. You can check the status of the service with ‘sudo systemctl status [name of service file]’. The script will now run as a service automatically on boot.
HA
This is the config I’m using in my HA setup, you may need to adjust the fill calculation values as the kettle works out the fill level via weigh and reports only the weight via MQTT, 166 is the empty value and 1562 is the full so have a look at what your kettle reports for these and substitute the values with what you find, it will then return a % fill level:
sensor:
- platform: mqtt
name: "Kettle Temperature"
unit_of_measurement: "°C"
state_topic: "appKettle/status/temperature"
unique_id: "ak_s_001"
- platform: mqtt
name: "Kettle Setpoint"
unit_of_measurement: "°C"
state_topic: "appKettle/status/target_temp"
unique_id: "ak_s_002"
- platform: mqtt
name: "Kettle Fill Level"
state_topic: "appKettle/status/volume"
unit_of_measurement: "%"
value_template: '{{ ((value_json-166)|float/(1562/100))|round(0) }}'
unique_id: "ak_s_003"
switch:
- platform: mqtt
name: "Kettle"
state_topic: "appKettle/status/power"
command_topic: "appKettle/command/power"
unique_id: "ak_sw_001"
- platform: mqtt
name: "Kettle Keep-Warm"
state_topic: "appKettle/status/keep_warm_onoff"
command_topic: "appKettle/command/keep_warm_onoff"
payload_off: "False"
payload_on: "True"
unique_id: "ak_sw_002"
Good luck!
sorry to raise an old thread, but I was hoping to get some help.
I successfully retrieved my IMEI, but I am not managing to execute the script with mqtt details.
just to check, that the command should be run without the [ ] ?
When I run the command
python3 appkettle_mqtt.py --mqtt 192.168.1.189 1883 MQTTUser RedActed! 192.168.1.77 GD0-IMEI
I get an error
appkettle_mqtt.py: error: unrecognized arguments: 192.168.1.77 GD0-IMEI
could someone lend a hand?
Hi,
Are you still using this? If so, can you advise as to what changes you made to the script?
- I had to add auth in order to connect to my broker with username and password.
- My topics are coming through as follows stat/appKettle/temperature. Not sure where that leading stat is coming from.
- I cannot seem to work the switches. Can you confirm which topics you are using?
Many thanks for any help you can give.
Hi mate, it’s been a while since i’ve touched this so i’m a bit rusty. I ended up creating an addon which has been running fine for me for ages, i’ve made it available here if you’re interested: https://github.com/longmover/ha_addons
In answer to your question, using the addon the topic is appKettle/status, not sure where yours is getting stat from, i would suggest using the script included in the addon or using the addon itself.