Tabnine Logo For Javascript
Characteristic.ActiveIdentifier
Code IndexAdd Tabnine to your IDE (free)

How to use
ActiveIdentifier
function
in
Characteristic

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

origin: rdmtc/RedMatic-HomeKit

this.on('close', () => {
        this.debug('remove event listeners');

        tvService.getCharacteristic(Characteristic.Active)
          .removeListener('set', setActive);

        tvService.getCharacteristic(Characteristic.ActiveIdentifier)
          .removeListener('set', setActiveIdentifier);

        tvService.getCharacteristic(Characteristic.RemoteKey)
          .removeListener('set', setRemoteKey);

        tvService.getCharacteristic(Characteristic.PowerModeSelection)
          .removeListener('set', setPowerModeSelection);

        speakerService.getCharacteristic(Characteristic.VolumeSelector)
          .removeListener('set', setVolumeSelector);
      });
origin: rdmtc/RedMatic-HomeKit

this.on('input', msg => {
        switch (msg.topic) {
          case 'InputSource': {
            let identifier = msg.payload;
            if (typeof msg.payload === 'string') {
              config.inputsources.forEach((src, i) => {
                if (msg.payload === src.name) {
                  identifier = i + 1;
                }
              });
            }

            if (config.inputsources[identifier - 1]) {
              this.debug('set ActiveIdentifier ' + identifier + ' (payload was ' + msg.payload + ')');
              this.status({shape: 'dot', fill: 'blue', text: config.inputsources[identifier - 1].name});
              tvService.updateCharacteristic(Characteristic.ActiveIdentifier, identifier);
            }

            break;
          }

          default:
            this.debug('set Active ' + msg.payload);
            this.status({shape: msg.payload ? 'dot' : 'ring', fill: msg.payload ? 'blue' : 'grey'});
            tvService.updateCharacteristic(Characteristic.Active, msg.payload ? 1 : 0);
        }
      });
hap-nodejs(npm)CharacteristicActiveIdentifier

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

  • crypto
  • mongodb
    The official MongoDB driver for Node.js
  • express
    Fast, unopinionated, minimalist web framework
  • qs
    A querystring parser that supports nesting and arrays, with a depth limit
  • node-fetch
    A light-weight module that brings window.fetch to node.js
  • request
    Simplified HTTP request client.
  • superagent
    elegant & feature rich browser / node HTTP with a fluent API
  • fs-extra
    fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.
  • yargs
    yargs the modern, pirate-themed, successor to optimist.
  • 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