How To Install Application On DSGW-210 IoT Gateway

The following instruction will guide you through the process of installation and setting up applications in DSGW-210 IoT Gateways, including home assistant, OpenHub, Jeedom, Node-Red, ThingsBoard, etc. (Refer to DSGW-210 IoT Gateways Specification for details)

How to install Home Assistant

Home Assistant, a free and open-source software designed for home automation, provides an easy and secure way to control all of your smart home devices. Home Assistant makes it possible to centralize all of the smart devices you have in your home, regardless of brand and enables you to control them via an easy, user-friendly way –including via voice. With all of these smart devices working together, you can set many kinds of scenes, which would otherwise not be possible. The following instruction will guide you through the process of installation and setting up the Home Assistant.

Install OS Agent, Docker, and Dependencies

Step 1. In the terminal run the following commands to update the Debian OS, install Docker, and the required dependencies for the OS Agent and the Supervised installer. Execute the following commands one at a time.

sudo -i
apt update && sudo apt upgrade -y && sudo apt autoremove -y
apt --fix-broken install
apt-get install jq curl avahi-daemon apparmor-utils udisks2 libglib2.0-bin network-manager dbus
wget -y
curl -fsSL get.docker.com | sh

Step 2. Visit the OS Agent page and then replace the version number with the latest available, into the commands below:

Step 3. Execute the following commands one at a time

wget https://github.com/home-assistant/os-
agent/releases/download/1.2.2/osagent_1.2.2_linux_x86_64.deb
dpkg -i os-agent_1.2.2_linux_x86_64.deb

5.2 Install Home Assistant Supervised

Step 1. Enter each line of the below commands into the terminal and execute them one at a time

Sudo -

Step 2. Execute the following commands one at a time

wget https://github.com/home-assistant/supervised
installer/releases/latest/download/homeassistant-supervised.deb
dpkg -i homeassistant-supervised.deb

Step 3. You may be prompted to choose a machine type during the installation

5.3 Run and Configure the Home Assistant

http://your.ip.address.here:8123/

If everything is successful, you should see the following screen:

NOTE: Since there are always changes and updates to get up-to-date information, please refer to Installing Home Assistant Supervised on Debian 11 - Community Guides - Home Assistant Community

How to install OpenHAB

The Open Home Automation Bus as the center of your smart home is a free and open-source software designed for home automation. OpenHAB has been proposed in 2010 by Kai Kreuzer. It is developed based on the Eclipse SmartHome framework using Java. The user can extend the OpenHAB by installing the new Add-ons. The reason is that the OpenHAB is modular software. The following instruction describes how to install and set up OpenHAB in DSGW-210. (Refer to OpenHAB Home Automation Gateway for details)

Step 1. Adding the openHAB repository key to your package manager:

wget -qO - 'https://openhab.jfrog.io/artifactory/api/gpg/key/public' | sudo apt-key add -

Step 2. Then, you can choose between, Official (Stable), Beta, or Snapshot builds: Add the openHAB Stable Repository to your systems apt sources list:

echo 'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee

Add the openHAB Beta Repository to your systems apt sources list:

echo 'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee

The snapshot repository is hosted in openHAB’s JFrog Artifactory instance (opens new window). To use it, add the openHAB Unstable Repository to your systems apt sources

echo 'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee

Step 3. Resynchronize the package index and install the openHAB with the following command

sudo apt-get update
sudo apt-get install openHAB

Step 4. If everything went well, you can start openHAB and register it to be

sudo /etc/init.d/openhab start
sudo /etc/init.d/openhab status
sudo update-rc.d openhab defaults

Step 5. You should be able to reach the openHAB Dashboard at http://openhabdevice:8080 after 15 minutes later.

NOTE: For more information, please refer to

https://www.openhab.org /docs/installation/ linux.html#installation

How to install Jeedom

Jeedom is free, open-source software that can be installed on any Linux system. It’s core-based with multiple functionalities: simple and advanced management of scenarios, text and sound interaction with a home automation system, history viewing and curve, and graph generation, linking of all equipment and connected objects, personalization of the interface. Jeedom provides a very simple and clear way to display the situation of different components of your home, so you can immediately see how many lights are on, which shutters are open, the alarm status, the temperature, etc. (Refer to Jeedom Smart Gateway for details)

Step 1. Execute the following commands:

wget https://raw.githubusercontent.com/jeedom/core/master/install/install.sh
chmod +x install.sh
./install.sh

Copy

Step 2. Then just go to IP_JEEDOM from your internet browser.

DSGW 210 07

NOTE: To find out the latest and more installation information, please refer to

https://doc.jeedom.com/ en_US/installation/cli

How to install Node-Red

Node-Red works as a programming tool for wiring together hardware devices. It provides a convenient method to enable the hardware to web-based services and software by creating a flow between the nodes. Node-Red Community provides a script to install Node.js, npm, and Node-RED onto a Debian-based operation system. The script can also be used to upgrade an existing install when a new release is available.

(Refer to Node-RED Computing Gateway for details)

Step 1. Running the following command first to ensure npm can fetch and build any

sudo apt install build-essential git cur

Step 2. Running the following command will download and run the script

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejsand-nodered)

Step 3. Running

Once installed as a global module you can use the node-red command to start NodeRED in your terminal. You can use Ctrl-C or close the terminal window to stop NodeRED.

DSGW 210 08

The user then accesses the Node-RED editor by pointing your browser at http://localhost:1880.

DSGW 210 09

NOTE: Get the latest information, please refer to https://nodered.org/docs/getting started/raspberry pi

How to install Thingsboard

ThingsBoard is an open-source IoT platform for data collection, processing, visualization, and device management that enables rapid development, management, and scaling of IoT projects. its goal is to provide the out-of-the-box IoT cloud or on-premises solution that will enable server-side infrastructure for your IoT applications.

(Refer to ThingsBoard IoT Gateway for details)

Step 1. Install OpenJDK

sudo apt get
sudo apt install openjdk-11-jdk

Step 2. ThingsBoard Service installation

# Download installation package
Wget https://github.com/thingsboard/thingsboard/releases/download/v3.3.3/thingsboard-3.3.3.deb
# Install ThingsBoard as a service

Step 3. Configure ThingsBoard database

Step 4. ThingsBoard Configuration

# Edit Thingsboard configuration file
sudo nano /etc/thingsboard/conf/thingsboard.conf

Add the following lines to the configuration file

# Edit Thingsboard configuration file# DB Configuration
export DATABASE_TS_TYPE=sql
export SPRING_JPA_DATABASE_PLATFORM=org.hibernate.dialect.PostgreSQLDialect

Step 5. Choose Thingsboard queue service

# Edit Thingsboard configuration file
sudo nano /etc/thingsboard/conf/thingsboard.conf

Step 6. Run installation script

# --loadDemo option will load demo data: users, devices, assets, rules, widgets.
sudo /usr/share/thingsboard/bin/install/install.sh –loadDemo

Step 7. Start Thingsboard Service
Execute the following command to start ThingsBoard:

sudo service thingsboard start

Once started, you will be able to open Web UI using the following link:

http://localhost:8080/