Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Configuration is no longer hardcoded, spaceapi support implemented
- Loading branch information
Mrkva
committed
Apr 22, 2017
1 parent
70d0e3e
commit 6027f13
Showing
4 changed files
with
232 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/bash | ||
|
||
# maglock GPIO pin | ||
GPIO_LOCK=24 | ||
|
||
# status led GPIO pin | ||
GPIO_LED=22 | ||
|
||
# buzzer GPIO pin | ||
GPIO_BEEP=23 | ||
|
||
# status switch GPIO pin | ||
GPIO_SWITCH=18 | ||
|
||
# magswitch GPIO pin (used as alarm trigger) | ||
GPIO_MAGSWITCH=17 | ||
|
||
# path to nfc-getcard binary (from the brmdoor-pi repo) | ||
NFC_BINARY=/home/brmdoor/brmdoor/brmdoor-rpi/nfc-getcard | ||
|
||
# list of allowed card IDs with names | ||
# format: | ||
# user1 cafebabe | ||
# user2 b16b00b5 | ||
|
||
ALLOWED_LIST=/home/brmdoor/allowed.list | ||
|
||
# fifo for remote irssi control | ||
IRSSIFIFO=/home/brmdoor/.irssi/remote-control | ||
|
||
# IRC chans where bot will idle | ||
IRCCHANS=("#brmlab" "#brmbiolab" "#brmstatus") | ||
|
||
# directory with stored IRC chans topics | ||
IRSSITOPICS=/home/brmdoor/.irssi/topics/ | ||
|
||
# image of closed brmlab | ||
IMAGE_CLOSED=/home/brmdoor/brmdoor/brmd/status-closed.png | ||
|
||
# image of open brmlab | ||
IMAGE_OPEN=/home/brmdoor/brmdoor/brmd/status-open.png | ||
|
||
# destination image | ||
# do not set if you don't want image update on open/close | ||
# IMAGE_DST=/var/www/html/brmd/brmstatus.png | ||
|
||
# spaceAPI template | ||
# two tokens will be replaced: ##OPEN## with true/false if brmlab is open/closed and ##LASTCHANGE## with unix timestamp of last status change | ||
SPACEAPI_TPL=/home/brmdoor/brmdoor/brmdoor-rpi/brmstatus-template.json | ||
|
||
# SpaceAPI destination file, do not set if you don't want updates | ||
# SPACEAPI_DST=/var/www/html/brmd/brmstatus.json | ||
|
||
|
||
# identity used in logs and IRC messages, used in messages like: "[$IDENTITY] door unlocked" | ||
IDENTITY="brmbiodoor" | ||
|
||
# status identifier for logs and IRC, used in messages: "[${STATUS}] update: CLOSED" | ||
STATUS="biostatus" | ||
|
||
# room name in IRC topic | ||
ROOM="BRMBIOLAB" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
|
||
# maglock GPIO pin | ||
GPIO_LOCK=24 | ||
|
||
# status led GPIO pin | ||
GPIO_LED=22 | ||
|
||
# buzzer GPIO pin | ||
GPIO_BEEP=23 | ||
|
||
# status switch GPIO pin | ||
GPIO_SWITCH=18 | ||
|
||
# magswitch GPIO pin (used as alarm trigger) | ||
GPIO_MAGSWITCH=17 | ||
|
||
# path to nfc-getcard binary (from the brmdoor-pi repo) | ||
NFC_BINARY=/home/brmdoor/brmdoor/brmdoor-rpi/nfc-getcard | ||
|
||
# list of allowed card IDs with names | ||
# format: | ||
# user1 cafebabe | ||
# user2 b16b00b5 | ||
|
||
ALLOWED_LIST=/home/brmdoor/allowed.list | ||
|
||
# fifo for remote irssi control | ||
IRSSIFIFO=/home/brmdoor/.irssi/remote-control | ||
|
||
# IRC chans where bot will idle | ||
IRCCHANS=("#brmlab" "#brmbiolab" "#brmstatus") | ||
|
||
# directory with stored IRC chans topics | ||
IRSSITOPICS=/home/brmdoor/.irssi/topics/ | ||
|
||
# image of closed brmlab | ||
IMAGE_CLOSED=/home/brmdoor/brmdoor/brmd/status-closed.png | ||
|
||
# image of open brmlab | ||
IMAGE_OPEN=/home/brmdoor/brmdoor/brmd/status-open.png | ||
|
||
# destination image | ||
# do not set if you don't want image update on open/close | ||
IMAGE_DST=/var/www/html/brmd/brmstatus.png | ||
|
||
# spaceAPI template | ||
# two tokens will be replaced: ##OPEN## with true/false if brmlab is open/closed and ##LASTCHANGE## with unix timestamp of last status change | ||
SPACEAPI_TPL=/home/brmdoor/brmdoor/brmdoor-rpi/brmstatus-template.json | ||
|
||
# SpaceAPI destination file, do not set if you don't want updates | ||
SPACEAPI_DST=/var/www/html/brmd/brmstatus.json | ||
|
||
|
||
|
||
# identity used in logs and IRC messages, used in messages like: "[$IDENTITY] door unlocked" | ||
IDENTITY="brmdoor" | ||
|
||
# status identifier for logs and IRC, used in messages: "[${STATUS}] update: CLOSED" | ||
STATUS="brmstatus" | ||
|
||
# room name in IRC topic | ||
ROOM="BRMLAB" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"api": "0.13", | ||
"space": "brmlab", | ||
"logo": "https://status.brmlab.cz/_media/brmlab.png", | ||
"url": "https://brmlab.cz", | ||
"open": ##OPEN##, | ||
"location": { | ||
"address": "brmlab z.s., Bubenska 1477/1, 170 00 Prague 7, Czech republic", | ||
"lon": 14.4369158, | ||
"lat": 50.0984614 | ||
}, | ||
"contact": { | ||
"phone": "+420608801582", | ||
"sip": "910114321@sip.odorik.cz", | ||
"irc": "irc://freenode/#brmlab", | ||
"twitter": "@brmlab", | ||
"facebook": "brmlab", | ||
"foursquare": "4cbdc77cc7228cfa25052cce", | ||
"ml": "brmlab@brmlab.cz", | ||
"issue_mail": "cmFkYUBicm1sYWIuY3oK" | ||
}, | ||
"issue_report_channels": [ | ||
"issue_mail" | ||
], | ||
"state": { | ||
"open": ##OPEN##, | ||
"lastchange": ##LASTCHANGE##, | ||
"icon": { | ||
"open": "https://status.brmlab.cz/status-open-icon.png", | ||
"closed": "https://status.brmlab.cz/status-closed-icon.png" | ||
} | ||
}, | ||
"icon": { | ||
"open": "https://status.brmlab.cz/status-open-icon.png", | ||
"closed": "https://status.brmlab.cz/status-closed-icon.png" | ||
}, | ||
"stream": { | ||
"mp4": "http://brmlab.cz/stream.flv" | ||
}, | ||
"projects": [ | ||
"https://brmlab.cz/project/start", | ||
"https://github.com/brmlab" | ||
], | ||
"cache": { | ||
"schedule": "m.02" | ||
} | ||
} |