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

loxone-nodejs

v0.0.15

Published

Loxone nodejs project to read & control inputs and outputs. Based on http://www.loxone.com/enen/service/documentation/api/webservices.html

Downloads

8

Readme

Loxone-NodeJS

Loxone nodejs project to read & control inputs and outputs. Based on http://www.loxone.com/enen/service/documentation/api/webservices.html

Installation

npm install loxone-nodejs --save

Usage

Create a new file 'my-loxone.js'

var LoxoneAPI = require('loxone-nodejs');

var loxone = new LoxoneAPI({
    ip: "192.168.1.200",
    debug: true,
    username: "admin",
    password: "password"
});

module.exports = loxone;

This example connects to a Harmony hub available on the IP 192.168.1.200. Also provide a username and password.

In another nodejs file

var loxone = require('./my-loxone');

loxone.get("AI_SEN2-T", function(output){
    if (output.LL.Code == 200) {
        console.log('Device does exists!');
        console.log('Value = ' + output.LL.value);
    } else {
        console.error('Device does NOT exists!');
    }
});

The following functions are available: get(device, callback), getValue(device, callback) and set(device, action, callback).

Extending

Extending 'my-loxone.js'

Add the following code to the my-loxone.js file to expose named functions to read an output.

...
loxone.getOutsideTemperature = function(callback) {
    this.getValue("AI_SEN2-T", callback);
};
...

AI_SEN2-T is the name of an output.

In another nodejs file

var loxone = require('./my-loxone');

loxone.getOutsideTemperature(function(value) {
    console.log("The outside temperature is: " + value + "°C");
});

Examples

Simple Example

This example contains a very example that connects to the Loxone to get the value of a certain output. Configure the my-loxone.js file to point to your Loxone.

cd example-simple
npm install
npm start

Homekit Example

This example is using another node JS project build on top of Homekit Accessory Protocol (HAP): https://github.com/KhaosT/HAP-NodeJS

Configure the my-loxone.js file to point to your Loxone. Also rename the virtual output name in loxone_temperatures.js.

cd example-hap
npm install
npm start

Install a free Homekit app from the App Store to find the homekit accessory.