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

homebridge-blinds-servo

v1.1.3

Published

Homebridge plugin to control blinds via a servo attached to a Raspberry Pi

Downloads

12

Readme

homebridge-blinds-servo

homebridge-blinds-servo is a plugin for Homebridge that allows you to open or close your window blinds using a servo connected to a Raspberry Pi.

Installation

Install homebridge-blinds-servo:

sudo npm install -g homebridge-blinds-servo

Configuration

Add the accessory in config.json in your home directory inside .homebridge.

   {
      "accessory": "ServoBlinds",
      "name": "Dining Room Centre Blinds",
      "gpio_pin": 22,
      "servo_min": 4,
      "servo_max": 11,
      "servo_time": 1,
      "intial_position": 100
    }

There are also a number of optional configurations you can set.

      "exclusive": true,
      "relayPin": 27,
      "debug": true

Configuration

| Parameter | Type | Default | Note | |-----------|------|---------|------| | name | String | N/A | Name of the blind| | gpio_pin| Integer | N/A | Pin that controls the servo (BCM layout) | | servo_min | Float | N/A | The duty cycle to give the 0% position for the blind | | servo_max | Float | N/A | The duty cycle to give the 100% position for the blind | | servo_time | Float | 1 | The time to move the servo | | intial_position | Integer | 0 | The initial position when homebridge initialises Note: the blind will not be moved to this position, it is just what homebridge will see as the position when it initialises. | | exclusive | Boolean | False | Flag if the command script should run sequencial rather than in parallel; this is useful if you don't have enough power to control all of the servos at the same time | | relayPin | Integer | None | If set the script will trigger a relay before moving the servo; this is useful if you are powering the servo via batteries to stop idle draining. | | debug | Boolean | False | Enable the debugging mode which give more output in the homebridge log | | moveCmd | String | servoDriver.py | The command to call to move the servo; for more info see below |

moveCmd

The plugin calls a script when a request to move the blinds is recieved. By default this script is a built in python script, but this can be modified by the moveCmd configuration option to use a custom script. The plugin will call this command in the following format:

(moveCmd) servoPin pos minLimit maxLimit servoTime [-e] [-r relayPin]

For example the build in script is called as:

servoDriver.py servoPin pos minLimit maxLimit servoTime [-e] [-r relayPin]

Hardware Setup

I will add a guide to setting up the hardware soon.

Note

This plugin doesn't query nor have direct knowledge of the actual position of your blinds. Instead, it emulates the position based on your most recent request to raise / lower the blinds (i.e. it remembers what you last asked it to do and reports that back to HomeKit).

This script is based on Robin Temme's excellent homebridge-blinds plugin and hjdhjd's modifications, and I have added to it to allow controlling a servo attached to the blinds.