README.md 2.4 KB
Newer Older
Dan Walters's avatar
Dan Walters committed
1 2 3 4 5
augustctl
=========

A node.js module to operate an [August Smart Lock](http://www.august.com/), via BLE.

6 7 8
**This is not developed or officially support by August, it works for me but use at your own risk!**

## Prerequisties
Dan Walters's avatar
Dan Walters committed
9 10 11 12 13 14 15

Same as for [noble](https://github.com/sandeepmistry/noble).

On Linux, you will need [bluez 5](http://www.bluez.org/).

Also tested and working on OSX Yosemite.

16
## Install
Dan Walters's avatar
Dan Walters committed
17

18
	npm install -g augustctl
Dan Walters's avatar
Dan Walters committed
19

20 21
## Configuration

22
It's necessary to have an `offlineKey` and corresponding `offlineKeyOffset` that are recognized by your lock.  These should placed in a `config.json` file, which should be in your current directory when you run `augustctl`.
23

24
### Android Phone (with Root)
25

26
If the phone is rooted, you can copy the `/data/data/com.august.luna/shared_prefs/PeripheralInfoCache.xml` file from your phone to your computer.  Many file manager apps, or an adb shell, will let you access it, as long as your phone is rooted.
27

28
Open the `PeripheralInfoCache.xml` file and find the `handshakeKey` and `handshakeKeyIndex` strings. Copy the strings that follow those (excluding the `"` bits) into a config.json file formatted like so:
29

30
	{ "offlineKey": "handshakeKey", "offlineKeyOffset": handshakeKeyIndex }
31 32 33 34

The configuration file location can be explicitly set via the AUGUSTCTL_CONFIG environment variable.

### Android Phone (without Root)
35

36
The latest August app no longer exposes the offline keys. Rooting is required.
Dan Walters's avatar
Dan Walters committed
37

38
### iPhone
Dan Walters's avatar
Dan Walters committed
39

40
The key and offset can be found in plist located at:
Dan Walters's avatar
Dan Walters committed
41

42
    User Applications/August/Library/Preferences/com.august.iossapp.plist
Dan Walters's avatar
Dan Walters committed
43

44
This can be retrieved by using a file explorer like [http://www.i-funbox.com/ifunboxmac/](iFunBox), and opening the plist in Xcode.
45

46 47 48 49
Alternatively, you can enter the debug mode in the application by long pressing the application version number, entering the password (like in Android, it is `KryspyKym`) and e-mailing yourself the application logs.  Search those logs for "offline", and you'll find the key and slot that are used by your device.

Note that the key and slot will be all that is necessary to open your lock, so it's not advisable to leave those logs laying around in your e-mail account.

50 51 52
## Usage

Assuming you've configured your offline key and offset, as above, just:
Dan Walters's avatar
Dan Walters committed
53 54 55

	augustctl unlock
	augustctl lock
56 57 58 59 60 61 62 63 64 65

That's it!

Alternatively, a simple HTTP API server is available.  From a checked out installation:

    npm start

## License

[MIT](LICENSE)