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

lxcommunicator

v1.1.1

Published

Communicate securily with the Loxone Miniserver via Websocket or HTTP requests

Downloads

4,052

Readme

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

| Native | Supported | |:------------------------------------|:-----------| | Node.js | [x] | | Browserify| [x] |

| Browser | Supported | |:----------------|:------------| | Safari (Mobile) | [x] | | Chrome (Mobile) | [x] | | Firefox | [x] | | Edge | [x] | | 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://)

  • A TLS connection is only supported by the Miniserver Generation 2
  • It is mandatory to enter the URL in the following format to ensure the Certificate matches the domain.
    • This prevents the ERR_CERT_COMMON_NAME_INVALID error.
  • Both a local and remote connection can be established via the URL below (IPv4 and IPv6)

| IP of the Miniserver | Serial Number of the Miniserver | Resulting URL | |:---------------------------------------|:--------------------------------|:---------------------------------------------------------| | 89.23.45.12 | 504f94a00001 | https://89-23-45-12.504f94a00001.dyndns.loxonecloud.com | | 192.168.0.77 | 504f94a00001 | https://192-168-0-77.504f94a00001.dyndns.loxonecloud.com | | [2001:db8:85a3:8d3:1319:8a2e:370:7348] | 504f94a00001 | https://2001-db8-85a3-8d3-1319-8a2e-370-7348.504f94a00001.dyndns.loxonecloud.com |

Further information on on how to establish a TLS connection to a Miniserver Generation 2 can be found here

Common issues when using TLS (https:// and wss://)

  • Expired Certificate
    • Verify your expiration date
  • Common name won't match
    • Verify that your domain matches the common name defined in the certificate
  • Wrong HTTPS port
    • Verify that you port forward the Miniserver Generations 2 port 443 on your router. The external port can be defined as you wish.

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!