This document will describe the Initial setup of Site Controller on an Samsung Artik board running Fedora 24. The steps are also valid for the Krita 520 platform (see troubleshooting steps to avoid limitations if they are still there when you use the platform).
You will need to know the IP of the system and to have access via ssh.
SiteController is available through official purchase of a license or directly through azeti for development tests / integration tests. Upload the required files to gateway, e.g. in /root/download and proceed from there. |
All the following commands must be done as root. You can add "sudo" to the beginning of all the commands or use "sudo su" in order to be root and continue with the instructions. |
Once the system is installed, you will need to do a basic configuration of the system in order to connect to the cloud server. You should have received all the credentials beforehand, contact your provider in case you miss some information. |
Install prerequisites for compiling packages
[root@localhost ~]# dnf install gmp-devel redhat-rpm-config python-devel.armv7hl |
Install mosquitto, create a mosquitto group and user.
[root@localhost ~]# dnf install mosquitto |
[root@localhost SiteController-install]# ./setup.sh Checking Python version ... 2.7.9 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 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. 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 ... not 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 (2.6) 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 pyasn1-0.1.7.tar.gz ... Installing pysnmp-4.2.5.tar.gz ... Installing PyXB-1.2.3.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.tar.gz ... Installing SiteController ... Creating config folder ... Creating log folder ... Creating tmp folder ... Creating persists folder ... Copying configuration ... Installing new source files ... Checking launcher sysmlink ... Running autostart script for host type Unknown 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: > Samsung_Artik Serial name set to Samsung_Artik Changing serial id of SiteController from "" to "Samsung_Artik". /opt/azeti/SiteController/config/SiteController.cfg has been modified. Hint: to start the SiteController directly after the 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 |
Current SiteController version (1.3.7) does not automatically install the SiteController as service on Fedora. This means it will not be auto started on boot up. To do so follow this steps:
|
Start the SiteController, it will start the mosquitto automatically if necessary
[root@localhost ~]# /opt/azeti/SiteController/run_SiteController.py start |
Please stay 2 minutes in the terminal after the start of the site controller. If there is a problem in the system the modules will launch an exception. If no exception came in 2 minutes, the system is up and running with no issues. |
SiteController Status, note that required modules should be marked green and running
[root@localhost SiteController]# ./run_SiteController.py status Time zone set to: Etc/UTC Serial of this installation: Samsung_Artik_7 Main version of this installation: 1.3.6 Host type: Unknown External Broker set to: cloud-master.azeti.net:1883, TLS disabled Connection to External Broker established. OK: Integrity check passed. OK: Module mosquitto is running with PID (13755) OK: Module Watchdog.py is running with PID (13777) OK: Module data_store.py is running with PID (13765) OK: Module JobProcessor.py is running with PID (13790) OK: Module ConfigProvider.py is running with PID (13771) OK: Module RawResultsDeMux.py is running with PID (13791) OK: Module CalibResultsEvaluator.py is running with PID (13761) OK: Module virtual_sensor_provider.py is running with PID (13813) WARNING: Module VS_fill_quantity.py is not running. WARNING: Module VS_flow_rate.py is not running. WARNING: Module VS_tank_simulator.py is not running. WARNING: Module VS_access_control.py is not running. WARNING: Module VS_battery_details.py is not running. WARNING: Module VS_HistoryAnalyser.py is not running. WARNING: Module VS_filesize.py is not running. |
In the current Kitra 520 platform, you have just 512 MB of memory and no swap. /tmp is also limited in space.
Check the partitions and chose a folder in the partition that has more free space.
To launch the installer with a different temp folder:
#TEMP=/root/test/SiteController-install/temp ./setup.sh |
The creation of the swap file is as follows:
dd if=/dev/zero of=/swap.file bs=1M count=1024 mkswap /swap.file swapon /swap.file |