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

How to use
Active
function
in
Characteristic

Best JavaScript code snippets using hap-nodejs.Characteristic.Active(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)CharacteristicActive

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

  • commander
    the complete solution for node.js command-line programs
  • handlebars
    Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
  • mongodb
    The official MongoDB driver for Node.js
  • rimraf
    A deep deletion module for node (like `rm -rf`)
  • express
    Fast, unopinionated, minimalist web framework
  • lodash
    Lodash modular utilities.
  • ws
    Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js
  • body-parser
    Node.js body parsing middleware
  • yargs
    yargs the modern, pirate-themed, successor to optimist.
  • Top plugins for Android Studio
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