See below for general installation instructions. Make sure you have
the newest version of distribute
:
sudo pip install --upgrade distribute
Most of these can be installed with homebrew or aptitude:
Mac OS X:
brew install postgresql postgis gdal libgeoip redis redis-server
Ubuntu:
sudo apt-get install postgresql pgadmin3 gdal-bin libspatialite3 libspatialite-dev spatialite-bin libgeos-dev geoip-bin libgeoip-dev libxml2-dev libxslt-dev redis-server
Most of these can be installed with sudo pip install --upgrade <package-name>
:
- ply
- networkx
- django
- lxml
- redis
- zope.schema
- requests
- django-olwidget
- flask
- smap
To install 'pysqlite', we need to customize the build so that it can accept extensions:
wget http://pysqlite.googlecode.com/files/pysqlite-2.6.3.tar.gz
tar -xzvf pysqlite-2.6.3.tar.gz
cd pysqlite-2.6.3
Now edit setup.cfg
so that the last line is commented out:
#define=SQLITE_OMIT_LOAD_EXTENSION
You can then run sudo python setup.py install
From the bas/python
directory, run python setup.py install
. You can now import bas
.
From the web
directory, run the script ./runserver.sh
to setup the internal
databases and then to launch the two webservers needed for BAS. If Django
prompts you to create a superuser, make sure you do so.
The web interface will now be available at http://localhost:8000/webapi. The login will be the login you created for your Django admin superuser.
NOTE: This section is out of date as the layout has changed slightly and functionality has been added. This section will be updated before Thursday 21 March 2013
-
Query box: type queries in here and they are evaluated in real-time and displayed in the
Devices
column. If the results seem off, try adding a space to the end of your query. -
Command box: type the command you want evaluated against the
Actuating
list. Currently, only read commands work, but this is still under development, and the possibilities will expand. To see a list of available commands for any point, click the UUID link for any object. -
Click
Run
to observe the output of the command above. In the future,dry-run
will model runnning the command, andrun
will actually run it. -
Items that are shift-clicked under the
Devices
column will be highlighted in green, and the first 5 characters of their UUID will be listed here. Any command in the command box will be run on these points. To remove any point from the list, simply shift-click it again. -
Object Details
will either display more detailed information about any object whose UUID link is clicked, or it will display the output of running the command against the indicated objects. Here, after runningget_level
on the objects41006
, etc, we can see that object41006
has a level of 7. -
This is an object that has been returned by the query. Clicking the UUID link (in blue) will bring up additional information about the object. Shift-clicking the object will highlight it in green, indicating that it will be actuated upon by whatever is in the command box once
run
is clicked. Mousing over the object will highlight the corresponding geospatial area in red on the floor map to the right. -
This is an object that has not been shift-clicked, but the mouse is hovering over the item (mouse not seen in this picture due to screenshot software), and thus the corresponding area on the far left of the floor plan is highlighted in red.
-
All floors for the objects returned by the query will be seen here. Clicking on a given area will run a query for all objects that influence that area.