INACTIVE - Facilitate ioT applications using rot.js API
Перейти к файлу
raluca-elena 1a61de6974 added localhost 2014-08-11 14:53:53 -07:00
directory_server last commit refactoring this tomorrow 2014-08-07 00:23:06 -07:00
frontend door monitor 2014-08-11 14:37:15 -07:00
slave added localhost 2014-08-11 14:53:53 -07:00
README.md comment 2014-08-07 12:53:25 -07:00
camera setting that will be in a makefile soon 2014-07-21 04:23:46 +00:00

README.md

directory_server - centralized endpoint behind restofthings.com frontend - some html code to make use of all of the CORS frontend - app that makes calls to directory_server on behalf of current ip slave - code that runs on pi

install Webiopi

Remove auth

sudo rm /etc/webiopi/passwd

Install pi-gpio

sudo apt-get install nodejs npm

git clone git://github.com/quick2wire/quick2wire-gpio-admin.git

cd quick2wire-gpio-admin

make

sudo make install

sudo adduser $USER gpio

Install and configure nginx:

sudo apt-get update

sudo apt-get install nginx

copy default file from pi-config-files to /etc/nginx/sites-*

service nginx start

Nginx if used as a CORS proxy in this case(nginx will by default run on port 80).

Note: if you failed to configure nginx properly and won't start try this: sudo nginx -t should test all files and return errors and warnings locations raspicam working example http://blog.miguelgrinberg.com/post/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi $ sudo apt-get install libjpeg8-dev $ sudo apt-get install imagemagick $ tar xvzf mjpg-streamer-r63.tar.gz $ cd mjpg-streamer-r63 $ make

At this point we'll try to use as an example the raspicam and mjpg streamer

For starting the camera:

$ mkdir /tmp/stream

$ raspistill --nopreview -w 640 -h 480 -q 5 -o /tmp/stream/pic.jpg -tl 100 -t 9999999 -th 0:0:0 &

You need to install mjpg streamer:

http://blog.miguelgrinberg.com/post/stream-video-from-the-raspberry-pi-camera-to-web-browsers-even-on-ios-and-android

Than run:

LD_LIBRARY_PATH=/usr/local/lib mjpg_streamer -i "input_file.so -f /tmp/stream -n pic.jpg" -o "output_http.so -w /usr/local/www -p 9999"

Flow

  • obtain device & plug it into network/power
  • go to user.restofthings.com to find device listed
  • Click link to go to dev ui(eg webiopi pinout page)
  • Assign tags to device
  • Have home automation software look up device by those tags ** Alternative: have some software deployed on one of the devices and do ^
  • Enjoy