Skip to main content

Kohler DTV+ Python API module

Project description

kohler

CI PyPI version Python versions License

Python library for controlling Kohler DTV+ shower systems over your local network.

Features

  • 🚿 Full shower control (start, stop, quick shower with valve configuration)
  • 💡 Light module control with adjustable intensity
  • 🎵 Music playback with volume control
  • 🌧️ Chromatherapy rain effects (color or experience modes)
  • ♨️ Steam control with temperature and duration
  • 👤 User session management
  • 🔧 System info, firmware updates, error logs, and factory reset
  • 📤 Firmware upload via multipart POST
  • ✅ Fully typed with inline type hints (PEP 561)

Installation

pip install kohler

From source (development):

git clone https://github.com/niemyjski/kohler-python.git
cd kohler-python
pip install -e ".[dev]"

Quick Start

import asyncio
from kohler import Kohler

async def main():
    kohler = Kohler(kohler_host="192.168.1.50")
    
    # Shower control
    await kohler.quick_shower()
    await kohler.stop_shower()

    # Lights
    await kohler.light_on(module=1, intensity=75)
    await kohler.light_off(module=1)
    
    # Music
    await kohler.music_on(volume=80)
    await kohler.music_off()

    # Steam
    await kohler.steam_on(temp=110, time=10)
    await kohler.steam_off()

    # Chromatherapy rain
    await kohler.rain_on(color=120)
    await kohler.rain_off()

asyncio.run(main())

API Reference

Initialization

Method Description
Kohler(kohler_host, timeout=1.0) Create an asynchronous client. kohler_host is the IP or hostname of the DTV+ device.

Shower Control

Method Description
quick_shower(valve_num, valve1_outlet, valve1_massage, valve1_temp, valve2_outlet, valve2_massage, valve2_temp) Start a quick shower with valve configuration. All params have sensible defaults.
stop_shower() Stop the shower.
start_user(user=1) Start a user session.
stop_user() Stop the current user session.
swap_valves() Swap valve 1 and valve 2 configurations.

Lighting

Method Description
light_on(module=1, intensity=100) Turn on a light module (intensity: 0–100).
light_off(module) Turn off a light module.
light_module(module=2, intensity=100) Control a light module.

Music

Method Description
music_on(volume=100) Turn on music (volume: 0–100).
music_off(volume=100) Turn off music.

Steam & Rain

Method Description
steam_on(temp=110, time=10) Turn on steam (temp in °F, time in minutes).
steam_off() Turn off steam.
rain_on(*, color=None, effect=None) Turn on rain — provide color (mode 1) or effect (mode 2), not both.
rain_off() Turn off rain effect.

System & Configuration

Method Description
system_info() Get system information.
check_updates() Check for firmware updates.
values() Get current device values.
languages() Get available languages.
ftp_status() Get FTP status.
id_interface(index) Get interface identification.
set_device(value) Set device configuration.
save_variable(index, value, **kwargs) Save a variable.
save_dt() Save DT configuration.
save_ui(index) Save UI configuration.
save_default() Save current settings as default.
massage_toggle() Get massage toggle status.
powerclean_check() Check PowerClean status.
remove_module(module) Remove a module.
reset_default() Reset to default settings.
reset_factory() Reset to factory settings.
reset_users() Reset all user settings.
bt_disconnect() Disconnect Bluetooth.
upload_firmware(file_path, timeout=None) Upload firmware file (multipart POST).

Diagnostics

Method Description
controller_error_logs() Get controller error logs.
konnect_error_logs() Get Konnect error logs.
reset_controller_faults() Clear controller error logs.
reset_konnect_faults() Clear Konnect error logs.

Error Handling

The library raises KohlerError when communication with the device fails unexpectedly:

import asyncio
from kohler import Kohler, KohlerError

async def main():
    kohler = Kohler(kohler_host="192.168.1.50")

    try:
        await kohler.system_info()
    except KohlerError as e:
        print(f"Device communication error: {e}")

asyncio.run(main())

Contributing

# Clone and install dev dependencies
git clone https://github.com/niemyjski/kohler-python.git
cd kohler-python
pip install -e ".[dev]"

# Run checks
ruff check .          # Lint
ruff format --check . # Format check
mypy kohler/          # Type check
pytest -v             # Tests

Disclaimer

USE AT YOUR OWN RISK. This library interacts with a physical water, steam, and electrical device (Kohler DTV+). The authors and contributors of this library are NOT affiliated with Kohler Co. and are NOT responsible for any damage, leaks, burns, flooding, or hardware failures that may occur from the use of this software. You are solely responsible for setting safe maximum temperatures and using this integration safely.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kohler-0.1.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kohler-0.1.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file kohler-0.1.1.tar.gz.

File metadata

  • Download URL: kohler-0.1.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kohler-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5b8946225c4a11cc7ed8b92c911dbffccd3eddbef1a3b57e9e4f21bee5dbb039
MD5 ec79ec400d5084c4e55961ac972038a8
BLAKE2b-256 e022757eaf9700dacbb981def15fae3fb07302481500081214806dbca4a35544

See more details on using hashes here.

Provenance

The following attestation bundles were made for kohler-0.1.1.tar.gz:

Publisher: python-publish.yml on niemyjski/kohler-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kohler-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kohler-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kohler-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3831081f8a41c0155fe0101725666240b6985b8eebfa2b0d0179017495f570ca
MD5 4bfa58ede59c72cd0995e20b8ec71875
BLAKE2b-256 adba760094d9ed564ee6943bc81664f5ee6dd4f3b5e72f1828d00f349e1a9495

See more details on using hashes here.

Provenance

The following attestation bundles were made for kohler-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on niemyjski/kohler-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page