homebridge-applescript-file-lightbulb
Applescript plugin for homebridge: https://github.com/nfarina/homebridge
Last updated 3 years ago by bendodson .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install homebridge-applescript-file-lightbulb 
SYNC missed versions from official npm registry.

homebridge-applescript-file-lightbulb

A homebridge lightbulb accessory that can trigger specific AppleScript files

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-applescript-file-lightbulb
  3. Update your configuration file. See sample-config.json in this repository for a sample.

Configuration

Configuration sample:

"accessories": [
    {
        "accessory": "ApplescriptFileLightbulb",
        "name": "iTunes Volume",
        "on": "",
        "off": "",
        "brightness": "/Users/bendodson/Documents/Scripts/musicVolume.applescript"
    }
]

Note that you must use absolute paths for your AppleScript file.

In this example I'm just using the "brightness" attribute in order to change the volume of iTunes although you can specify on / off states should you want to do something like pause or resume iTunes with the same accessory. An example of a volume control AppleScript is listed below:

on run argv
    set v to item 1 of argv
    activate application "iTunes"
    tell application "iTunes"
        set sound volume to v
    end tell
end run

Credits

My thanks to Dan Budiac for his original homebridge-applescript plugin from which this is based.

Current Tags

  • 0.0.5                                ...           latest (3 years ago)

4 Versions

  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |