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:
- https://github.com/mqtt-smarthome topic and payload format
- based on xyz2mqtt with yalm for logging and yargs (in progress)
- teduced and simplified code (in progress)
- https://github.com/mqtt-smarthome topic and payload format
For communication with miniserver is used WebSocket api described in [Loxone™ API Documentation] (https://www.loxone.com/enen/kb/api/)
This is experimental version.
Use it at your own risk.
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]
{name}/{state|set|meta}/category/room/control_name/
example
lox/state/light/bedroom/main_light
If you tries to get the state of specific control you need to subscribe
mqtt_prefix/{state|set}/category/room/control_name/
in JSON format.
TODO: Make documentation for all controls
If you could make some action you must publish message with:
mqtt_prefix/set/category/room/control_name/
There is a command string like in Loxone™ API Structure file documentation
{
"topic": "lox/set/light/bedroom/main_light",
"val": 1
}
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