Section | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
- SiteController installation archive (e.g. SiteController-install-1.1-Jever.tar.gz): SiteController modules and necessary python libraries
...
Tip |
---|
SiteController is available through official purchase of a license or directly through azeti for development tests / integration tests. Upload the required files to the ubuntu server, e.g. in /root/download and proceed from there. |
...
Install prerequisites for compiling packages
Code Block raspberrypi:/home/pi/SiteController-install# apt-get install python-dev
Install mosquitto, create a mosquitto group and user.
Info The default mosquitto package in the raspbian repositories is before version 1.0. You must add the special mosquitto.org repository to retrieve the latest debian package (version 1.4 or higher). The next step is a short version of the full instructions, taken from mosquitto.org, which you can find here.
Code Block root@raspberrypi:~# wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key root@raspberrypi:~# sudo apt-key add mosquitto-repo.gpg.key root@raspberrypi:~# cd /etc/apt/sources.list.d/ root@raspberrypi:~# wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list root@raspberrypi:~# apt-get update root@raspberrypi:~# apt-get install mosquitto
Install SiteController (output was truncated)
Code Block raspberrypi:/home/pi/SiteController-install# ./setup.sh WARNING: at least Python version 2.7.9 is required for TLS support Press [a] to abort, any other key to continue! OS type is raspbian Checking for previous installation of SiteController ... Found a previous installation in /opt/azeti/SiteController. Stopping SiteController ... Creating backup ... Using tar with bzip2 ... Creating new site controller startup configuration ... Installing python libraries ... Checking python module setuptools, version 12.2 ... already installed. 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.5) installed. WARNING: That version might be incompatible with this product. Checking python module six, version 1.9.0 ... not installed. 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. 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 SiteController ... Creating config folder ... Copying default configuration ... Installing new source files ... Creating log folder ... Creating tmp folder ... Creating persists folder ... Updating autostart script ... Adapting configuration to your system ... Changing serial devices in SiteController from "" to "/dev/ttyRPC0". 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: > raspi-test-sebastian Serial name set to raspi-test-sebastian Thank you. Changing serial id of SiteController from "" to "raspi-test-sebastian". /opt/azeti/SiteController/config/SiteController.cfg has been modified. # configure the paths according to your system SC_HOST_TYPE=RasPi SC_HOME_FOLDER=/opt/azeti/SiteController CONFIG_FOLDER=/opt/azeti/SiteController/config LOG_DESTINATION=/opt/azeti/SiteController/log TMP_DESTINATION=/opt/azeti/SiteController/tmp PERSIST_DESTINATION=/opt/azeti/SiteController/persistent MOSQUITTO_FOLDER=/opt MOSQUITTO_CFG_FOLDER=/etc/mosquitto # chose which modules you need by setting the variable to "Yes" START_CLOUD_MODULES="Yes" START_AUTOMATION_CONTROLLER="No" START_VIRTUAL_SENSORS="No" START_MODBUS="No" START_UDP_ADAM="No" START_SNMP="No" START_HTTP_MODULES="No" START_GPIO_MODULES="No" START_LOCAL_STORAGE="No" START_SIMULATOR="No" Please check SiteController.conf (content is shown above) and 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
- A known issue is
...
Code Block |
---|
raspberrypi:~# sed -i 's/MOSQUITTO_FOLDER=\/opt/MOSQUITTO_FOLDER=\/usr/g' /opt/azeti/SiteController/SiteController.conf |
Starting the system
Start the SiteController, it will start the mosquitto automatically if necessary
Code Block raspberrypi:~# /opt/azeti/SiteController/run_SiteController.py start
Tip 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.
- Once everything is started, you can use the following command to check that all modules are up and running:
SiteController Status, note that required modules should be marked green and running
Code Block raspberrypi:~# /opt/azeti/SiteController/run_SiteController.py status WARNING: section SiteController.conf not contained in SiteController.cfg. Time zone set to: Etc/UTC Serial of this installation: skoch-ubuntu01 Main version of this installation: 1.1.0_(Build:1228_c300ebc) OK: Integrity check passed. OK: Module Watchdog.py is running with PID (21268) OK: Module cloudConnector.py is running with PID (21277) OK: Module HD2CloudExporter.py is running with PID (21284) OK: Module ConfigProvider.py is running with PID (21289) OK: Module RawResultsDeMux.py is running with PID (21296) OK: Module CalibResultsEvaluator.py is running with PID (21302) OK: Module JobProcessor.py is running with PID (21306) OK: Module AutomationController.py is running with PID (21310) OK: Module VirtualSensorProvider.py is running with PID (21316) OK: Module ModbusDaemon/ModbusMaster.py is running with PID (21322) OK: Module UDPserver_AdvantechAdam60xx.py is running with PID (21330) OK: Module trapd.py is running with PID (21334) OK: Module snmpgetd.py is running with PID (21339) OK: Module http_server.py is running with PID (21347) OK: Module persistord.py is running with PID (21354) 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. OK: Module mosquitto daemon is running with PID (21265) root@ubuntu:~#
- Once the system is up and running, and if no errors are appearing in your command line or in the logs, you can proceed to delete the installation compressed files and uncompressed folders to save space in the device.