Skip to main content

intesis-gw-modbus

Python library for Intesis INMBS Modbus gateways, the boxes that put an air conditioner's indoor unit on a Modbus RTU or TCP bus. Built on modbus-connection: the library models the registers and takes a ModbusUnit; it never opens a link.

This is an independent, community project. It is not affiliated with, endorsed by or supported by HMS Networks, Intesis or any air-conditioner manufacturer; Intesis and the gateway part numbers are their trademarks and are used only to identify the hardware. The register maps come from the public user manuals.

This library was built with the help of Claude (Anthropic).

Supported gateways

Gateway Family Status
INMBSMHI001R000 (Mitsubishi Heavy Industries, RTU) single-unit modelled from the manual (r6.4), verified against the mock backend
INMBSMHI048O000 / INMBSMHI128O000 (MHI, RTU or TCP) multi-unit modelled from the manual (r1.0), verified against the mock backend only

The single-unit register map is shared by the other brands' INMBSxxx001R000 gateways. Their device ids are known (Daikin 0x0801, Panasonic 0x1500, Toshiba 0x1F00, LG 0x1000, Hitachi 0x1400, Samsung 0x1200) but their code and error tables are not written yet: see docs/adding-a-brand.md.

Single-unit gateways (INMBSxxx001R000)

One gateway per indoor unit, Modbus RTU only, configured with DIP switches. The facts below come from the INMBSMHI001R000 manual; the other brands' single-unit gateways are documented the same way but have not been checked.

  • EIA-485, 8N2 by default (8N1 is auto-detected), 9600 baud and slave address 1 out of the box. SW3 sets the address and, with SW4, the baud rate (2400 to 115200); SW4 also sets the temperature format (x1 °C, x10 °C or °F) and switches in the on-board 120 Ω termination. Every DIP change needs a power cycle.
  • SW1 sets the gateway's role on the air conditioner's XY bus: slave by default, which needs an MHI wired remote controller acting as master, or master, with any remote controller set as slave. Register 98 exposes the same role (is_master, async_set_master); the manual does not say which wins after a power cycle. As master the external temperature reference is applied directly; as slave the gateway shifts the setpoint to compensate.
  • Function codes 3, 4, 6 and 16, with 16 limited to one register per request. A block read must not touch an undefined address, so the library reads the documented blocks only, one request each.

Multi-unit gateways (INMBSxxx048O000 / INMBSxxx128O000)

One gateway for a whole MHI Superlink bus, configured with Intesis' LinkBoxMB Windows tool rather than switches.

  • Modbus TCP (port 502 by default) and/or Modbus RTU over EIA-485 or EIA-232 (1200 to 38400 baud, parity selectable; the slave address is set in the tool).
  • Function codes 3, 4 and 6 only. Each indoor unit owns a 20-register block and a poll of a range must stay inside valid addresses.

Timing

The library asks for a 3 s request timeout on both families and a 20 ms gap between requests on the single-unit gateway. These are conservative values derived from the bus parameters, not measured; both live in the device classes.

Home Assistant

A core Home Assistant integration (intesis_modbus) built on this library is in progress.

Installation

pip install intesis-gw-modbus

Requires Python 3.12+ and modbus-connection.

Usage

import asyncio

from modbus_connection import ModbusSerialParams
from modbus_connection.tmodbus import ModbusConnection

from intesis_gw_modbus import (
    MODELS,
    FanSpeed,
    IntesisSingleUnitGateway,
    TemperatureFormat,
)


async def main() -> None:
    connection = ModbusConnection(
        ModbusSerialParams(device="/dev/ttyUSB0", baudrate=9600, stopbits=2)
    )
    try:
        unit = connection.for_unit(1)
        gateway = IntesisSingleUnitGateway(
            unit,
            brand=MODELS["INMBSMHI001R000"].brand,
            temperature_format=TemperatureFormat.DECICELSIUS,
        )
        report = await gateway.async_update()
        print(
            report.updated, gateway.mode, gateway.setpoint, gateway.current_temperature
        )
        await gateway.async_set_fan_speed(FanSpeed.HIGH)
        await gateway.async_set_setpoint(22.5)
    finally:
        await connection.close()


asyncio.run(main())

Every temperature the library returns or accepts is in degrees Celsius, whatever the gateway's DIP-switch format. detect_temperature_format(raw) infers the format from a raw setpoint register when it is not known.

async_probe_gateway(unit) identifies a gateway before you build a device for it. The returned GatewayProbe holds the single-unit model its device id belongs to, the unsupported_brand of a documented gateway that has no table yet, the detected temperature_format, and vane_reported, a hint that the unit has a vane. Only single-unit gateways can be identified this way: a multi-unit gateway keeps indoor unit readings at the same addresses, so it comes back with no model and nothing else is read from it.

A multi-unit gateway is IntesisMultiUnitGateway(unit, brand=..., unit_count=48); after the first async_update() its indoor_units dict holds one IndoorUnitView per unit the gateway talks to. Each unit's block is read on its own, so one block failing only marks that unit not present. Each later update re-probes the next 8 empty blocks, so a unit that comes online afterwards joins the dict within a few polls; a unit that drops out stays listed with present false.

Development

pip install -e ".[dev]"
pytest            # 100 % coverage is enforced
mypy intesis_gw_modbus tests/
ruff check . && ruff format --check .

Everything runs against the modbus-connection mock backend; no hardware is needed.

Releasing

Publishing a GitHub release tagged vX.Y.Z builds the package from that tag (the version comes from setuptools-scm) and publishes it to PyPI through trusted publishing.

License

Apache-2.0.

Metadata

Release files for intesis-gw-modbus 0.2.0

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

Source distribution (sdist)

Source distribution for intesis-gw-modbus 0.2.0
File Size Uploaded Provenance Actions
intesis_gw_modbus-0.2.0.tar.gz 44.8 kB With provenance Details for intesis_gw_modbus-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for intesis-gw-modbus 0.2.0
File Interpreter ABI Platform Actions
intesis_gw_modbus-0.2.0-py3-none-any.whl Python 3 none any Details for intesis_gw_modbus-0.2.0-py3-none-any.whl

Total release size: 75.4 kB

Release files / intesis_gw_modbus-0.2.0.tar.gz

Download URL intesis_gw_modbus-0.2.0.tar.gz
Size 44.8 kB
Tags Source
SHA-256 checksum
How to use checksums
db63791ef01b3b41f78dcf47f4f5d305b0361eaf582a8f17e44650c0cd8d867c
BLAKE2b-256 checksum
How to use checksums
aed0606d2102abfa827059c6d868088c6f5a003b4e6e5b696d935e58d77feab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 10, 2026.

Transparency log

Release files / intesis_gw_modbus-0.2.0-py3-none-any.whl

Download URL intesis_gw_modbus-0.2.0-py3-none-any.whl
Size 30.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
106536bbb6bebddb07f5f6bc02bfb32a35c4333df6e153756d816d7186fdca2c
BLAKE2b-256 checksum
How to use checksums
3cf62c8ef09ccbec7106bfbe1a759cc0f7f0bf5bbd3c893835a5ca02583792ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 10, 2026.

Transparency log

Security for intesis-gw-modbus 0.2.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for intesis_gw_modbus-0.2.0.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 Nov 10, 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.

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