Skip to main content

A implementation of Python interface to the IQtec / Kobra smart home solutions.

Project description

Piqtec: An IQtec smart-home Python inteface

CC BY-NC-SA 4.0 PyPI - Version

A Python interface for the IQtec / Kobra smart home solutions.
(IQtec is a small smart-home vendor based in the Czech Republic.)

It was written for my home use, and while I tried to keep things general might need some tweaks before being useful (PRs welcome). The functionality of the API this package relies on is reverse-engineered without any access to official documentation, your mileage may vary.

The package aims to make the API accessible in Python and convert the values to correct datatypes, based on descriptions from the data.xml file fetched from the endpoint. The API requests are batched so the endpoint is not overloaded, and the return does not overflow the buffer (see: piqtec.controller.Controller.api_call and piqtec.constants.MAX_RESPONSE_LENGTH).

Intended to be used with this custom Home Assistant integration.

Supported Devices

  • System Controls (piqtec.unit.system),
  • Room Controls (piqtec.unit.room),
  • Covers/Window Controls (piqtec.unit.sunblind),
  • Calendars (piqtec.unit.calendar),
  • Other devices mapped from data.xml on the best effort basis (piqtec.unit.device).

Usage

Print whole current state

from piqtec.controller import Controller

c = Controller("controller_ip_or_hostname:port")
state = c.update_status()
print(state)

Example commands

(for all possible "nice" commands see unit modules)

from piqtec.controller import Controller
from piqtec.constants import ROOM_MODES

c = Controller("controller_ip_or_hostname:port")

c.rooms["<ROOM_ID>"].set_room_mode(ROOM_MODES.CALENDAR)

Example raw API usage

from piqtec.controller import Controller

c = Controller("controller_ip_or_hostname:port")
r = c.devices["<DEVICE_ID>"].switch_apis["<SWITCH_ID>"].set_request("<VALUE>")
c.api_call(r)

License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

For non-commercial use only. Relicensing is available upon request.

CC BY-NC-SA 4.0

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

piqtec-0.1.5.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

piqtec-0.1.5-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file piqtec-0.1.5.tar.gz.

File metadata

  • Download URL: piqtec-0.1.5.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for piqtec-0.1.5.tar.gz
Algorithm Hash digest
SHA256 209d626de6fd9ee32bf6cd7250782ba4a7aabbdff1d56280f4ad116e409e8a85
MD5 5cb5cfd7664ee4d1c03b33e191a2e6b4
BLAKE2b-256 589b7ffb54ec0114283af32d65fecf8df31c49f26a0e6c3305488f9cbba19d4d

See more details on using hashes here.

File details

Details for the file piqtec-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: piqtec-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for piqtec-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 abcf863a6b7fa939026c992b4b29e59ad9661d0813dc95b8e83848c77e5676ff
MD5 6f3499bdc474a56bd80a4cc6bb4f33cc
BLAKE2b-256 3dc1f51181d077c46d1bb68d9028dd12df108b33c5dcc683879cca0fc547c2ee

See more details on using hashes here.

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