Skip to main content

smartbox

build PyPI version codecov PyPI license PyPI pyversions

Python API to control heating 'smart boxes'

Install

To install smartbox simply run:

pip install smartbox

Depending on your permissions you might be required to use sudo. Once installed you can simply add smartbox to your Python 3 scripts by including:

import smartbox

smartbox Command Line Tool

Mandatory options

You can use the smartbox tool to get status information from your heaters (nodes) and change settings.

A few common options are required for all commands:

  • -u/--username: Your username as used for the mobile app/web app.
  • -p/--password: Your password as used for the mobile app/web app.

Verbose logging can be enabled with the -v/--verbose flag.

Optional options

These options are useful if your reseller is not configured.

  • -b/--basic-auth-creds: An HTTP Basic Auth credential used to do initial authentication with the server. Use the base64 encoded string directly. See 'Basic Auth Credential' in api-notes.md for more details.
  • -a/--api-name: The API name for your heater vendor. This is visible in the 'API Host' entry in the 'Version' menu item in the mobile app/web app. If the host name is of the form api-foo.xxxx or api.xxxx use the values api-foo or api respectively. The reseller has to be declared in the package.
  • -r/--x-referer: The referer of your request.
  • -i/--x-serial-id: The serial-id of your request.

Availables commands

Listing smartbox devices

smartbox <auth options...> devices

Listing smartbox nodes

The nodes command lists nodes across all devices.

smartbox <auth options...> nodes

Getting node status

The status command lists status across all nodes and devices.

smartbox <auth options...> status

Setting node status

The set-status command can be used to change a status item on a particular node.

smartbox <auth options...> set-status <-d/--device-id> <device id> <-n/--node-addr> <node> <name>=<value> [<name>=<value> ...]

Getting node setup

The setup command lists setup across all nodes and devices.

smartbox <auth options...> setup

Setting node setup

The set-setup command can be used to change a setup item on a particular node.

smartbox <auth options...> set-setup <-d/--device-id> <device id> <-n/--node-addr> <node> <name>=<value> [<name>=<value> ...]

Getting node programme

The prog command lists the weekly schedule across all nodes and devices.

smartbox <auth options...> prog

Setting node programme

The set-prog command can be used to set the weekly schedule (programme) of a particular node from a JSON string. The schedule is day-level-merged onto the node's current schedule before posting:

smartbox <auth options...> set-prog <-d/--device-id> <device id> <-n/--node-addr> <node> '{"prog": {"0": [0, 2, 2, ...], ...}}'

Setting node samples

The node-samples command can be used to get the historical data (temperature and consumption) of a node.

smartbox <auth options...> node-samples <-d/--device-id> <device id> <-n/--node-addr> <node> <-s/--start-time> <start time>  <-e/--end-time> <end time>

Getting device away status

The device-away-status command lists the away status across all devices.

smartbox <auth options...> device-away-status

Setting device away status

The set-device-away-status command can be used to change the away status on a particular device.

smartbox <auth options...> set-device-away-status <-d/--device-id> <device id> <name>=<value> [<name>=<value> ...]

Getting device power limit

The device-power-limit command lists the power limit (in watts) across all devices.

smartbox <auth options...> device-power-limit

Setting device power limit

The set-device-power-limit command can be used to change the power limit (in watts) on a particular device.

smartbox <auth options...> set-device-power-limit <-d/--device-id> <device id> <limit>

Health check

The health-check command can be used to know if the API is alived

smartbox <auth options...> health-check

List available resellers

The resellers command can be used to know which resellers has an automatic configuration. If your reseller is not present you can raise an issue in github, or use the optional options.

smartbox <auth options...> resellers

See api-notes.md for notes on REST and socket.io endpoints.

Development

Prerequisites:

uv
python >=3.14.2

Clone the repo, install dependencies and install pre-commit hooks:

git clone
cd smartbox
uv sync
pre-commit install

Testing

To run the full suite simply run the following command from within the virtual environment:

pytest

or

python -m pytest tests/

To generate code coverage xml (e.g. for use in VSCode) run

python -m pytest --cov-report xml:cov.xml --cov smartbox --cov-append tests/

Another way to run the tests is by using tox. This runs the tests against the installed package and multiple versions of python.

tox

or by specifying a python version

tox -e py314

Support

Buy a coffee to ajtudela

Buy a coffee to delmael

Metadata

Release files for smartbox 2.6.2

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

Source distribution (sdist)

Source distribution for smartbox 2.6.2
File Size Uploaded Provenance Actions
smartbox-2.6.2.tar.gz 214.4 kB With provenance Details for smartbox-2.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for smartbox 2.6.2
File Interpreter ABI Platform Actions
smartbox-2.6.2-py3-none-any.whl Python 3 none any Details for smartbox-2.6.2-py3-none-any.whl

Total release size: 255.6 kB

Release files / smartbox-2.6.2.tar.gz

Download URL smartbox-2.6.2.tar.gz
Size 214.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8f5a38980f4be138f417b05cafe37990008bace9dc8d9342edfd459a8fb555ac
BLAKE2b-256 checksum
How to use checksums
eec0bee854161a4739e57b5e8142f99d95e8413bdc0db802e07db2768bde4eff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / smartbox-2.6.2-py3-none-any.whl

Download URL smartbox-2.6.2-py3-none-any.whl
Size 41.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ac0a5b90dceabe32bff2469e0ac2aa4d1e5c652b89adf1e9f31e42008f015f0
BLAKE2b-256 checksum
How to use checksums
eff0bf5c3ef25a81495b3c75e2258294c6412c44daada458dc76145b99a2ae62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Security for smartbox 2.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for smartbox-2.6.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.6.2 This release

2 release files Full provenance

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