andreyoshev / homebridge-blinds-cmd

:sunrise: Homebridge plugin to enable window blinds to be controlled by executing a command line.

Home Page:https://www.npmjs.com/package/homebridge-blinds-cmd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

homebridge-blinds-cmd

homebridge-blinds-cmd is a plugin for Homebridge that allows you to open or close your window blinds by executing a given command line.

Control your blinds via Homebridge by executing specific command lines for opening or closing.

Installation

If you are new to Homebridge, please first read the Homebridge documentation. If you are running on a Raspberry, you will find a tutorial in the homebridge-punt Wiki.

Install homebridge:

sudo npm install -g homebridge

Install homebridge-blinds-cmd:

sudo npm install -g homebridge-blinds-cmd

Configuration

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

   {
      "accessory": "BlindsCMD",
      "manufacturer": "Somfy",
      "model": "Sonesse",
      "serial": "1234",
      "name": "Downstairs Window Blinds",
      "up_cmd": "/path/to/your/raise_blinds_script",
      "down_cmd": "/path/to/your/lower_blinds_script",
      "state_cmd": "/path/to/your/blinds_state_script",
    }

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). Some blinds, such as Somfy, don't support querying their specific state.

A sample control script for Somfy is included. This script is provided as an example of what is possible. Your mileage may vary - this script was tested on a Mac and should work on other platforms, best of luck. It assumes the use of a Somfy URTSI attached to an iTach Flex) via serial. The script is fairly robust and allows for multiple URTSI scenarios including multiple URTSIs and shade groups.

This script is based on Robin Temme's excellent homebridge-blinds plugin, and I have merely adapted and updated it to support executing a script instead of calling URLs for opening and closing blinds. Feel free to contribute to make this a better plugin!

About

:sunrise: Homebridge plugin to enable window blinds to be controlled by executing a command line.

https://www.npmjs.com/package/homebridge-blinds-cmd

License:ISC License


Languages

Language:JavaScript 52.6%Language:Perl 47.4%