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

node-blink-security

v4.1.5

Published

A NodeJS module for the Blink Security Camera System

Downloads

111

Readme

Build Status Downloads Downloads npm version dependencies dev dependencies License

node-blink-security

This is a Node.js version of this python library. It allows to communicate with Blink Home Security System from a Node.js application.

Installation

npm install node-blink-security

Usage

const Blink = require('node-blink-security');

var blink = new Blink('YOUR_EMAIL', 'YOUR_PASSWORD', 'DEVICE_ID');
blink.setupSystem()
  .then(() => {
    blink.setArmed()
      .then(() => {
        // see the object dump for details
        console.log(blink);
      });
  }, (error) => {
    console.log(error);
  });

API

class Blink

Constructor

  • email - your Blink account email
  • password - your Blink account password
  • deviceId - identifies your device and registers it in your account. It's required since version 4.0.0 of this package as this is when Blink switched to 2-factor authentication flow. The value is provided by you and it should let you identify the device correctly when you receive a verification email from Blink.
  • options
    • auth_2FA: false - set to true if you want to receive verification code for each login, otherwise you'll receive verification email only once for the first time and after that the device will be remembered by Blink.
    • verification_timeout: 60000 - number of milliseconds to wait for email verification until retrying account login
    • device_name: "node-blink-security" - this name appears in verification email along with your deviceId

Properties

  • blink.cameras - the information about all available cameras
  • blink.idTable - {cameraId:cameraName} map for further references
  • blink.networks - map of configured networks (sync modules)
  • blink.accountId - account id
  • blink.region - region (e.g. prod)
  • blink.regionId - region (e.g. United States)

Methods

  • blink.refresh - get all blink cameras and pulls their most recent status
  • blink.getSummary - get a full summary of system information, broken down by sync module
  • blink.getCameraThumbs - refresh all cameras thumbnails
  • blink.getVideos(page, Date) - get metadata for X (per page is unknown) videos recorded since Date. Paginate with page parameter
  • blink.getEvents - get all events from Blink server (e.g. heartbeats, motion...), by sync module
  • blink.isOnline - return boolean system online status, by sync module
  • blink.getLastMotions - refresh motion events data
  • blink.isArmed() - return boolean statuses of all sync modules: armed(true)/disarmed(false).
  • blink.setArmed(boolean, [networkIds]) - arm/disarm the system/specific set of sync modules; true by default
  • blink.getCameras - find and creates cameras; used for internal purposes
  • blink.getLinks - set access links and required headers for each camera in system; used for internal purposes
  • blink.setupSystem([system name or id]) - logs in and sets auth token, urls, and ids for future requests. Specify a system identifier if you have more than one system setup.
  • blink.getIDs - set the network IDs and Account ID; used for internal purpose
  • blink.getClients - get information about devices that have connected to the system
class BlinkCamera

Properties

  • blinkCamera.id - camera id
  • blinkCamera.name - camera name
  • blinkCamera.region_id - region id
  • blinkCamera.armed - camera arm status
  • blinkCamera.clip - current clip
  • blinkCamera.thumbnail - current thumbnail
  • blinkCamera.temperature - camera temperature
  • blinkCamera.battery - battery level
  • blinkCamera.notifications - number of notifications
  • blinkCamera.image_link - image link
  • blinkCamera.arm_link - link to arm camera
  • blinkCamera.header - request header
  • blinkCamera.motion - last motion event detail
  • blinkCamera.updated_at - last device update date
  • blinkCamera.network_id - camera's assigned sync module id (network id)

Methods

  • blinkCamera.snapPicture - take a picture with camera to create a new thumbnail
  • blinkCamera.setMotionDetect(boolean) - set motion detection
  • blinkCamera.update - update camera information; internal use
  • blinkCamera.imageRefresh - refresh current thumbnail
  • blinkCamera.fetchImageData - get the image data for the camera's current thumbnail
  • blinkCamera.recordClip - record video clip from the camera

License

MIT

This is awesome!

If you find this package helpful you can buy me a beer Donate