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

tinkerhub-bridge-zwave

v0.1.0

Published

Bridge Z-wave devices into a Tinkerhub network

Downloads

6

Readme

Z-wave Device Bridge for Tinkerhub

This module provides support for creating a Z-wave network using
openzwave-shared and bringing those devices into Tinkerhub.

As this module only exposes generic Z-wave devices you probably want to combine it with other modules that expose user friendly interfaces to the Z-wave devices.

  • Latest version: 0.1.0
  • Status: Unstable

Installation and setup

You will need to install OpenZWave, see Prerequisites in the openzwave-shared README and a compatible controller.

When running tinkerhubd install via:

$ tinkerhubd install bridge-zwave

This will make the bridge available for configuration, the type of the bridge device is zwave:bridge. The easiest way to configure it is by using the CLI:

$ tinkerhub
> type:zwave:bridge connect /dev/ttyACM0
 SUCCESS zwave:bridge:ix77x0i92jyi
  configured: true
  connected: true

Make sure that Node has read and write permissions to your USB-device.

Adding Z-wave devices

Call addDevice on the bridge add a device.

$ tinkerhub
> type:zwave:bridge addDevice
 SUCCESS zigbee:bridge:ix77x0i92jyi
  Press inclusion/action button on device to pair

As soon as the bridge sees the device it will be made available as a new device of type zwave.

Extending devices

This module provides simple access to the Z-wave protocol and devices need to be extended to do something useful.

th.get('type:zwave')
  .extendWith(thing => thing.zwaveInspect()
    .then(data => {
      // Check for required Z-wave classes here
      if(! dataHasNeededClasses) return;

      return new CustomDevice(thing).init();
    })
  );

Actions and events

Action: zwaveInspect

Inspect the device, returning information about it and its classes. This is useful for figuring out if a device should be enhanced and for manually inspecting the data structure when building device extensions.

Action: zwaveValues(classId, [instance])

Fetch all values for the given class optionally limiting them to a specific instance.

Action: zwaveGetValue(classId, instance, index)

Read a single value in the given class and instance.

Action: zwaveGetValues(values)

Read several values at once. values is an array with object such as:

{
	classId: 30,
	instance: 1,
	index: 0
}

Action: zwaveSetValue(classId, instance, index, value)

Set a value for the given class and instance.

Event: zwave:value

Emitted when a value on the device is reported to have changed. Data is an object with the following keys:

  • classId
  • instance
  • index
  • oldValue
  • newValue

Event: zwave:event

Emitted when the Z-wave device reports an event. Data is specific to the device emitting the event.