Install ubiworx on your gateway =============================== Prerequisites ------------- In order to deploy ubiworx on your gateway the following items are required: - A board with a standard debian distro installed. - The board must be connected to the Internet. - You need to already have added an entry for the gateway on the `broker interface `__ (learn how to create one `here `__) and noted the **gateway ID** plus **vendor ID** that you have assigned. Once ubiworx has been installed your gateway will automatically connect to the ubiworx cloud service and fetch the settings you entered there. Your sensors will start reporting after the automatic configuration step has finished. .. note:: The recomended system for deploying ubiworx is `ubilinux `__ and the recomended platform is an `UP board `__. For information about how to install ubilinux visit the `UP Wiki `__. +--------------------+--------------------+----------------------+ | |UP-board| | |Raspberry-Pi| | |Edison| | | | | | | UP board Gateway | Raspberry Pi | Intel Edison | | | | | +--------------------+--------------------+----------------------+ .. |UP-board| image:: ../assets/images/gateways/UP-board.png :target: setup-gateway.html#setup-new-up-board-gateway .. |Raspberry-Pi| image:: ../assets/images/gateways/RaspberryPi.jpg :target: setup-gateway.html#setup-new-raspberry-pi-gateway .. |Edison| image:: ../assets/images/gateways/edison.jpg :target: setup-gateway.html#setup-new-intel-edison-gateway Setup new UP board gateway -------------------------- On the UP board we recomend installing `ubilinux `__ or `ubuntu `__ On ubilinux ^^^^^^^^^^^ Ubilinux come with ubiworx pre-installed so you need only to configure it. 1. Login to your UP board as root or execute all following commands with root privileges. 2. Start ubiworx and provide your **vendor ID** and **gateway ID** (that you obtained in your broker dashboard). :: sudo /etc/init.d/ubiworx start 3. Go to the the broker Dashboard (`http://broker.ubiworx.com `__) and refresh the page until the status of the gateway turn green. On ubuntu ^^^^^^^^^ 1. Login to your UP board as root or execute all following commands with root privileges. 2. Download the apt authentication key from the official ubiworx server by executing :: wget http://ubiworx.com/gpg.key -O - | sudo apt-key add - 3. Add the official ubiworx package repository to your sources.list :: echo "deb http://ubiworx.com/debian wheezy non-free" | sudo tee -a /etc/apt/sources.list 4. Update your package index. :: sudo apt-get update 5. Install ubiworx using apt-get. :: sudo apt-get install ubiworx 6. Start ubiworx. Before starting the service you will be asked for your **vendor ID** and **gateway ID**. Enter your notes from the `Add a new gateway <../interface/gateway.html#add-a-new-gateway>`__ section. After the service is started you will see your gateway going green on the `broker Dashboard page `__. :: /etc/init.d/ubiworx start Setup new raspberry pi gateway ------------------------------ **raspbian** is the recommended Debian based OS for the Raspberry Pi. For download and installation instructions visit `raspbian `__. On raspbian ^^^^^^^^^^^ 1. Login to your Raspberry **as root** or execute all following commands with root privileges. 2. Download the apt authentication key from the official ubiworx server by executing :: wget http://ubiworx.com/gpg.key -O - | apt-key add - 3. Add the official ubiworx package repository to your sources.list. :: echo "deb http://ubiworx.com/debian wheezy non-free" >> /etc/apt/sources.list 4. Update your package index. :: apt-get update 5. Install ubiworx using apt-get. :: apt-get install ubiworx 6. Start ubiworx. Before starting the service you will be asked for your **vendor ID** and **gateway ID**. Enter your notes from the `Add a new gateway <../interface/gateway.html#add-a-new-gateway>`__ section. After the service is started you will see your gateway going green on the `broker Dashboard page `__. :: /etc/init.d/ubiworx start Setup new intel edison gateway ------------------------------ .. warning:: The latest version of ubiworx is **NOT supported** on this platform. the last available ubiworx release for the Intel Edison is 0.9.1. Please consider using an `UP board `__ to take full advantage of the latest ubiworx features. On ubilinux ^^^^^^^^^^^ 1. Download ubiworx **0.9.1** for **i386 architecture** from ubiworx website download section `https://ubiworx.com/downloads `__. :: wget https://ubiworx.com/packages/v0.9.1-3/ubiworx-i386.tar.gz 2. Login to your Edison as root or execute all following commands with root privileges. 3. Copy the downloaded package onto your Intel Edison. 4. Unzip the ubiworx-i386.tar.gz package. :: tar -xzvf ubiworx-i386.tar.gz 5. install all the ubiworx .deb packages with dpkg. :: cd debian/pool/non-free/u/ dpkg -i */*.deb 6. Start ubiworx and see your gateway going green on the webinterface. During the installation you will be asked for your vendor ID and gateway ID (device ID). Enter your notes from the **Add a new gateway** section. :: /etc/init.d/ubiworx start