Skip to main content

Async library to communicate with Heatmiser NeoHub 2 API.

Project description

NeoHubAPI

This is a simple python wrapper around Heatmiser's Neohub API. Up-to-date documentation for the API can be obtained from the Heatmiser Developer Portal. You will need to sign up for a free account.

The primary purpose of this module is to help with Home Assistant integration but it can also be used as a standalone library for other projects.

Connection methods

The API provides two connection methods. The so-called "legacy" method is by way of an unencrypted connection to port 4242 of the Neohub. The newer method uses an encrypted websocket on port 4243, but only works on a second generation hub (look for the sticker on the back).

To use the websocket connection, you need to obtain a token from the Heatmiser Neo app. Go to Settings > API > + in the app and create one.

On newer hubs, the legacy connection may be disabled by default. If you want to use it, go to Settings > API in the app, and enable it from there.

Usage example

import asyncio
import neohubapi.neohub as neohub


async def run():
    # Legacy connection
    hub = neohub.NeoHub()
    # Or, for a websocket connection:
    # hub = neohub.Neohub(port=4243, token='xxx-xxxxxxx')
    system = await hub.get_system()
    hub_data = await hub.get_devices_data()
    devices = hub_data['neo_devices']
    for device in devices:
        print(f"Temperature in zone {device.name}: {device.temperature}")
        await device.identify()


asyncio.run(run())

neohub_cli.py

This package includes a CLI for performing common tasks.

$ neohub_cli.py help  # Shows all commands
$ neohub_cli.py help set_time  # Displays help for the set_time function
$ neohub_cli.py --hub_ip=myneohub set_time "2021-01-31 15:43:00"  # Specify times like this
$ neohub_cli.py --hub_ip=myneohub set_lock 1234 "Living Room"  # Name NeoStats like this.
$ neohub_cli.py --hub_ip=myneohub --hub_token=XXX get_system  # Get system variables with websocket connection

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

neohubapi-3.1.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

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

neohubapi-3.1-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file neohubapi-3.1.tar.gz.

File metadata

  • Download URL: neohubapi-3.1.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for neohubapi-3.1.tar.gz
Algorithm Hash digest
SHA256 e547166b108b7219993f56b1becdc74bd049c16a07ed5f58eaa799f4ea42e87c
MD5 baf0c9f68b14c14c111baa9a875e66b6
BLAKE2b-256 8b16af8642c21fe276938b4fa7f7264f358ae12b41c9a1f7a3a49dd51b431e37

See more details on using hashes here.

File details

Details for the file neohubapi-3.1-py3-none-any.whl.

File metadata

  • Download URL: neohubapi-3.1-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for neohubapi-3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 61ec8791c0490495e4c784b578b90f47a319f99717d749883a6f676853c8a5f7
MD5 1a80269d850a9fe1173d33e7b68512e8
BLAKE2b-256 de7e751670828af8dea6c750e5bba8861c6611faba794552a58efbb01f177c7d

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