homematic-js-rpc

1.0.0 • Public • Published

homematic-js-rpc

🏠 lightweight Javascript interface for Homematic XML-RPC

npm version Dependency Status

npm install homematic-js-rpc

Basic Usage

const homematic = new (require('homematic-js-rpc'))('20.1.0.50', '2001');
homematic.setValue("LEQ123456:1", "LEVEL", "0.3", (error, response) => {
});
homematic.getValue("LEQ123456:1", "LEVEL", (error,response) => {
});

Tests

Find more examples in "test" directory.

Enter you homematic server connection in package.json, and run some tests!

  "homematic": {
    "host": "192.168.0.10",
    "port": "2001",
    "devices": {
      "bedroomDimLight": "LEQ123456:1",
      "keymatic": "KEQ123456:1"
    }
  }

run a single test from commandline with:

mocha test/dimmer.spec.js -g "getValue should return 0"

Package Sidebar

Install

npm i homematic-js-rpc

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • firsttris