Codota Logo For Javascript
OTHER
Code IndexAdd Codota to your IDE (free)

How to use
OTHER
function
in
hap-nodejs

Best JavaScript code snippets using hap-nodejs.OTHER(Showing top 2 results out of 315)

origin: rdmtc/RedMatic-HomeKit

accessory(config) {
      const uuid = hap.uuid.generate(config.id + (config.uuidAddition ? config.uuidAddition : ''));
      let acc;

      this.bridge.bridgedAccessories.forEach(a => {
        if (a.UUID === uuid) {
          acc = a;
        }
      });

      if (acc) {
        this.debug('already existing accessory ' + config.id + ' ' + config.name);
      } else if (this.bridge.bridgedAccessories.length >= 150) {
        this.error('maximum of 150 accessories per bridge exceeded, can\'t add ' + config.id + ' ' + config.name);
      } else {
        this.debug('addAccessory ' + config.id + ' ' + config.name);
        acc = new hap.Accessory(config.name, uuid, hap.Accessory.Categories.OTHER);
        this.bridge.addBridgedAccessory(acc);
      }

      this.waitForAccessories();

      return acc;
    }
origin: rdmtc/RedMatic-HomeKit

  port: parseInt(this.port, 10),
  pincode: this.pincode,
  category: hap.Accessory.Categories.OTHER
}, this.allowInsecureRequest);
this.log('published bridge (' + this.bridge.bridgedAccessories.length + ' Accessories) ' + this.name + ' ' + this.username + ' on port ' + this.port);
hap-nodejs(npm)OTHER

Most used hap-nodejs functions

  • Accessory.Categories
  • Accessory._server
  • Accessory.on
  • Accessory.publish
  • CAMERA
  • Characteristic.ActiveIdentifier,
  • Characteristic.CONFIGURED,
  • Characteristic.ConfiguredName,
  • Characteristic.CurrentRelativeHumidity,
  • Characteristic.CurrentVisibilityState,
  • Characteristic.FirmwareRevision,
  • Characteristic.Identifier,
  • Characteristic.InputSourceType,
  • Characteristic.IsConfigured,
  • Characteristic.Manufacturer,
  • Characteristic.Model,
  • Characteristic.On,
  • Characteristic.PowerModeSelection,
  • Characteristic.ProgrammableSwitchEvent

Popular in JavaScript

  • ws
    Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js
  • lodash
    Lodash modular utilities.
  • commander
    the complete solution for node.js command-line programs
  • aws-sdk
    AWS SDK for JavaScript
  • winston
    A logger for just about everything.
  • moment
    Parse, validate, manipulate, and display dates
  • mkdirp
    Recursively mkdir, like `mkdir -p`
  • mocha
    simple, flexible, fun test framework
  • debug
    small debugging utility
  • Top plugins for WebStorm
    The challenge is finding the best plugins for JavaScript development on Intellij IDEs. Who wants to sit there and go over hundreds of plugins to pick the best?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJavascript Code Index
Get Codota for your IDE now