skillfed

pyhiveapi

A Python library to interface with the Hive API

pyhiveapi v0.5.16 115.2K downloads/30d#12,264 on PyPI32
Permissive license MIT Active released

What it is and what it does

pyhive-integration is a Python client library for the Hive smart home platform, providing both async and sync APIs to discover, monitor, and control Hive devices (thermostats, hot water, lights, plugs, sensors, and hubs). It handles AWS Cognito SRP authentication with optional SMS two-factor authentication, automatic token refresh, and a polling-based device cache. The library is designed primarily for Home Assistant integration but works standalone.

The package ships two entry points: one async and one sync, both built from the same source. It supports a wide range of Hive device types with granular control and includes a file-based offline mode for testing without live credentials. Eight runtime dependencies (boto3, requests, aiohttp, loguru, and others) handle authentication, HTTP communication, and logging.

Use it for:

  • Integrate Hive heating and hot water control into Home Assistant automations and dashboards.
  • Build standalone Python scripts to monitor and control Hive devices on a schedule.
  • Develop a custom smart home dashboard that queries Hive device state and sends commands.
  • Test Hive device logic and integrations offline using the file-based fixture mode without real credentials.
  • Automate lighting control (brightness, color, on/off) based on external events or time-based rules.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python library for controlling Hive smart home devices (heating, hot water, lights, plugs, sensors) via the Hive API, with both async and sync interfaces.

Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and provides a dual async/sync API for Hive smart home control. Low install friction and stable status make it a safe choice for Home Assistant users or standalone Hive automation. Verify the Python version requirement before installing.

Install

pyhiveapi on PyPI

pip

pip install pyhiveapi

uv

uv add pyhiveapi

poetry

poetry add pyhiveapi

Installing pyhiveapi

Before you install

Low install friction with a pure-Python wheel. Actively maintained with a recent commit (2026-08-07) and stable status. Eight runtime dependencies are all well-established libraries (boto3, requests, aiohttp, loguru, etc.), so dependency resolution should be straightforward.

License in practice

MIT license (permissive) means you can use, modify, and distribute this library freely in commercial and private projects with minimal restrictions — just include the license notice.

Quickstart

from pyhiveapi import Auth, Hive

auth = Auth(username="user@example.com", password="yourpassword")
tokens = auth.login()
hive = Hive(username="user@example.com", password="yourpassword")
hive.startSession({"tokens": tokens})
for device in hive.session.data.devices.values():
    print(device)

Hive account credentials (username/password) are required; guest accounts are not supported. Verify your Python version matches the actual minimum requirement.

Verify before relying

  • Classifiers declare support for Python 3.6–3.9, but description states 'Requires Python 3.10+'; which is the actual minimum?
  • Whether the package works standalone outside Home Assistant as claimed, or if Home Assistant integration is a primary use case with limitations elsewhere.
  • Performance characteristics and polling frequency tuning options for large device counts or high-frequency state updates.
  • Exact capabilities and control options for each device type (heating, hot water, lights, plugs, sensors, hub/sense).

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 8 — pre-commit, boto3, botocore, requests, aiohttp, pyquery, unasync, loguru
Maintenance actively maintained — 977 days since the last release
Last repo commit
First released
Downloads 115,217/month — #12,264 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyhiveapi-0.5.16-py2.py3-none-any.whl

Keywords: Hive, API, Library

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

hive smart home apihive thermostat control pythonhive device integrationsmart home automation libraryhive home assistant integrationasync smart home apihive heating and lighting control
smart-homeiot-integrationasync-first

More Internet packages