Coder Social home page Coder Social logo

luxtronik2's Introduction

Luxtronik2

Luxtronik2 reads and controls heat pumps based on the Luxtronik 2.0 contol unit with Node.js.

This work based on the fantastic FHEM module 'LUXTRONIK2', the very usefull openHAB binding 'Novelan Luxtronic heat pump', the extensively cbrandlehner/homebridge-luxtronik2 and a little bit research of my own. Hope you will like it.

Supports the following heat pumps

  • Alpha Innotec
  • Siemens Novelan (WPR NET)
  • Roth (ThermoAura(r), ThermoTerra)
  • Elco
  • Buderus (Logamatic HMC20, HMC20 Z)
  • Nibe (AP-AW10)
  • Wolf Heiztechnik (BWL/BWS)
  • CTA (Aeroheat AH CI 1-16iL)

Status

Category Status
Version npm version
Dependencies Dependency Status
Build Build Status
License npm

Installation

npm install luxtronik2

How to use

Connect your unit via lan and configure the ip parameters at your unit. The port number of your unit is 8888 by default. Clone this code via git or simply via npm. You will get a package named luxtronik. You can require this at your code to read and write to your heat pump.

Examples

var luxtronik = require('luxtronik2');

const hostIp = '127.0.0.1';  // <- Enter your Luxtronik IP here
var pump = new luxtronik.createConnection(hostIp, 8888);

// read all readable data
pump.read(function (err, data) {
    if (err) {
        return console.log(err);
    }
    console.log(data);
    console.log(data.values.errors);
});

// set heating target temperature to 0 °C
pump.write('heating_target_temperature', 0);

// set warm water target temperature to 60 °C and use callback
pump.write('warmwater_target_temperature', 60, function (err, res) {
    if (err) {
        return console.log(err);
    }
    console.log(res);
});

// set heating operation mode to 'Auto'
pump.write('heating_operation_mode', 0);

// set warm water operation mode to 'Auto'
pump.write('warmwater_operation_mode', 0);

// set heating target temperature and use callback
pump.write('heating_target_temperature', 0, function (err, res) {
    if (err) {
        return console.log(err);
    }
    console.log(res);
});

Ability to plug in to processing data

It is possible to plug in to data processing by passing third option into createConnection function (or Luxtronik constructor). See the example below:

const pump = luxtronik.createConnection('192.168.0.190', 8889, {
    onProcessValues: function (heatpumpValues, heatpumpVisibility) {
        return {
            additional_value: (heatpumpVisibility[24] === 1) ? heatpumpValues[13] / 10 : 'no',
        };
    },
    onProcessParameters: function (heatpumpParameters, heatpumpVisibility) {
        return {
            additional_parameter: (heatpumpVisibility[207] === 1) ? heatpumpParameters[11] / 10 : 'no',
        };
    },
});

pump.read(function (err, data) {
    if (err) {
        return console.log(err);
    }
    console.log(data);
    console.log(data.values.errors);
});

Output:

{
  values: {
    additional_value: 'no',
    // ...regular values
  },
  parameters: {
    additional_parameter: 26.5,
    // ...regular parameters
  }
}
[
  // ...errors will go here
]

Migrating to version 2.0.0

The API changed between version 1.0.3 and version 2.0.0. See migrating guide for information on how to migrate your application to the new API.

Migrating to version 1.0.0

The API changed between version 0.1.2 and version 1.0.0. See migrating guide for information on how to migrate your application to the new API.

luxtronik2's People

Contributors

coolchip avatar dependabot[bot] avatar waldbaer avatar mwittig avatar mnemo70 avatar unclesamswiss avatar bakito avatar filipgolonka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.