@harmonyhub/client-ws
@harmonyhub/client-ws is a Node.JS library which allows you to interact with your Logitech Harmony Hub on the websocket service interface.
Last updated a year ago by airborne04 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @harmonyhub/client-ws 
SYNC missed versions from official npm registry.

Client Package

@harmonyhub/client-ws is a package of the harmonyhub library for interacting with a Logitech Harmony Hub, this is utilizing websockets due to the dicontinuation of xmpp in firmware version 206.

It is based @lopelex harmony-websocket implementation following the original xmpp based implementation of @swissmanu harmonyhubjs-client Which was based upon @jterraces awesome Harmony protocol guide. harmonyhubjs-client provides an extended protocol guide for the interested ones.

Installation

npm install @harmonyhub/client-ws --save

Enhancements

Enhancements over the harmonyhubjs-client package are the following

  • added typings to the harmonyhub response data for easing development with typescript
  • switch to the harmony service running on websockets (compatible to the xmpp version)
  • rewrite to class style
  • replacement of Q library with native nodejs Promises (dep reduction) also means that if you switch from harmonyhubjs-client package to mine you need to adjust how you are dealing with your promises (switch to official spec)
  • update of dependencies to newer packages (0 security issues by npm audit)
  • incorporation of @patters bug fix of MAX_CLIENTS=6 error

Usage

The following examples are available in the example folder and are written in modern javascript with async/await utilization.

  • discover-connect - discover and and connect to hubs on the network
  • toggleTvActivity - toggles 'Watch TV' activity and off
  • printFunctions - prints out all available devices and their names together with all commands availbale for a 'Television' device
  • stateDigest - shows how to listen on stateDigest events from the hub

Debug Traces

@harmonyhub/client-ws uses debug for generating traces throughout its execution time. Activate them by setting the DEBUG environment variable:

$ DEBUG=harmonyhub:client-ws* node example.js

Current Tags

  • 1.0.4                                ...           latest (a year ago)

5 Versions

  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 5
This Month 5
Last Day 0
Last Week 0
Last Month 1
Dependencies (5)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |