Skip to main content

kingspan-connect-sensor

build: codecov PyPI Version

API to get oil tank from Kingspan SENSiT sensors.

To make use of the API, you will need the credentials you used to register with the App. You do not need other details such as the tank ID as these are already associated with your account. The new KNECT Pro service is supported only from version 4.0.

Installation

python3 -m pip kingspan-connect-sensor

Usage

Reading documents:

from connectsensor import SensorClient

client = SensorClient()
client.login("test@example.com", "s3cret")
tanks = client.tanks
tank_level = tanks[0].level

The tanks method returns a Tanks object which can be queried for the status of the specific tank.

Async Usage

async with AsyncSensorClient() as client:
    await client.login("test@example.com", "s3cret")
    tanks = await client.tanks
    tank_level = await tanks[0].level
    tank_capacity = await tanks[0].capacity
    tank_percent = 100 * (tank_level / tank_percent)
    print(f"Tank is {tank_percent:.1f}% full")

Tanks object

As of version 3.0, history no longer returns a Pandas dataframe to simplify package dependencies. Instead, an list of dicts is returned, where each list element is a sample from the web API, sorted by logging time. There should be one record per day. Each dict has the following keys:

  • reading_date: a datetime object indicating the time a measurement was made
  • level_percent: integer percentage full
  • level_litres: number of lites in the tank

You can construct a Pandas dataframe simply using:

tanks = await client.tanks
history = await tanks[0].history()
df = pd.DataFrame(history)

The history method takes optional parameters start_date and end_date which are datetime.datetime objects specifying the range of dates to query from the API.

Supported APIs

The package supports both the new JSON API used by the KNECT Pro app introduced in February 2026, and the legacy SOAP API. You can select the appropriate API using the api_version parameter passed to the SensorClient and AsyncSensorClient constructors. Valid version options are APIVersion.CONNECT_V1 and APIVersion.KNECT_V1.

NOTE: as of March 2026, the APIVersion.KNECT_V1 API uses HTTP without any password encryption as the TLS endpoint is unavailable.

Scripts

As of version 4.0, the notifier and export script have been removed as integrations like Home Assistant provide much better functionality. Reporting on the current status of the tank can still be performed kingspan-status:

% kingspan-status --username=test@example.com --password=s3cret

Home Tank:
 Capacity = 2000
 Serial Number = 20001999
 Model = Unknown
 Level = 90% (1148 litres)
 Last Read = 2021-10-09 00:42:47.947000

History:
 Reading date           %Full  Litres
 30-Jan-2021 00:29      94     1224 
 31-Jan-2021 00:59      80     1040 
 01-Feb-2021 00:29      78     1008 
 02-Feb-2021 00:59      76     986  

Metadata

Release files for kingspan-connect-sensor 4.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kingspan-connect-sensor 4.2.1
File Size Uploaded
kingspan_connect_sensor-4.2.1.tar.gz 15.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kingspan-connect-sensor 4.2.1
File Interpreter ABI Platform
kingspan_connect_sensor-4.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.4 kB

Release files / kingspan_connect_sensor-4.2.1.tar.gz

Download URL kingspan_connect_sensor-4.2.1.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3b5f2b44354b500a3b3b92d20bc1f0188e7420ce7b202d73bd2af0c894bb0f89
BLAKE2b-256 checksum
How to use checksums
24f468bccdd2709a65320f9f85e02a9adade3987581de93dca956f76fafa8294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

Release files / kingspan_connect_sensor-4.2.1-py3-none-any.whl

Download URL kingspan_connect_sensor-4.2.1-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccc5580c07063c681a90d89c977a954fb8d09073b47e2b75aa7c55e0551a6fad
BLAKE2b-256 checksum
How to use checksums
4465ef94c835e3016272027057054d6e0e03a6ed05e24d3516f88b032e840d00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

Release history Release notifications | RSS feed

This release

4.2.1 This release

2 release files

4.2.0

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page