Skip to content

rygwdn/ha-cosori-kettle

Repository files navigation

Home Assistant Cosori Kettle BLE Integration

Control your Cosori smart kettle from Home Assistant via Bluetooth Low Energy (direct BLE connection).

Features

  • Real-time monitoring: Temperature, setpoint, on-base status, heating state
  • Remote control: Start/stop heating, adjust target temperature (40-100°C / 104-212°F)
  • Climate entity: Native thermostat card with preset modes (Boil, Green Tea, Oolong, Coffee, MyBrew)
  • Automation-ready: Full Home Assistant integration with delay start and hold timers
  • Automatic protocol detection: Supports V0 and V1 firmware versions

Credits

Built on top of the original ESPHome implementation by @barrymichels

Hardware Compatibility

Specifications:

  • Temperature range: 40-100°C (104-212°F)
  • Delay start: 0 minutes to 12 hours
  • Hold time: 0 minutes to 60 minutes

IMPORTANT: The kettle only supports ONE BLE connection at a time. Disconnect from the official app or other devices before connecting.


Home Assistant Integration

Installation

HACS (Recommended)

  1. Open HACS in Home Assistant
  2. Go to "Integrations"
  3. Click the three dots menu in the top right
  4. Select "Custom repositories"
  5. Add this repository URL: https://github.com/rygwdn/ha-cosori-kettle
  6. Select category "Integration"
  7. Click "Add"
  8. Find "Cosori Kettle BLE" in HACS and click "Download"
  9. Restart Home Assistant
  10. Go to Settings > Devices & Services > Add Integration
  11. Search for "Cosori Kettle BLE"

Manual Installation

  1. Copy custom_components/cosori_kettle_ble to your Home Assistant custom_components folder
  2. Restart Home Assistant
  3. Go to Settings > Devices & Services > Add Integration
  4. Search for "Cosori Kettle BLE"

Configuration

The integration supports automatic Bluetooth discovery. Your kettle must be:

  • Powered on and on its base
  • Within Bluetooth range
  • NOT connected to another device (disconnect from official app first)

First-Time Pairing

To pair your kettle for the first time:

  1. Press and hold the "MyBrew" button on the kettle until it enters pairing mode
  2. The kettle will be discoverable via Bluetooth
  3. Follow the Home Assistant configuration flow to complete pairing

Capturing Registration Key from Mobile App

Expand for details

If you've already paired your kettle with the official Cosori mobile app and you would like to be able to continue using the app, you can extract the registration key by capturing Bluetooth traffic. You will need to disable the Home Assistant integration whenever you want to use the mobile app as the kettle only supports a single connection.

iOS/macOS

Use PacketLogger via Apple's Bluetooth debugging profile:

Android

Use Android's built-in Bluetooth HCI snoop log:

Extracting the Registration Key

When you open the app, it sends three consecutive packets to the kettle. Look for:

  1. First packet (exactly 20 bytes): a5 XX:XX:XX:XX:XX 0181d100 YY:YY:YY:YY:YY:YY:YY:YY:YY:YY
  2. Second packet (exactly 20 bytes): Full payload is needed
  3. Third packet (exactly 2 bytes): Final bytes needed

The registration key is formed by:

  • Taking the last 10 bytes from the first packet (after the 0181d100 command bytes)
  • Concatenating with all 20 bytes from the second packet
  • Concatenating with all 2 bytes from the third packet
  • These 32 bytes are ASCII-encoded hex characters representing the 16-byte registration key

The Home Assistant config flow includes a helper to parse these packets automatically. Simply paste the three raw packets into the config UI.


Climate Entity & Thermostat Card

The integration automatically creates a climate entity in Home Assistant, allowing you to use the native thermostat card with its semi-circle temperature slider.

Provided Entities

  • Climate entity - Off/Heat mode with temperature control and preset modes
  • Sensors - Temperature, Setpoint, On Base status, Heating status
  • Switches - Heating control
  • Number slider - Target temperature adjustment (104-212°F)

Using the Thermostat Card

The thermostat card provides:

  • Semi-circle temperature slider (40-100°C / 104-212°F)
  • Current temperature display
  • Mode control (OFF / HEAT)
  • Preset modes (Boil, Green Tea, Oolong, Coffee)
  • Action indicator (IDLE / HEATING)

How It Works

  • OFF mode: Kettle is idle, not heating
  • HEAT mode: Kettle will heat to target temperature
  • Preset modes:
    • Boil: 212°F (100°C)
    • Green Tea: 180°F (82°C)
    • Oolong: 195°F (91°C)
    • Coffee: 205°F (96°C)
    • MyBrew: Custom temperature (configurable)
  • Temperature slider: Adjust custom temperature (40-100°C / 104-212°F)
  • Current temperature: Shows actual water temperature
  • Action: Shows HEATING when actively warming, IDLE otherwise

Note: Home Assistant displays temperatures in your preferred unit (Celsius or Fahrenheit). The kettle natively uses Fahrenheit, and all conversions are handled automatically.


Protocol Information

This component implements the Cosori kettle BLE protocol. The protocol version (V0/V1) is automatically detected from the kettle's firmware version.

See PROTOCOL.md for complete details.


Troubleshooting

Kettle Not Connecting / Not Found

  1. Check for active connections: The kettle only supports ONE BLE connection at a time. Disconnect from the official app or any other integration first
  2. Check logs: Enable debug logging
  3. Restart: Power cycle the kettle and/or restart Home Assistant

Kettle Shows "Unavailable"

  • Check Bluetooth adapter status in Home Assistant
  • Verify Bluetooth adapter is online
  • Restart Home Assistant

Commands Not Working

  • Ensure kettle is on base (binary_sensor.kettle_on_base should be ON)
  • Check connection status
  • Enable debug logging to see protocol packets

Temperature Doesn't Reach Exact Setpoint

The kettle may report temperatures 1-3°F below the setpoint when holding temperature. This is normal behavior:

  • The kettle cycles heating to maintain temperature
  • Temperature readings may fluctuate between 209-212°F when set to 212°F
  • Use a threshold automation (e.g., above: 205) instead of exact temperature matching

Using Official Mobile App

To use the official Cosori mobile app (which requires exclusive BLE access):

  1. Disable the integration in Home Assistant
  2. Use the official app
  3. When done, disconnect from the app
  4. Enable the integration in Home Assistant

Development

Contributing

Contributions welcome! Please open an issue or PR on GitHub.

Python Library

A standalone Python library is included at custom_components/cosori_kettle_ble/cosori_kettle/ for controlling the kettle outside of Home Assistant.

Testing

# Run all tests
uv run pytest

# Run library tests only
uv run pytest tests/library/ -v

# Run HA component tests only
uv run pytest tests/ha_component/ -v

License

MIT License - see LICENSE file for details

Disclaimer

This is an unofficial third-party component. Use at your own risk. The author is not affiliated with Cosori.

About

Home Assistant integration for the Bluetooth Cosori Kettle

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages