Skip to main content

IHC-MQTT gateway

Project description

Ihc Mqtt Gateway

A simple IHC-MQTT Gateway; given connection details to an IHC Controller it downloads the project file and subscribes on events from dataline inputs and outputs. Furthermore it subscribes to topics in MQTT corresponding to each dataline output in the IHC project file.

The gateway can easily be run as a Python module:

python3 -m ihcmqtt.gateway

It accepts the command line parameters:

-h : a short help message

-v : increase verbosity, possible levels are: 1, 2 and 3

-c : specify a configuration file to use

The configuration file may look like this:

controller_url=http://192.168.178.1.10
controller_username=ihcuser
controller_password=ihcpassword
broker_host=localhost
broker_port=1883

These are the required settings. Specifying a mapfile configuration item will make the gateway print out IHC resource identifiers and corresponding MQTT topic names to said file.

By default topic names are derived from name and position tags in the IHC project file and prefixed with "house". The prefix can be changed by specifying topic_prefix in the configuration file.

An example of those extra, non-mandatory, configuration items could be:

mapfile=/var/ihcmqtt/ihcmqtt.map
topic_prefix=cottage

The gateway connects to the MQTT broker with a client name of "ihcmqtt-gateway-PID" - with PID being the process id of the gateway.

When run as a Python module, the gateway will exit cleanly on SIGINT.

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

ihcmqtt-gateway-1.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

ihcmqtt_gateway-1.0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file ihcmqtt-gateway-1.0.1.tar.gz.

File metadata

  • Download URL: ihcmqtt-gateway-1.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for ihcmqtt-gateway-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5df6d78eeb2dd47b99580eb0065b952c034de467f5fe282fbac6dfe026eb1111
MD5 78077eafd16afa9b93457e224a7b3712
BLAKE2b-256 0d59320cbadf3effd19e5debc9793383ab5a0d3fc353a377ffd3950646a9a030

See more details on using hashes here.

File details

Details for the file ihcmqtt_gateway-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ihcmqtt_gateway-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for ihcmqtt_gateway-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 64fb2c178cf774d4facc1589900b0df83d8fadfbfca61bca8c70863a5abaa5b9
MD5 84cfaefba332048f812684969e72dc38
BLAKE2b-256 d68bb9d781db4b7786e3c6c793c6cabedb49e85e325ca237b13e62d7560a3436

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page