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

gza-core-libs

v1.0.1

Published

Collection of device converters to be used with gza-core

Downloads

9

Readme

NPM

gza-core-libs

Collection of device converters to be used with gza-core.

Breaking changes

18.0.0

  • After converting a message with a fromZigbee converter, postProcessConvertedFromZigbeeMessage should be called now (for applying calibration/precision)

17.0.0

  • Various methods in index.ts are now async and return a Promise

15.0.0

  • OTA isUpdateAvailable now returns an object instead of a boolean (e.g. {available: true, currentFileVersion: 120, otaFileVersion: 125})
  • OTA updateToLatest now returns a number (fileVersion of the new OTA) instead of a void

Contributing

See Zigbee2MQTT how to support new devices.

Submitting a pull request

If you'd like to submit a pull request, you should run the following commands to ensure your changes will pass the tests:

npm install
npm run lint
npm run build
npm test

If any of those commands finish with an error your PR won't pass the tests and will likely be rejected.

Documentation of definition meta property

  • multiEndpoint: enables the multi endpoint functionality in e.g. fromZigbee.on_off, example: normally this converter would return {"state": "OFF"}, when multiEndpoint is enabled the 'endpoint' method of the device definition will be called to determine the endpoint name which is then used as key e.g. {"state_left": "OFF"}. Only needed when device sends the same attribute from multiple endpoints. (default: false)
  • multiEndpointSkip: array of attributes to not suffix with the endpoint name
  • multiEndpointEnforce: enforce a certain endpoint for an attribute, e.g. {"power": 4} see utils.enforceEndpoint()
  • disableDefaultResponse: used by toZigbee converters to disable the default response of some devices as they don't provide one. (default: false)
  • applyRedFix: see toZigbee.light_color (default: false)
  • supportsEnhancedHue: see toZigbee.light_color (default: true)
  • supportsHueAndSaturation: see toZigbee.light_color (default: true), usually set by light_* extends via options.
  • timeout: timeout for commands to this device used in toZigbee. (default: 10000)
  • coverInverted: Set to true for cover controls that report position=100 as open (default: false)
  • coverStateFromTilt: Set cover state based on tilt
  • turnsOffAtBrightness1: Indicates light turns off when brightness 1 is set (default: false)
  • pinCodeCount: Amount of pincodes the lock can handle
  • disableActionGroup: Prevents some converters adding the action_group to the payload (default: false)
  • tuyaThermostatSystemMode/tuyaThermostatPreset: TuYa specific thermostat options
  • thermostat: see e.g. HT-08 definition
    • {dontMapPIHeatingDemand: true}: do not map pIHeatingDemand/pICoolingDemand from 0-255 -> 0-100, see fromZigbee.thermostat (default: false)
  • battery:
    • {dontDividePercentage: true}: prevents batteryPercentageRemaining from being divided (ZCL 200=100%, but some report 100=100%) (default: false)
    • {voltageToPercentage: '3V_2100'}: convert voltage to percentage using specified option. See utils.batteryVoltageToPercentage() (default: null, no voltage to percentage conversion)