1.1.1 • Published 4 years ago

lxcommunicator v1.1.1

Weekly downloads
66
License
MIT
Repository
-
Last release
4 years ago

LxCommunicator v1.0.1

This module exposes all necessary modules to establish a secure and encrypted connection to a Loxone Miniserver. LxCommunicator can be installed using npm (npm i lxcommunicator) or bower (bower install lxcommunicator)

Disclaimer

  • Loxone Electronics GmbH doesn't provide any support for this module
  • Please submit an issue or file an pull request if you find any issue

Support

NativeSupported
Node.jsx
Browserifyx
BrowserSupported
Safari (Mobile)x
Chrome (Mobile)x
Firefoxx
Edgex
IE

Use LxCommunicator

Node.js and Browserify

Example: ./test/index.js

Note for BrowserifyPlease make sure Browserify is correctly configured!

  • Add LxCommunicator as a local module
npm install lxcommunicator --save
  • Require LxCommunicator
var LxCommunicator = require('lxcommunicator');

Browser

Example: ./test/index.html

  • Add LxCommunicator as a local module
npm install lxcommunicator --save
  • Reference LxCommunicator~Browser.js in your index.html
<script src="{PATH_TO_LXCOMMUNICATOR}/LxCommunicator~Browser.min.js"></script>
  • LxCommunicator is exposed as a global object

Developer Notes

Example

Please take a look in the ./test folder and run npm test to run ./test/index.js in Node.js

Establish a TLS connection (https:// and wss://)

Tip:Validate your url in the browser, it allows you to easily verify the Certificate against the URL and view the browsers error message.

Create Browser module

  • Execute the browserify.js script, it will create the browser modules
node ./browserify.js

Set Debug flags

Go to ./vendor/Debug.js and adopt the flags to your needs.

Note:Don't forget to execute the browserify script every time you make a change in this module!