Skip to main content

Secure IoT Open Lynx ↔ Home Assistant MQTT Discovery bridge

Project description

iotopen-bridge

Secure, extensible bridge between IoT Open Lynx and Home Assistant using MQTT + HA MQTT Discovery.

Quick start

Install (PyPI)

pip install iotopen-bridge

Install (dev)

pip install -e ".[dev]"

Home Assistant integration helper (optional)

If you are writing a Home Assistant custom integration and want minimal glue code, you can build a BridgeConfig from your config flow values and start the runtime from HA:

from iotopen_bridge.ha import HABridgeHandle, build_bridge_config

cfg = build_bridge_config(
    base_url="https://lynx.iotopen.se",
    api_key="...",
    installation_id=2222,
    mqtt_host="localhost",
    mqtt_port=1883,
)

handle = HABridgeHandle.from_config(cfg)
await handle.async_start(hass)

Configure

Create config.yml (see examples/config.example.yaml):

lynx:
  base_url: "https://lynx.example"
  installation_id: 2222
  api_key: "${IOTOPEN_API_KEY}"

mqtt:
  host: "mqtt.example"
  port: 8883 #tls 1883 non secured 
  username: "${MQTT_USER}"
  password: "${MQTT_PASS}"
  client_id: "iotopen-bridge"
  tls:
    enabled: true
    cafile: "/etc/ssl/certs/ca-certificates.crt"
    verify_hostname: true

ha:
  discovery:
    enabled: true
    prefix: "homeassistant"
  state_prefix: "iotopen"

Run

iotopen-bridge run --config config.yml

Probes

iotopen-bridge probe-api --config config.yml
iotopen-bridge probe-mqtt --config config.yml --sub "2086/obj/#" --count 20

Design

  • Inventory from Lynx API (FunctionX).
  • Telemetry from FunctionX topic_read.
  • Commands to FunctionX topic_set.
  • HA MQTT Discovery auto-creates entities in Home Assistant.

See docs/architecture.md.

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

iotopen_bridge-0.1.1.tar.gz (106.3 kB view details)

Uploaded Source

Built Distribution

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

iotopen_bridge-0.1.1-py3-none-any.whl (159.2 kB view details)

Uploaded Python 3

File details

Details for the file iotopen_bridge-0.1.1.tar.gz.

File metadata

  • Download URL: iotopen_bridge-0.1.1.tar.gz
  • Upload date:
  • Size: 106.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for iotopen_bridge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 17fcfa4e46dbbc0d53fd8d2c6557a09703e095bdf958678130461c076220c980
MD5 4b38754c85153f91bf2db1ebdcf02188
BLAKE2b-256 c9536bdd8fc60a42fb0b78c8e8f1738399ae555426bde8865de715904b056499

See more details on using hashes here.

Provenance

The following attestation bundles were made for iotopen_bridge-0.1.1.tar.gz:

Publisher: publish.yml on afiay/iotopen-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iotopen_bridge-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: iotopen_bridge-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 159.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for iotopen_bridge-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bca0609c450a27c1c866e755a6e66b0f3fa3c694fe0318a6cc1cc88687bbef2b
MD5 f9b22ce59b6e9e155770210af49036c0
BLAKE2b-256 3501b7db40baddfb7fef9922c012d8c85467d86488626885ab94aa5a1b8fabca

See more details on using hashes here.

Provenance

The following attestation bundles were made for iotopen_bridge-0.1.1-py3-none-any.whl:

Publisher: publish.yml on afiay/iotopen-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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