Sign inSign up

krambox/loxone2mqtt

By krambox

•Updated over 8 years ago

Gateway for Loxone to communicate with mqtt broker with the mqtt-smarthome topic and payload format.

Image
0

100K+

krambox/loxone2mqtt repository overview

⁠loxone2mqtt

mqtt-smarthome NPM version Dependency Status Build Status js-semistandard-style License: MIT Docker Build Status

Gateway for Loxone™ miniserver to communicate with mqtt broker with the https://github.com/mqtt-smarthome⁠ topic and payload format.

This is a fork of node-lox-mqtt-gateway⁠ (c) 2016 Ladislav Dokulil , heavily modified and rewritten to suite my needs.

Notable changes:

For communication with miniserver is used WebSocket api described in [Loxone™ API Documentation] (https://www.loxone.com/enen/kb/api/⁠)

⁠Preamble

This is experimental version.

Use it at your own risk.

⁠Quick start

Gateway for Loxone™ miniserver to communicate with mqtt broker

Usage: loxone2mqtt.js [options]

Optionen:
  -v, --verbosity  possible values: "error", "warn", "info", "debug"
                                                              [Standard: "info"]
  -n, --name       instance name. used as mqtt client id and as prefix for
                   connected topic                             [Standard: "lox"]
  -u, --url        mqtt broker url. See
                   https://github.com/mqttjs/MQTT.js#connect-using-a-url
                                                  [Standard: "mqtt://127.0.0.1"]
  -p, --password   Loxone passcode
  -l, --loxone     Loxone host
  -i, --userid     Loxone user id
  -h, --help       Hilfe anzeigen                                      [boolean]
  --version        Version anzeigen                                    [boolean]

⁠MQTT Interface

⁠MQTT topic base

{name}/{state|set|meta}/category/room/control_name/

example

lox/state/light/bedroom/main_light

⁠States of Loxone™ miniserver to MQTT

If you tries to get the state of specific control you need to subscribe

⁠topic

mqtt_prefix/{state|set}/category/room/control_name/

⁠message contains data

in JSON format.

TODO: Make documentation for all controls

⁠MQTT to Loxone™ miniserver actions

If you could make some action you must publish message with:

⁠topic

mqtt_prefix/set/category/room/control_name/

⁠data

There is a command string like in Loxone™ API Structure file documentation⁠

⁠example of whole message (todo)
{
    "topic": "lox/set/light/bedroom/main_light",
    "val": 1
}

⁠Build and run local Docker container

docker build -t loxone2mqtt .

docker run --env-file ./loxone.env -it km200 loxone2mqtt 

With an loxone.env file

LOXONE_url=mqtt://localhost
LOXONE_userid=admin
LOXONE_password=password
LOXONE_loxone=loxone.local

Tag summary

Content type

Image

Digest

Size

16.1 MB

Last updated

over 8 years ago

docker pull krambox/loxone2mqtt