This code will, in conjunction with an Aileen core box, scan the local area network (LAN) for IP addresses.
git clone git@github.com:aileenproject/aileen-core.git
cd aileen-core
git clone git@github.com:aileenproject/aileen-lan.git
pip install -r aileen-lan/requirements.txt
python setup.py develop
cd aileen
python manage.py migrate
python manage.py fill_settings --server-url dummy.server --upload-token "sometoken"
export AILEEN_ACTIVATE_VENV_CMD="source activate my-aileen-venv"
export PYTHONPATH=/full/path/to/aileen-lan
(Note: this one really needs to happen on the shell before you run aileen-lan, i.e. not in .env)export AILEEN_SENSOR_MODULE=sensor
python manage.py run_box
python manage.py stop_box
Aileen-lan should now start filling the local database (aileen-core/aileen/db.sqlite3
). Run tmux attach
if you're interested to peek inside Aileen's tmux sessions where a few processes should be working.
(Ctrl-b-
You can test directly in a python console if your aileen-lan sensor is findable and works. You should have included the aileen-lan directory in the PYTHONPATH and set the SENSOR_MODULE env variable (see step 3 above).
Then open a python console and do this:
import importlib
sensor = importlib.import_module("sensor")
sensor.start_sensing("/tmp/aileen-lan")
TODO
python manage.py create_box --id 7e84fca5-e3d6-4721-a39a-4d1781a23124 --name classsroom --description "Counting connected learning computers"