Tabnine Logo For Javascript
OTHER
Code IndexAdd Tabnine 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

  • request
    Simplified HTTP request client.
  • winston
    A logger for just about everything.
  • async
    Higher-order functions and common patterns for asynchronous code
  • mongodb
    The official MongoDB driver for Node.js
  • node-fetch
    A light-weight module that brings window.fetch to node.js
  • ms
    Tiny millisecond conversion utility
  • mkdirp
    Recursively mkdir, like `mkdir -p`
  • readable-stream
    Streams3, a user-land copy of the stream library from Node.js
  • semver
    The semantic version parser used by npm.
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now