Socket
Socket
Sign inDemoInstall

@harmonyhub/client-ws

Package Overview
Dependencies
113
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @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.


Version published
Maintainers
1
Created

Readme

Source

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

Keywords

FAQs

Last updated on 27 Oct 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc