Async library to communicate with Heatmiser NeoHub 2 API
Go to file
Andrius Štikonas 1121045275 Update README to adjust for API changes. 2024-01-21 17:04:00 +00:00
LICENSES Add minimal 2020-12-27 19:20:49 +00:00
neohubapi V2.0 2023-11-21 18:45:04 +00:00
scripts V2.0 2023-11-21 18:45:04 +00:00
tests Add pytest.ini and fix tests 2022-12-01 11:41:11 +00:00
.gitignore Add dependency on async_property. 2020-12-27 20:18:22 +00:00
.gitlab-ci.yml Also install websockets in CI. 2022-12-01 20:33:33 +00:00 Update README to adjust for API changes. 2024-01-21 17:04:00 +00:00 Initial support for timeclocks. 2021-01-02 22:42:56 +00:00
pytest.ini Add end of file newline. 2022-12-01 20:29:25 +00:00 V2.0 2023-11-21 18:45:04 +00:00


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.temperature}")
        await device.identify()

This package includes a CLI for performing common tasks.

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