npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mqtt2loxone

v3.0.1

Published

Node.js based interface between MQTT and Loxone for a smart home

Downloads

15

Readme

mqtt2loxone

mqtt-smarthome npm travis

This node.js application is a bridge between the Loxone Smart Home and a mqtt broker. The Loxone MiniServer can publish a message by using the UDP virtual output and using port 4000 on mqtt2loxone by default. The mqtt2loxone will publish the message afterwards to the mqtt broker.

On the other way, the mqtt2loxone will subscribe to the topic loxone/set/# and forward all messages received from the mqtt broker to the Loxone MiniServer. The mqtt2loxone will check the val property. If the property is a string, it will be forwarded to a Loxone virtual text input. If it's a number, boolean or null, it will be forwarded to a Loxone UDP virtual input, using the same port 4000 by default.

Installation

This node.js application is installed from the npm repository and executed with the node command.

npm install -g mqtt2loxone
node /usr/local/bin/mqtt2loxone

Alternatively, the module can be executed as a docker container. Use the following Dockerfile to build a container injecting the config file.

FROM node:alpine

RUN npm install -g mqtt2loxone

COPY config.json /etc/mqtt2loxone.json

ENTRYPOINT [ "/usr/local/bin/mqtt2loxone", "/etc/mqtt2loxone.json" ]

Configuration

The following configuration file is an example. Please replace the desired values like the mqtt url and add your loxone ip address, username and password.

{
    "log": "debug",
    "mqtt": {
        "url": "mqtt://192.168.1.10",
        "name": "loxone",
        "secure": false
    },
    "loxone": {
        "host": "192.168.1.20",
        "port": 4000,
        "username": "user",
        "password": "pass",
        "subscriptions": [
            "/my/topic/#"
        ]
    }
}

API

UDP Virtual Output

This module contains a udp api to receive udp datagram packages from the Loxone MiniServer. The virtual output must be configured with the address pointing to the ip address of mqtt2loxone and the specified port. Also remove the ; separator in the virtual output.

UDP Virtual Output

Within the virtual output, a virtual output command can be created to specify what will be send to the mqtt broker. Please use the option digital output. For the field Command On specify the mqtt command in the following format:

  • <topic>;<value>;<qos>;<retain>;<name>;<mode>

UDP Virtual Output Command

By the way, you can also use the logger component in loxone with the UDP target to log change or status messages to mqtt.

UDP Virtual Input

The virtual udp input can be used to receive commands and numeric values. Just specify the udp port and optionally the remote ip.

UDP Virtual Input

Afterwards, for every topic create a udp virtual input command. If it's just a command without any value, just use the digital input option. Else, append the string =\v to the topic and use an analogue input.

UDP Virtual Input Command

Virtual Text Input

If you want to publish text to the Loxone MiniServer, the udp virtual input will not work. You have to use the virtual text input and specify a name. This module will automatically detect text and invoke a http query to update the text, by using the name property in the mqtt payload to identify the virtual text input.

Virtual Text Input