Device Setup

This section contains all the steps required to get the devices (and Linux platform) set up for the Climate Control Demo. Once you have completed the steps on this page, Starting the System covers how to run and use the demo. You can download the climate-control-demo-1.0.0 release from here. You will need the files on Ci20 and your Linux platform. If you are using MPLAB X on Windows to program Wi-Fire boards you will also need the files on that platform.

After extracting the climate-control-demo-1.0.0.zip , you will see 3 folders:

  1. ci20 - Controller binaries for Ci20 and linux PC
     
    • flowclimatecontroller.i686.bin - controller binary for 32-bit linux PC.
    • flowclimatecontroller.mipsel.bin - controller binary for Ci20 board.
    • flowclimatecontroller.x86_64.bin - controller binary for 64-bit linux PC.

  2. pc_app - Python-QT Admin and Display Applications
     
  3. wifire - Sensor and Actuator hex files to be run on Wi-Fire board
     
    • Sensor hex file for Wi-Fire board - flow_climate_sensor.X.production.hex
    • Actuator hex file for Wi-Fire board - flow_climate_actuator.X.production.hex

Setting up Wi-Fire boards

Powering your Wi-Fire board

Connect your Wi-Fire board to a PC or laptop computer with a USB cable, unless your application uses more than 300 mA, in which case you should use an external power supply rated at 5V DC, 500 mA. Follow the instructions below to power up your board using either a USB cable, or external power supply

Using a USB cable

Using a 5V 500 mA power supply

Flashing the Wi-Fire board

Using hex files

Please download and install necessary tools and SDK from here - You will need MPLAB X IDE, MPLAB XC32 Compiler and MPLAB Harmony from the Tools section. You will also need "WiFire Harmony SDK 2.0.2" release and the "WiFire Harmony SDK Developer getting Started Guide" from the documentation section. The documentation details how to install the Harmony SDK.

Using source code

Please follow the instructions in the Source Code section.

Setting up Ci20

Login to the Ci20 board and connect to the internet (via WiFi or Ethernet). The default username and password are both ci20. For more details on Ci20 please refer to Ci20 Setup.

Adding flowsdk.list as a source

If flowsdk.list is not present in /etc/apt/source.list.d, open a terminal and run the following commands.
#cd /etc/apt/sources.list.d/
#sudo wget http://deb.flowworld.com/flowsdk.list
#sudo apt-get update

Installing the controller

You can either install the controller software using a pre-built package, or by using the binary from GitHub and installing the dependencies.

Note that these instructions can also be followed on a Linux PC if you prefer.

Setting up Linux PC for the Admin and Display apps

1. Adding flowsdk.list as a source

If flowsdk.list is not present in /etc/apt/source.list.d, open a terminal and run the following commands.
#cd /etc/apt/sources.list.d/
#sudo wget http://deb.flowworld.com/flowsdk.list
#sudo apt-get update

2. Updating Flow libraries along with python wrappers

#sudo apt-get update
#sudo apt-get install libflowmessaging-devel libflowcore-devel
#sudo apt-get install libflowmessaging-python
#sudo apt-get install libflowcore-python

3. Installing required python packages for Display and Admin applications

In order to run the QT based Display and Admin python applications, the following packages need to be installed.

#sudo apt-get install python2.7
#sudo apt-get install python-pyside
#sudo apt-get install python-matplotlib
#sudo apt-get install python-netifaces
#sudo apt-get install python-pip
#sudo pip install xmltodict
#sudo pip install enum34
#sudo apt-get install gawk