Skip to content

Commit

Permalink
that should do it, little messy in the imports but its working
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbolster committed Sep 22, 2015
1 parent 73fbe2d commit fd1a36e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Doorbot.apache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ServerName doorbot.farsetlabs.org.uk
ServerAlias *
ServerAdmin [email protected]
WSGIDaemonProcess doorbot user=doorbot group=doorbot
WSGIDaemonProcess doorbot user=doorbot group=doorbot processes=1 home=/home/doorbot
WSGIScriptAlias / /opt/doorbot/doorbot.wsgi
WSGIPassAuthorization On
<Directory /opt/doorbot/doorbot>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Then, enable the site with `sudo a2ensite Doorbot.apache.conf; sudo service apac

## Configuration

Doorbot is configured using two JSON dotfiles in the operating-users home directory (`/home/username`, depending on usecase)
Doorbot is configured using two JSON dotfiles in the operating-users home directory (`/var/www/` for default apache config)

### `.doorbot_users`

Expand Down Expand Up @@ -94,7 +94,7 @@ Currently Authenticated but doesn't need to be; returns a list of the doorids

Inside the enclosure above the network rack in the co-working space, the piface as as wired up as it needs to be for the foreseeable.

**IF ANYONE WANTS TO INTERFACE WITH OR EVEN CONSIDER OPENING THE ENCLOSURE, WRITTEN DIRECTOR CONFIRMATION IS REQUIRED IN ADVANCE AND THE ENCLOSURE MUST BE RESEALED BY A DIRECTOR OR NEM AFTERWARDS**
**IF ANYONE WANTS TO INTERFACE WITH OR EVEN CONSIDER OPENING THE ENCLOSURE, RECORDED DIRECTOR CONFIRMATION IS REQUIRED IN ADVANCE AND THE ENCLOSURE MUST BE RESEALED BY A DIRECTOR OR DI NEM AFTERWARDS**

There are 12 interface lines wired up to the terminal strip in the top lid of the enclosure; they are split into two 'sectors' of 6, which represent the two proposed 'door' controls, with the front door on the 'left' and the currently unpopulated back door on the right.

Expand Down
6 changes: 1 addition & 5 deletions doorbot/doorbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ def get_pw(username):
return user_db.get(username)
return None





import interfaces
app.doors = {
app.doors = {
door_config['doorid']:interfaces.pick(
door_config['interface']
)(**door_config) for door_config in config_settings['doors']
Expand Down
4 changes: 4 additions & 0 deletions doorbot/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ def __init__(self, *args, **kwargs):

super(PiFace, self).__init__(*args, **kwargs)
self.open_time = "Never"
try:
import pifacedigitalio
except ImportError:
raise ImportWarning("No PiFaceDigitalIO Module, Cannot instantiate PiFace")
self.pfd = pifacedigitalio.PiFaceDigital()
self.relay = kwargs.get('interfaceopt',0)
self.log.warn("Got Config {}".format(kwargs))
Expand Down

0 comments on commit fd1a36e

Please sign in to comment.