Skip to content

Gateway for Loxone™ miniserver to communicate with mqtt broker

License

Notifications You must be signed in to change notification settings

krambox/loxone2mqtt

 
 

Repository files navigation

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 -i loxone2mqtt 

With an loxone.env file

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

About

Gateway for Loxone™ miniserver to communicate with mqtt broker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%