GithubHelp home page GithubHelp logo

ptz0n / node-verisure Goto Github PK

View Code? Open in Web Editor NEW
24.0 7.0 3.0 191 KB

A module for reading and changing status of Verisure devices.

Home Page: https://www.npmjs.com/package/verisure

License: MIT License

JavaScript 98.40% Makefile 1.60%
node verisure

node-verisure's Introduction

node-verisure

GitHub Actions badge

A module for reading and changing status of Verisure devices.

Legal Disclaimer

This software is not affiliated with Verisure Holding AB and the developers take no legal responsibility for the functionality or security of your alarms and devices.

Installation

$ npm install verisure --save

Usage

const Verisure = require('verisure');

const verisure = new Verisure('[email protected]', 'mysecretpassword');

verisure.getToken()
  .then(() => verisure.getInstallations())
  .then((installations) => installations[0].client({
    operationName: 'Broadband',
    query: `query Broadband($giid: String!) {
      installation(giid: $giid) {
        broadband {
          testDate
          isBroadbandConnected
          __typename
        }
        __typename
      }
    }`,
  }))
  .then((broadband) => {
    console.log('BROADBAND:', broadband);
  })
  .catch((error) => {
    console.error(error);
  });

Multi-factor authentication

For users with MFA enabled, you need to invoke getToken twice. First without arguments, second with the one-time code.

const verisure = new Verisure(email, password);

await verisure.getToken();

console.log('One-time code sent.');

await verisure.getToken(code);

console.log(verisure.cookies);

Once you retrieve the cookies, these can be used to make authenticated requests.

const verisure = new Verisure('[email protected]', null, [
  'vid=myTopSecretToken',
  'vs-access=myAccessToken',
  'vs-refresh=myRefreshToken'
]);

const installations = await verisure.getInstallations();

node-verisure's People

Contributors

greenkeeper[bot] avatar ptz0n avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-verisure's Issues

Change status on device?

Not really an issue with your code but more about me :)
Im playing around with your code and have gotten the example working. Now I want to change lock/unlock a door. But don't really get how to update a device status. Probably just me being a noob at this but would really glad if you could post a sample of doing a change to an item.

Thanks for your help

An in-range update of nock is breaking the build 🚨

Version 9.5.0 of nock was just published.

Branch Build failing 🚨
Dependency nock
Current Version 9.4.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

nock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes v9.5.0

9.5.0 (2018-08-07)

Features

  • encode an expected buffer the same way when matching as the client (c584f7a)
Commits

The new version differs by 3 commits.

  • 50ab208 test: new SSL certificates for local testing (#1181)
  • b29a0e4 docs: add buffer request body to README
  • c584f7a feat: encode an expected buffer the same way when matching as the client

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Calling twice gives error from verisure

Making a node-red wrapper on top of this. Works first time around, when calling the second time to fetch status i get the error below:

"UNAUTHORIZEDAUT_00041Cannot use both basic authentication and cookie authentication."

Get Overview? Change Armstate in version 5

Hi!
Love your work man. It has been running solid for a long time. Now I want to try the version 5 out.
Im struggling thou to understand how to get it working.

Your example is about broadband but if I would like to say:

  1. Get Alarm State (previous found under getOverview on installation
  2. Put new state to the Alarm

How can that be done?
Thanks for your help

An in-range update of eslint-plugin-jest is breaking the build 🚨

The devDependency eslint-plugin-jest was updated from 22.13.0 to 22.13.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-jest is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v22.13.1

22.13.1 (2019-07-22)

Bug Fixes

Commits

The new version differs by 23 commits.

  • 6cbaa0f chore(prefer-todo): migrate to TS (#335)
  • ed2a0f6 fix(valid-describe): ignore describe.each (#337)
  • d0a8428 chore(no-test-callback): migrate to TS (#321)
  • ccbe766 chore(prefer-strict-equal): migrate to TS (#329)
  • ee81058 chore(no-test-prefixes): migrate to TS (#328)
  • e938636 chore(consistent-test-it): migrate to TS (#327)
  • 26ddedd chore(expect-expect): migrate to TS (#325)
  • 4200e76 chore(prefer-spy-on): migrate to TS (#326)
  • 3a22ef1 chore(no-if): migrate to TS (#324)
  • 4270fca chore(no-export): migrate to TS (#323)
  • 12e601a chore(no-hooks): migrate to TS (#322)
  • f3c654c chore(no-focused-tests): migrate to TS (#314)
  • c455100 chore(prefer-inline-snapshots): migrate to TS (#319)
  • 41ed53a chore(no-duplicate-hooks): migrate to TS (#318)
  • 384b788 chore(no-test-return-statement): migrate to TS (#320)

There are 23 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-jest is breaking the build 🚨

The devDependency eslint-plugin-jest was updated from 22.9.0 to 22.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-jest is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v22.10.0

22.10.0 (2019-07-17)

Features

Commits

The new version differs by 7 commits.

  • 28bd1dc feat(rules): adds no-if rule (#293)
  • 7ebdc0e chore: enforce import destructure order
  • 31c7cef chore: convert to import/export (#302)
  • 9f858cb chore: delete tests instead of ignoring them with babel
  • c595ba0 chore: do not include tests in published tarball
  • 4b4eb78 chore: fix lint error in md file
  • d3ea720 chore(docs): fix typo (#304)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of axios is breaking the build 🚨

The dependency axios was updated from 0.19.0 to 0.19.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

axios is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 47 commits.

  • 960e1c8 Releasing 0.19.1
  • 8a9421d Fixing typo in CHANGELOG.md: s/Functionallity/Functionality (#2639)
  • ee47120 If this place is false, it will report an error, so you should delete the useless code. (#2458)
  • 03e6f4b Fixing invalid agent issue (#1904)
  • dc4bc49 fix: fix ignore set withCredentials false (#2582)
  • 13c948e Remove 'includes' API, fix CI build failure (#2574)
  • fa6cf01 fixing Travis link (#2540)
  • a17c70c Fix CI build failure (#2570)
  • 1a32ca0 Remove dependency on is-buffer (#1816)
  • 0cc22c2 Fix badge, use master branch (#2538)
  • 8414664 Fix XSS logic that matched some valid urls (#2529)
  • bbfd5b1 Adding options typings (#2341)
  • 55aaebc Document fix (#2514)
  • 86d7750 Update docs with no_proxy change, issue #2484 (#2513)
  • b0afbed Adding Typescript HTTP method definition for LINK and UNLINK. (#2444)

There are 47 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of mocha is breaking the build 🚨

Version 3.4.0 of mocha just got published.

Branch Build failing 🚨
Dependency mocha
Current Version 3.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mocha is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v3.4.0

Mocha is now moving to a quicker release schedule: when non-breaking changes are merged, a release should happen that week.

This week's highlights:

  • allowUncaught added to commandline as --allow-uncaught (and bugfixed)
  • warning-related Node flags

πŸŽ‰ Enhancements

πŸ› Fixes

πŸ”© Other

Commits

The new version differs by 9 commits0.

  • 7554b31 Add Changelog for v3.4.0
  • 9f7f7ed Add --trace-warnings flag
  • 92561c8 Add --no-warnings flag
  • ceee976 lint test/integration/fixtures/simple-reporter.js
  • dcfc094 Revert "use semistandard directly"
  • 93392dd no special case for macOS running Karma locally
  • 4d1d91d --allow-uncaught cli option
  • fb1e083 fix allowUncaught in browser
  • 4ed3fc5 Add license report and scan status

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-jest is breaking the build 🚨

The devDependency eslint-plugin-jest was updated from 22.5.1 to 22.6.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-jest is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v22.6.0

22.6.0 (2019-05-22)

Features

Commits

The new version differs by 9 commits.

  • 14d83ef feat(rules): add no-commented-out rule (#262)
  • 83ff198 chore: migrate no-jest-import to typescript (#259)
  • 718c08c chore: upgrade @typescript-eslint
  • ca2aa27 chore: port lowercase-name to TypeScript (#258)
  • 3df0058 chore(ci): run danger with lts version of node
  • 48e3a59 chore: precompile with babel (#257)
  • 8670804 chore: bump deps
  • 05eb11a chore: fix lint error
  • dff6446 docs: link to eslint-plugin-jest-formatting

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Unlock/Lock door

Is it possible to unlock or lock the door with this module?
If not, can this be a feature?

Regards Thomas

An in-range update of nock is breaking the build 🚨

The devDependency nock was updated from 10.0.0 to 10.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v10.0.1

10.0.1 (2018-10-09)

Bug Fixes

  • package: update debug to version 4.1.0 (0c807c9), closes #1214
Commits

The new version differs by 12 commits.

  • 3131313 Merge pull request #1238 from nock/greenkeeper/debug-4.1.0
  • 0c807c9 fix(package): update debug to version 4.1.0
  • 539d244 test: add comments to all tests that use airplane setting (#1237)
  • e226c65 docs: clean up debugging section
  • 7e70d9a docs: Delete sections duplicated in CONTRIBUTING
  • 43cf093 docs: move PROTIP elsewhere
  • 7498574 docs: remove empty spaces
  • 6b632d5 Merge pull request #1225 from nock/node-version-support
  • 8592632 ci(stale): set number of actions to 30 (default)
  • cbd2670 docs(README): Node version support
  • e6d885f ci(travis): coverage upload
  • f12cda7 ci(package): coverage

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Documentation

Where do I found documentation for Verisure.
For example, how do I find out how I unlock the door lock?

An in-range update of request is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 2.84.0 of request was just published.

Branch Build failing 🚨
Dependency request
Current Version 2.83.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

request is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 6 commits.

  • d77c839 Update changelog
  • 4b46a13 2.84.0
  • 0b807c6 Merge pull request #2793 from dvishniakov/2792-oauth_body_hash
  • cfd2307 Update hawk to 7.0.7 (#2880)
  • efeaf00 Fixed calculation of oauth_body_hash, issue #2792
  • 253c5e5 2.83.1

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Please add examples

As per subject, pls add examples for reading and changing status of Verisure devices.

Homebridge plugin?

Hey,

Have you thought about packaging this up as a homebridge plugin...would be super awesome.

Or perhaps you have some instructions for how to get it working as is? I'd be happy to help test it for you

Im looking for a way to trigger the lights on and off when the alarm state changes.

Ben

An in-range update of eslint-plugin-jest is breaking the build 🚨

The devDependency eslint-plugin-jest was updated from 22.3.0 to 22.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-jest is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v22.3.1

22.3.1 (2019-03-12)

Bug Fixes

  • no-identical-title: not reporting when using backticks (#237) (4f8ef6d), closes #232
Commits

The new version differs by 3 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.