Raspbian UniPi

Introduction


The UniPi ist a new IoT-Gateway using a highly modified Rapsbian.

On this page:

Steps

Install PIGPIO http://abyz.co.uk/rpi/pigpio/download.html

Install Evok https://github.com/UniPiTechnology/evok#testing-latest-git-versions

Edit /etc/evok.conf (port changes, etc)

Run 'service evok start/restart/stop' to control the daemon.

Install ModbusTCP Server

Installation: Get the latest release source code, eg:

wget https://github.com/UniPiTechnology/neuron_tcp_modbus_overlay/archive/v1.0.0.zip

Unzip it

unzip v1.0.0.zip

And run the installation scrip as root (requires make tools and libmodbus)

bash neuron_tcp_modbus_overlay-1.0.0/install.sh

Modpoll installation

Describe Mbpoll installation here

https://github.com/epsilonrt/mbpoll


Parameters are unfortmatted

Paths to directories or files are preformatted /opt/azeti/SiteController/foobar

Enclose parameters and paths into double brackets  

{{here is some /path/foobar}}

when typing and Confluence automatically applies the preformat style.

Installing SiteController

You will need the correct version of the SiteController, please refer to this Site for aquiring the SiteController Installation files.

Configure the time zone

Timezone configuration

Before you begin the installation, make sure that you have the system with the right time configuration and a timezone configured in your system. Please read the file /etc/timezone to check that it is including your location. This file should contain a pair (Example: Europe/Berlin), that corresponds to the names that you can find in /usr/share/zoneinfo.

  1. Install prerequisites for compiling package

    raspberrypi:/home/pi/SiteController-install# apt-get install python-dev	
  2. Install mosquitto, create a mosquitto group and user.

    root@raspberrypi:~# wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
    root@raspberrypi:~# apt-key add mosquitto-repo.gpg.key
    root@raspberrypi:~# cd /etc/apt/sources.list.d/
    root@raspberrypi:~# wget http://repo.mosquitto.org/debian/mosquitto-jessie.list
    root@raspberrypi:~# apt-get update
    root@raspberrypi:~# apt-get install mosquitto
  3. Enable websockets (only need in specific cases, if unsure just skip this part)

    sudo nano /etc/mosquitto/conf.d/mosquitto.conf
  4.  Add the following at the end of the configuration file.

    listener 1883
    listener 1884
    protocol websocket
  5. Untar SiteController-install-1.3.5.tar.gz

    tar xvf SiteController-install-1.3.5.tar.gz
  6. Install SiteController

    root@raspberrypi:/home/pi/SiteController-install# ./setup.sh
    Checking python version ... Python 2.7.9
    Checking mosquitto version ... 1.4.11 (build date Mon, 20 Feb 2017 22:47:27 +0000)
    OS type is raspbian
    Found default config in /home/pi/SiteController-install/config/SiteController.cfg
    Checking for meta config file ...
    Using config /home/pi/SiteController-install/config/SiteController.cfg
    Need to update SiteController.cfg with machine dependent values  ...
    Checking for previous installation of SiteController ...
    No previous installation found.
    Installing python libraries ...
    Checking python module setuptools, version 12.2 ... different version (5.5.1) installed. Installing supported version.
    Installing setuptools ...
    Checking python module Crypto, version 2.6.1 ... not installed.
    Checking python module psutil, version 2.2.1 ... not installed.
    Checking python module pytz, version 2014.7 ... not installed.
    Checking python module bitstring, version 3.1.3 ... not installed.
    Checking python module pyasn1, version 0.1.7 ... already installed.
    Checking python module pysnmp, version 4.2.5 ... not installed.
    Checking python module pyxb, version 1.2.3 ... not installed.
    Checking python module serial, version 2.7 ... different version (3.2.1) installed. Installing supported version.
    Checking python module six, version 1.9.0 ... different version (1.8.0) installed. Installing supported version.
    Checking python module apscheduler, version 3.0.0 ... not installed.
    Checking python module paho.mqtt, version 1.1 ... not installed.
    Checking python module pyftpdlib, version 1.4.0 ... not installed.
    Checking python module pynmea2, version 1.5.3 ... not installed.
    Installing pycrypto-2.6.1.tar.gz ...
    Installing psutil-2.2.1.tar.gz ...
    Installing pytz-2014.7.tar.gz ...
    Installing bitstring-3.1.3.tar.gz ...
    Installing tzlocal-1.1.2.zip ...
    Installing futures-2.1.6.tar.gz ...
    Installing pysnmp-4.2.5.tar.gz ...
    Installing PyXB-1.2.3.tar.gz ...
    Installing pyserial-2.7.tar.gz ...
    Installing modbus-tk-0.4.2.tar.gz ...
    Installing six-1.9.0.tar.gz ...
    Installing APScheduler-3.0.0.tar.gz ...
    Installing paho-mqtt-1.1.tar.gz ...
    Installing pyftpdlib-1.4.0.tar.gz ...
    Installing pynmea2-1.5.3.zip ...
    Installing SiteController ...
    Creating config folder ...
    Creating log folder ...
    Creating tmp folder ...
    Creating persists folder ...
    Copying configuration ...
    Installing new source files ...
    Checking launcher symlink ...
    Updating autostart script for host type RasPi...
    Running update-rc.d for installing the start scripts
    Please provide a unique serial name for your SiteController!
    Allowed characters are upper and lower case ASCII [a-zA-Z],
    digits [0-9], dashes - and underlines _.
    Your entry: > UniPi-NeuronM303
    Thank you.
    Serial name set to UniPi-NeuronM303
    Changing serial id of SiteController from "" to "UniPi-NeuronM303".
    
    
    /opt/azeti/SiteController/config/SiteController.cfg has been modified.
    
    Hint: to start the SiteController directly after installation
            run the setup script with AUTOSTART_SITECONTROLLER set to 1:
    
        AUTOSTART_SITECONTROLLER=1 ./setup.sh
    
    Please check the configurations in
    "/opt/azeti/SiteController/config".
    Adapt them to your needs, then start the controller with
    the following line (copy the complete line, there are two
    quotes in it):
    
        "/opt/azeti/SiteController/run_SiteController.py" start
    
    
  7. That's it. To use the Cloud Dashboard, please refer to the Quick Start to the Engine guide.

You should have received all the credentials beforehand, contact your provider in case you miss some information.


Next Steps