Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move ble component #7

Merged
merged 1 commit into from
Aug 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ The compiled JAR is now in `daemon-doorlock/target/doorlock-<version>-standalone

**Runtime Dependencies:**

* Java 8
* java
* wiringpi-git (AUR)

**Install as systemd service:**
Expand All @@ -106,21 +106,25 @@ Running this service, the rpi would act as peripheral and advertise. You would n

* bluez
* pi-bluetooth (AUR)
* node `6.x`
* nodejs
* npm

**Install as systemd service:**

1. copy `[email protected]` to `/etc/systemd/system/`
2. enable and start the service:
1. copy `index.js` and `package.json` to `/home/oursky/ble`
2. copy `[email protected]` to `/etc/systemd/system/`
3. setup, enable and start the service:
```
[oursky ~/]$ sudo systemctl enable doorlock-ble@<your-secret>
[oursky ~/]$ sudo systemctl start doorlock-ble@<your-secret>
[oursky ~/ble]$ npm install
[oursky ~/ble]$ sudo systemctl enable doorlock-ble@<your-secret>
[oursky ~/ble]$ sudo systemctl start doorlock-ble@<your-secret>
```

### Skygear Trigger Daemon

Listen for unlock requests from Skygear ...


## OpenSky App

Allow end users to trigger an unlock from a mobile device. Written using clojurescript on react-native.
Expand Down
14 changes: 0 additions & 14 deletions ble/package.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Description=Doorlock BLE Advertising Daemon

[Service]
ExecStartPre=/usr/local/bin/hciconfig hci0 up
ExecStart=/usr/bin/node /home/oursky/ble %i

[Install]
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions daemon-trigger-ble/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "doorlock-ble",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"bleno": "^0.4.0"
}
}
8 changes: 8 additions & 0 deletions daemon-trigger-skygear/doorlock-skygear.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=Doorlock Skygear Trigger Daemon

[Service]
ExecStart=/usr/bin/node /home/oursky/skygear

[Install]
WantedBy=multi-user.target
8 changes: 8 additions & 0 deletions daemon-trigger-skygear/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "doorlock-skygear",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
}
}