8000 GitHub - xenofex7/ha-kruger-secomat: Home Assistant integration for Krüger Secomat dehumidifiers via the Krüger Cloud · GitHub
[go: up one dir, main page]

Skip to content

About

Home Assistant integration for Krüger Secomat dehumidifiers via the Krüger Cloud

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Krüger secomat - Home Assistant Integration

Krüger secomat

latest tag license Marketplace Home Assistant last commit commit activity

Home Assistant custom integration for the Krüger secomat WiFi dehumidifier. Exposes sensors, switches, a moisture-target select and a manual-start button via the Krüger Cloud API. Cloud-polled at 60-second intervals, no local device communication required (the device has no open ports).

Disclaimer: This is an independent community project by @xenofex7. It is not affiliated with, supported or endorsed by Krüger. It uses the undocumented cloud API of the official app, which can change at any time without notice and break this integration.

Features

Controls

  • Laundry Drying switch (auto mode)
  • Room Drying switch
  • Start Manual Drying button (immediate start)
  • secomat.start_drying service with optional delay_seconds (0-86400, scheduled start for automations)
  • Target Moisture select (very_dry / dry / medium / moist)
  • Moisture Lock switch (configuration; the app's lock next to "For all drying processes", does not block moisture changes)
  • Display Backlight switch (configuration; the app's "Control light on the device")

Sensors

  • Temperature, Humidity
  • State (ready / drying / finished / aborted / error)
  • Operating Mode (standby / no_program / laundry_program)
  • Target Moisture (current setting, also exposed for automations)
  • Next Start (timestamp of scheduled start)
  • Error Count with active error list (diagnostic)
  • Firmware (diagnostic)
  • Device Tick (diagnostic, disabled by default)

Binary sensors

  • Eye Detects Object (proximity / laundry detection)
  • Display Backlight (diagnostic)
  • Problem (on when an error is active, diagnostic)

Requirements

  • Home Assistant 2024.x or newer
  • Krüger secomat WiFi dehumidifier
  • Claim token of the device, read via Bluetooth or from the app traffic (see Obtaining the claim token)
  • Marketplace (built into Home Assistant 2026.11+) or HACS on older versions (recommended for installation and updates)

Installation

Open your Home Assistant instance and open this repository in the Marketplace.

Marketplace (Home Assistant 2026.11 and newer, recommended)

  1. Settings → Marketplace
  2. Search for "Krüger secomat" and install it
  3. No restart needed, continue with Configuration

HACS (Home Assistant 2026.10 and older)

  1. Open HACS in Home Assistant
  2. Search for "Krüger secomat" and download it
  3. Restart Home Assistant

Manual

  1. Copy custom_components/secomat/ to your HA custom_components/ directory
  2. Restart Home Assistant

After installation, see Configuration to add the integration.

Updating

  • Marketplace: install the update Home Assistant offers, then restart (a repair offers the restart button)
  • HACS: open HACS, update the integration, restart Home Assistant
  • Manual: replace the custom_components/secomat/ directory with the new version and restart

Configuration

Add the integration

Open your Home Assistant instance and start setting up the integration.

  1. Settings → Devices & Services → Add Integration
  2. Search for "Krüger secomat"
  3. Enter your claim token (see below)

To replace the claim token later, add the integration again with the new token. The existing entry is updated and reloaded; entities and their settings stay.

Obtaining the claim token

The secomat device has no open ports, so the integration talks to the Krüger Cloud API on your behalf. Authentication uses a claim-token header that the official mobile app sends with every request. The token is stored on the device and can be read via Bluetooth, the same way the app does it during setup.

Via Bluetooth (recommended)

You need a computer with Bluetooth and Python 3 next to the secomat.

  1. Download the script and install its only dependency:
    curl -O https://raw.githubusercontent.com/xenofex7/ha-kruger-secomat/main/read_token.py
    pip install bleak
  2. Press the WLAN button on the secomat briefly. It then lights up permanently and the device becomes visible via Bluetooth as SECOMAT-<serial number>.
  3. Run the script next to the device. It prints the claim token:
    python3 read_token.py

On macOS, allow your terminal app to use Bluetooth when asked. Pairing mode ends on its own after a while; the cloud connection keeps working throughout.

Via mitmproxy

If Bluetooth does not work, intercept the token from the app traffic instead:

  1. Install mitmproxy on a computer in your local network:
    sudo apt install mitmproxy
  2. Start mitmproxy with increased file limits:
    sudo bash -c 'ulimit -n 65536 && mitmdump --listen-port 8888 --ssl-insecure'
  3. On your phone, set a manual HTTP proxy: server = your computer's IP, port = 8888 (WiFi settings → Proxy → Manual).
  4. Open http://mitm.it on the phone and install the mitmproxy CA certificate. On iOS: Settings → General → About → Certificate Trust Settings → enable mitmproxy.
  5. Open the secomat app and interact with it for a few seconds.
  6. In the mitmdump log, find requests to seco.krueger.ch:8080. The claim-token header value is your token.
  7. Disable the manual proxy on the phone.

Treat the token like a password: it grants full control over your device. Home Assistant stores it unencrypted in its config storage (.storage/core.config_entries), so keep backups of your configuration private.

Usage

The secomat.start_drying service starts manual laundry drying, optionally with a delay. It targets the "Start Manual Drying" button entity; replace the entity ID in the example with the one Home Assistant shows for that button:

action: secomat.start_drying
target:
  entity_id: button.secomat_43_16554_start_manual_drying
data:
  delay_seconds: 3600

delay_seconds accepts 0 to 86400 (24 hours). Omit it or use 0 to start immediately. A pending start shows up in the Next Start sensor. On Home Assistant before 2024.8, write service: instead of action:.

How it works

flowchart LR
  HA["Home Assistant<br/>(this integration)"]
  Cloud["Krüger Cloud<br/>seco.krueger.ch:8080"]
  Device["secomat<br/>(WiFi, no open ports)"]

  HA -->|"GET state every 60s"| Cloud
  HA -->|"POST commands"| Cloud
  Cloud <-->|"manufacturer protocol"| Device
Loading

The device has no open ports and no documented local API. The official secomat app talks to a cloud endpoint at seco.krueger.ch:8080; this integration replays the same HTTP requests. Authentication is a static claim-token header that you extract once from the app (see Obtaining the claim token).

State is polled every 60 seconds. Each command must be answered with {"status": "OK"}, otherwise the action fails with an error in Home Assistant; after a successful command the state is refreshed immediately. See docs/API.md for the full command list and field reference.

Development

git clone https://github.com/xenofex7/ha-kruger-secomat.git
cd ha-kruger-secomat
python3 -m venv .venv
source .venv/bin/activate
pip install aiohttp

test.py is a standalone API client for hitting the cloud without Home Assistant - useful for reverse-engineering and verifying commands on a real device.

# Token from .env (SECOMAT_TOKEN=...) or first argument
python3 test.py                  # current state
python3 test.py -i               # interactive command tester
python3 test.py --new-commands   # guided verification of PR #1 commands

watch.py polls the state every 2 seconds and prints only the fields that changed - handy for mapping state codes while you press buttons in the app.

SECOMAT_TOKEN=... python3 watch.py

Credits

  • @alexef reverse-engineered the PRG_WASH_MANUAL_ON command and contributed the initial button and select platforms (PR #1).
  • @ratsch reverse-engineered the PARAMETER_CHANGE command for moisture target and lock, and the PRG_WASH_MANUAL_OFF cancel command.
  • @gmb2012 found the hmi_backlight command for the display backlight and the Bluetooth characteristic that holds the claim token.
  • @KMaen explained the secomat_state phases and recommended a polling interval of at least 60 seconds (issue #2).

License

MIT.

About

Home Assistant integration for Krüger Secomat dehumidifiers via the Krüger Cloud

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0