Skip to content

aruppen/xwot-devices

Repository files navigation

xwot-devices

Collection of firmwares and API servers for xwot devices.

This repository hosts the following resources for the xWoT devices of the Software Engineering Research Group:

RESTful API Servers

Overview of the implemented RESTful API servers:

All APIs support the following content types:

  • application/ld+json
  • application/json
  • application/xml
  • text/html (TODO)
  • text/plain (TODO)

Hardware

Arduino firmware

The firmware for the xwot devices / arduino microcontrollers are available in the directory firmware.

Schematic files

The schematic files can be found in the directory schematic-files.

Basic configuration

Python / pip / build tools

sudo apt-get install python-pip python-dev build-essential libffi-dev

Python dependencies

twisted / klein / treq

sudo pip install twisted klein treq

yadp

git clone https://github.com/lexruee/yadp
sudo python setup.py install

xwot.py

git clone https://github.com/lexruee/xwot.py
sudo python setup.py install

I2C

Some useful resources about the I2C bus:

Install i2c-tools, libi2c-dev and python-smbus via:

sudo apt-get install python-smbus i2c-tools libi2c-dev

To use i2c without root right please add the corresponding user to the group i2c.

Example: add user pi to i2c group

sudo usermod -a -G i2c pi

Reboot:

sudo reboot

Raspberry pi configuration

See the adafruit i2c config guide.

I2C

Edit:

sudo nano /etc/modules

and these two lines:

i2c-bcm2708
i2c-dev

Edit:

/boot/config.txt

and add these two lines:

dtparam=i2c1=on
dtparam=i2c_arm=on

Running xWoT applications

git clone https://github.com/lexruee/xwot-devices
cd xwot-devices/{xwot-device}/app

Before running runserver.py please install all necessary dependencies:

sudo pip install -r requirements.txt

Finally, run it via:

python runserver.py

twistd deployment

Running the server as daemon:

twistd -y runserver.tac

Stopping the server:

sudo kill `cat twistd.pid`

Handy tools

Because the xwot applications are RESTful they are browsable through so called REST clients:

License & Copyright

xwot-devices  - Collection of firmwares and API servers for xwot devices
Copyright (C) 2015  Alexander Rüedlinger

xwot-devices is licensed under the GPL 3.0.

About

Collection of firmwares and API servers for xwot devices.

Resources

License

Stars

Watchers

Forks

Packages

No packages published