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

ryobi-gdo

v0.0.1

Published

Unofficial Ryobi Garage Door Opener API

Downloads

2

Readme

Ryobi GDO

Unofficial Ryobi garage door opener API.

Open/Close your Ryobi garage door from anywhere.

Supported Garage Doors

  • GD200
  • GD201

Easy to use

const gdo = require('ryobi-gdo')
await gdo.login('myUsername', 'myPassword')
await gdo.connect()

// Find your door id
const devices = await gdo.getDevices()
const myDoorId = devices[0].varName

//Now we can send commands
await gdo.openDoor(myDoorId)
await gdo.closeDoor(myDoorId)

Also provides helper functions to get more information

const gdo = require('ryobi-gdo')
await gdo.login('myUsername', 'myPassword')

// Must be authenticated but do not need to be connected
const doorStatus = await gdo.getDoorStatus() // { open: false, state: 'Opening' }

API

ryobi-gdo exposes the following functions

Login

Used to login to the ryobi gdo service. Must be called before any other operations can be performed

await ryobi-gdo.login(username, password)

example response

{
  apiKey: '123456ab`, // *WARNING* Yes your API key is 8 characters long and never expires
  username: 'username',
  password: 'password'
}

connect

Used to connect to the ryobi gdo service command websocket. Used to send commands to a garage door. Connection is not needed for status requests.

await ryobi-gdo.connect()

openDoor

Open the door! Promise resolves when command has been sent, not when door has been opened. Call getDoorStatus to check if door is open.

await openDoor('doorId')

closeDoor

Close the door! Promise resolves when command has been sent, not when door has been closed. Call getDoorStatus to check if door is closed.

await closeDoor('doorId')

turnOnLight

turnOffLight

getDevices

Get a list of supported garage door openers. varName is the "doorId"

const devices = await getDevices()

example response

[
  {
    _id: '5e7c1c1ac0aac10c3f2b50b0',
    varName: 'a1bc2345d6e7',
    metaData: {
      sys: [Object],
      authCount: 236,
      wskAuthAttempts: [Array],
      description: 'RYOBI Connected Garage Door Opener Master Unit',
      icon: '/img/devices/gdo.png',
      version: 1,
      name: 'Garage',
      socketId: '19d93b923bx92b2981b21982918n298ns12',
      maxPostion: 95,
      minPosition: 0
    },
    enabled: true,
    deleted: false,
    createdDate: '2019-05-16T16:05:43.860Z',
    activated: 2,
    deviceTypeIds: [ 'GD201' ],
    activatedDate: '2019-05-17T04:00:01.720Z'
  }
]

getDoorStatus

Get the current status of a garage door opener

const status = await getDoorStatus('doorId')

example response

{ open: true, state: 'Opening' } // Possible states: [ 'Closed', 'Open', 'Closing', 'Opening', 'Fault' ]

getLightStatus

Get the current status of a garage door light

const status = await getLightStatus('doorId')

example response

{ on: true, state: 'On' }