Commit 7624db21 authored by Rostislav Spinar's avatar Rostislav Spinar

Update for release v2

parent fcf14656
# UP-IQRF IoT Starter Kit - Installation
* Part 1: [Build your IQRF network](https://github.com/iqrfsdk/iot-starter-kit/tree/master/install/PART1-NET.md)
* Part 2: [Install your IQRF gateway](https://github.com/iqrfsdk/iot-starter-kit/tree/master/install/PART2-GW.md)
* Part 3: [Connect to cloud](https://github.com/iqrfsdk/iot-starter-kit/tree/master/install/PART3-EXT.md)
* Part 1: [Build your IQRF network](https://gitlab.iqrf.org/open-source/iot-starter-kit/tree/master/install/PART1-NET.md)
* Part 2: [Install your IQRF gateway](https://gitlab.iqrf.org/open-source/iot-starter-kit/tree/master/install/PART2-GW.md)
* Part 3: [Connect to cloud](https://gitlab.iqrf.org/open-source/iot-starter-kit/tree/master/install/PART3-EXT.md)
Create your IQRF network, install and configure your IQRF gateway, set the MQTT connection to the selected cloud. The prepared tutorials help you with the basic settings of all parts.
......
......@@ -5,7 +5,7 @@ A set of commands that all install. [here](https://github.com/JoTioTech/IQRF-IoT
## OS (ubilinux3 / ubilinux4) with installed IQRF Daemon and configuratio WebApp
### Run Docker
Install Docker -> See the inspiration [here](https://github.com/iqrfsdk/iqrf-daemon/blob/master/DOCKER.md)
Install Docker -> See the inspiration [here](https://gitlab.iqrf.org/open-source/iqrf-daemon/blob/master/DOCKER.md)
### Setup Node-RED ecosystem
### docker_net
......@@ -24,7 +24,7 @@ sudo docker run -d -p 1880:1880 --restart=always --network=isolated_nw --ip=172.
Open:
http://[IP address of UpBoard]:1880
Import the contents of this [file](https://github.com/iqrfsdk/iot-starter-kit/blob/master/extensions/jotio.cz/Nodered_Local_demo.json) into nodered.
Import the contents of this [file](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/extensions/jotio.cz/Nodered_Local_demo.json) into nodered.
......@@ -2,7 +2,7 @@
## Step 1 - Insert IQRF Coordinator
![IQRF SPI board](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-spi-board.png)
![IQRF SPI board](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-spi-board.png)
* Attach [IQRF SPI board](http://www.iqrf.org/weben/downloads.php?id=412)
* Insert prepared IQRF Coordinator to the IQRF SPI board
......@@ -18,7 +18,7 @@ sudo apt update && sudo apt full-upgrade -y
## Step 3 - Install Docker CE
* Install [Docker for Debian 9.0 Stretch](https://github.com/iqrfsdk/iqrf-daemon/blob/master/docker/INSTALL.md)
* Install [Docker for Debian 9.0 Stretch](https://gitlab.iqrf.org/open-source/iqrf-daemon/blob/master/docker/INSTALL.md)
## Step 4 - Run Docker image
......@@ -33,7 +33,7 @@ docker container run -d -p 80:80 -p 1883:1883 -p 8080:8080 -p 9001:9001 --device
```bash
http://localhost:8080
```
![IQRF daemon WebAPP dashboard](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-gateway.png "IQRF daemon WebAPP dashboard")
![IQRF daemon WebAPP dashboard](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-gateway.png "IQRF daemon WebAPP dashboard")
* Login using: user=admin; pass=iqrf
......@@ -42,21 +42,21 @@ http://localhost:8080
```bash
http://localhost/ui
```
![IQRF App dashboard](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-ui.png "IQRF App dashboard")
![IQRF App dashboard](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/node-red-ui.png "IQRF App dashboard")
### Check Node-RED flow
```bash
http://localhost
```
![IQRF App flow](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-flows.png "IQRF App flow")
![IQRF App flow](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/node-red-flows.png "IQRF App flow")
### Check Supervisor Service dashboard
```bash
http://localhost:9001
```
![IQRF Supervisor dashboard](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/supervisor-dashboard.png "IQRF Supervisor dashboard")
![IQRF Supervisor dashboard](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/supervisor-dashboard.png "IQRF Supervisor dashboard")
## Optional - Stop Docker image
......
# IoT Starter Kit - Part 2: IQRF GW
## Step 1 - Download IoT Starter Kit installer image
[IoT Starter Kit installer](https://dl.iqrfsdk.org/iot-starter-kit-v080-installer.img.bz2)
Installer burns complete image right after the boot without any user interaction, just wait:
* Ubilinux 4.0
* IQRF daemon
* IQRF daemon webapp
* Mosquitto broker
* Nodejs
* Node-RED
* Node-RED IoT Starter Kit dashboard
* Gparted
Burning is signalled by blinking of the GREEN led on the UP board. When we are done blinking stops.
## Step 2 - Install 7-Zip and Rufus tools
* Download and install [7-Zip](http://www.7-zip.org/)
* Download and install [Rufus](https://rufus.akeo.ie/)
## Step 3 - Extract image and burn it to 8G(16G) USB disk
* Extract image using 7-Zip
* Burn image to USB disk using Rufus
![Burn installer to 8G(16G) USB disk](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/rufus-burn-installer.png)
## Step 4 - Plug 8G(16G) USB installer to the UP board
* Plug 8G(16G) USB installer to the UP board
* Let the UP board boot from USB (Press F7 and select UEFI disk to boot from)
* Wait till blinking of GREEN led is stopped
* Power-off the UP board
* Unplug USB installer
## Step 5 - Insert IQRF coordinator
![IQRF SPI board](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-spi-board.png)
* Attach [IQRF SPI board](http://www.iqrf.org/weben/downloads.php?id=412)
* Insert prepared IQRF Coordinator to the IQRF SPI board
## Step 6 - Boot installed image
* Power-on the UP board and boot normally
* Login using: user=ubilinux; pass=ubilinux
* Run Gparted and extend UP board flash to 32GB
Enjoy, your are done!
Now, check all is fine!
## Step 7 - Check IQRF daemon WebAPP dashboard
```bash
http://localhost
```
![IQRF daemon WebAPP dashboard](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-gateway.png "IQRF daemon WebAPP dashboard")
* Login using: user=admin; pass=iqrf
## Step 8 - Check Node-RED dashboard
```bash
http://localhost:1880/ui
```
![IQRF App dashboard](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-ui.png "IQRF App Dashboard")
## Step 9 - Check Node-RED flow
```bash
http://localhost:1880
```
![IQRF App flow](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-flows.png "IQRF App Flow")
......@@ -2,7 +2,7 @@
**Install an operating system, IQRF Gateway Daemon and basic services on the UP board and make the IQRF Gateway from it. Read data from sensors and control relays from a Node-RED application.**
Carefully read and follow the detailed step-by-step instructions! **[PDF Guide](https://github.com/iqrfsdk/iot-starter-kit/tree/master/install/pdf/iqrf-part2.pdf)** will be opened in a viewer mode. We strongly recommend downloading it and open on your computer locally to have hyperlinks functional and to be able to copy strings. The Download button you will find at the top of the page with a PDF preview.
Carefully read and follow the detailed step-by-step instructions! **[PDF Guide](https://gitlab.iqrf.org/open-source/iot-starter-kit/tree/master/install/pdf/iqrf-part2.pdf)** will be opened in a viewer mode. We strongly recommend downloading it and open on your computer locally to have hyperlinks functional and to be able to copy strings. The Download button you will find at the top of the page with a PDF preview.
In this part, you will:
......@@ -15,9 +15,9 @@ In this part, you will:
* Install Node-RED and run IoT-Starter-Kit flow
* Read data from sensors and control relays from a Node-RED application
When you’ve completed this part, you’ll be ready for **[Part 3: Connect to the cloud](https://github.com/iqrfsdk/iot-starter-kit/tree/master/install/PART3-EXT.md)**.
When you’ve completed this part, you’ll be ready for **[Part 3: Connect to the cloud](https://gitlab.iqrf.org/open-source/iot-starter-kit/tree/master/install/PART3-EXT.md)**.
If you need to customize the IQRF Gateway, study **[Optional steps with UP board](https://github.com/iqrfsdk/iot-starter-kit/tree/master/install/up-board/GW-SbS-INSTALL.md)**, or read instructions for **[Raspberry PI installation](https://github.com/iqrfsdk/iot-starter-kit/tree/master/install/rpi-board/GW-SbS-INSTALL.md)**.
If you need to customize the IQRF Gateway, study **[Optional steps with UP board](https://gitlab.iqrf.org/open-source/iot-starter-kit/tree/master/install/up-board/GW-SbS-INSTALL.md)**, or read instructions for **[Raspberry PI installation](https://gitlab.iqrf.org/open-source/iot-starter-kit/tree/master/install/rpi-board/GW-SbS-INSTALL.md)**.
## Watch our video guide
......
......@@ -4,7 +4,7 @@
## Connect to Amazon Web Services
Carefully read and follow the detailed step-by-step instructions! **[PDF Guide](https://github.com/iqrfsdk/iot-starter-kit/tree/master/install/pdf/iqrf-part3a.pdf)** will be opened in a viewer mode. We strongly recommend downloading it and open on your computer locally to have hyperlinks functional and to be able to copy strings. The Download button you will find at the top of the page with a PDF preview.
Carefully read and follow the detailed step-by-step instructions! **[PDF Guide](https://gitlab.iqrf.org/open-source/iot-starter-kit/tree/master/install/pdf/iqrf-part3a.pdf)** will be opened in a viewer mode. We strongly recommend downloading it and open on your computer locally to have hyperlinks functional and to be able to copy strings. The Download button you will find at the top of the page with a PDF preview.
In this part, you will:
......@@ -21,7 +21,7 @@ In this part, you will:
## Connect to Microsoft Azure
Carefully read and follow the detailed step-by-step instructions! **[PDF Guide](https://github.com/iqrfsdk/iot-starter-kit/tree/master/install/pdf/iqrf-part3b.pdf)** will be opened in a viewer mode. We strongly recommend downloading it and open on your computer locally to have hyperlinks functional and to be able to copy strings. The Download button you will find at the top of the page with a PDF preview.
Carefully read and follow the detailed step-by-step instructions! **[PDF Guide](https://gitlab.iqrf.org/open-source/iot-starter-kit/tree/master/install/pdf/iqrf-part3b.pdf)** will be opened in a viewer mode. We strongly recommend downloading it and open on your computer locally to have hyperlinks functional and to be able to copy strings. The Download button you will find at the top of the page with a PDF preview.
In this part, you will:
......@@ -38,7 +38,7 @@ In this part, you will:
## Connect to IBM Cloud
Carefully read and follow the detailed step-by-step instructions! **[PDF Guide](https://github.com/iqrfsdk/iot-starter-kit/tree/master/install/pdf/iqrf-part3c.pdf)** will be opened in a viewer mode. We strongly recommend downloading it and open on your computer locally to have hyperlinks functional and to be able to copy strings. The Download button you will find at the top of the page with a PDF preview.
Carefully read and follow the detailed step-by-step instructions! **[PDF Guide](https://gitlab.iqrf.org/open-source/iot-starter-kit/tree/master/install/pdf/iqrf-part3c.pdf)** will be opened in a viewer mode. We strongly recommend downloading it and open on your computer locally to have hyperlinks functional and to be able to copy strings. The Download button you will find at the top of the page with a PDF preview.
In this part, you will:
......
......@@ -2,7 +2,7 @@
## Step 1 - Insert IQRF coordinator
![IQRF SPI board](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-spi-board.png)
![IQRF SPI board](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-spi-board.png)
* Attach [IQRF SPI board](http://www.iqrf.org/weben/downloads.php?id=412)
* Insert prepared IQRF Coordinator to the IQRF SPI board
......@@ -91,12 +91,12 @@ sudo mosquitto_passwd -c /etc/mosquitto/passwd <user_name>
#### Create ACL file
* Add [ACL file](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/rpi-board/mosquitto/acls)
* Add [ACL file](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/rpi-board/mosquitto/acls)
to your /etc/mosquitto folder
#### Modify mosquitto configuration
* Include lines to enable authorization as in [configuration file](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/rpi-board/mosquitto/mosquitto.conf) to your /etc/mosquitto/mosquitto.conf file
* Include lines to enable authorization as in [configuration file](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/rpi-board/mosquitto/mosquitto.conf) to your /etc/mosquitto/mosquitto.conf file
* Restart MQTT broker
......@@ -108,7 +108,7 @@ sudo systemctl restart mosquitto.service
#### Modify mosquitto configuration
* Include lines to enable websocket as in [configuration file](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/rpi-board/mosquitto/mosquitto.conf) to your /etc/mosquitto/mosquitto.conf file
* Include lines to enable websocket as in [configuration file](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/rpi-board/mosquitto/mosquitto.conf) to your /etc/mosquitto/mosquitto.conf file
* Restart MQTT broker
......@@ -116,55 +116,49 @@ sudo systemctl restart mosquitto.service
sudo systemctl restart mosquitto.service
```
## Step 5A - Install IQRF Gateway Daemon
## Step 5A - Stop IQRF Gateway Daemon v1
```bash
sudo apt-get install -y dirmngr
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9C076FCC7AB8F2E43C2AB0E73241B9B7B4BD8F8E
echo "deb http://repos.iqrfsdk.org/raspbian stretch stable" | sudo tee -a /etc/apt/sources.list
sudo apt-get update && sudo apt-get install -y iqrf-daemon
sudo systemctl stop iqrf-daemon
sudo systemctl disable iqrf-daemon
```
### Step 5B - Confirm IQRF Gateway Daemon is running
## Step 5B - Install IQRF Gateway Daemon
```bash
systemctl status iqrf-daemon.service
sudo apt-get install -y dirmngr
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9C076FCC7AB8F2E43C2AB0E73241B9B7B4BD8F8E
echo "deb http://repos.iqrf.org/debian stretch stable" | sudo tee -a /etc/apt/sources.list.d/iqrf-gateway.list
sudo apt-get update && sudo apt-get install -y iqrf-gateway-daemon
```
### Step 5C - Confirm IQRF Gateway Daemon is running
```bash
pi@raspberrypi:~$ systemctl status iqrf-daemon.service
â iqrf-daemon.service - IQRF daemon iqrf_startup
Loaded: loaded (/lib/systemd/system/iqrf-daemon.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2017-11-22 17:31:01 UTC; 52s ago
Main PID: 15905 (iqrf_startup)
Tasks: 11 (limit: 4915)
CGroup: /system.slice/iqrf-daemon.service
ââ15905 /usr/bin/iqrf_startup /etc/iqrf-daemon/config.json
systemctl status iqrf-gateway-daemon.service
```
## Step 6A - Install IQRF Gateway Daemon WebApp
```bash
cd /home/pi
sudo apt-get install -y git && git clone https://github.com/iqrfsdk/iqrf-daemon-webapp.git
cd iqrf-daemon-webapp/install/
sudo python3 install.py -d debian -v 9
sudo apt-get install -y iqrf-gateway-webapp
```
### Step 6B - Confirm IQRF Gateway Daemon WebApp is running
```bash
http://your-rpi-ip/en
http://localhost/en
```
![IQRF Gateway Daemon WebApp dashboard](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp.png "IQRF Gateway Daemon WebApp dashboard")
![IQRF Gateway Daemon WebApp dashboard](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp.png "IQRF Gateway Daemon WebApp dashboard")
* Login using: user=admin; pass=iqrf
* Create your own login credentials
## Step 7A - Configure IQRF SPI interface
```bash
http://your-rpi-ip/en/config/iqrf
```
![Select spidev0.0 interface](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-config-iqrf.png "Select spidev0.0 interface")
![Select spidev0.0 interface](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-config-iqrf.png "Select spidev0.0 interface")
* Select available interface!
* Save new configuration!
......@@ -174,7 +168,7 @@ http://your-rpi-ip/en/config/iqrf
```bash
http://your-rpi-ip/en/service
```
![Restart IQRF Gateway Daemon](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-service-restart.png "Restart IQRF Gateway Daemon")
![Restart IQRF Gateway Daemon](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-service-restart.png "Restart IQRF Gateway Daemon")
* Hit Restart!
......@@ -205,14 +199,14 @@ pm2 start /usr/bin/node-red --node-args="--max-old-space-size=128"
```bash
http://your-rpi-ip:1880
```
![Manage palete](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-add-dashboard-1.png "Manage palete")
![Install node-red-dashboard](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-add-dashboard-2.png "Install node-red-dashboard")
![Manage palete](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/node-red-add-dashboard-1.png "Manage palete")
![Install node-red-dashboard](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/node-red-add-dashboard-2.png "Install node-red-dashboard")
### Step 9D - Run IoT-Starter-Kit flow
```bash
cd /home/pi
git clone https://github.com/iqrfsdk/iot-starter-kit.git
git clone https://gitlab.iqrf.org/open-source/iot-starter-kit.git
cd iot-starter-kit/install
cp rpi-board/node-red/* /home/pi/.node-red
pm2 restart node-red
......@@ -261,25 +255,25 @@ systemctl status pm2-pi
```bash
http://your-rpi-ip:1880/ui
```
![IQRF Gateway App dashboard](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-ui.png "IQRF Gateway App Dashboard")
![IQRF Gateway App dashboard](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/node-red-ui.png "IQRF Gateway App Dashboard")
### Step 10B - Check Node-RED flow
```bash
http://your-rpi-ip:1880
```
![IQRF Gateway App flow](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-flows.png "IQRF Gateway App Flow")
![IQRF Gateway App flow](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/node-red-flows.png "IQRF Gateway App Flow")
### Step 10C - Blink coordinator LEDR from IQRF Gateway Daemon WebApp
```bash
http://your-rpi-ip/en/iqrfnet/send-raw
```
![IQRF Send DPA packet](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-pulse-ledr.png "IQRF Send DPA packet")
![IQRF Send DPA packet](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-pulse-ledr.png "IQRF Send DPA packet")
* Select macro Pulse LEDR and send it!
![IQRF JSON DPA RAW structure](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-pulse-ledr-json-raw.png "IQRF JSON DPA RAW structure")
![IQRF JSON DPA RAW structure](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-pulse-ledr-json-raw.png "IQRF JSON DPA RAW structure")
* Learn JSON DPA RAW structure!
......@@ -301,8 +295,8 @@ mosquitto_sub -t Iqrf/DpaResponse
```bash
cd /home/pi
git clone https://github.com/iqrfsdk/iqrf-daemon-examples.git
cd iqrf-daemon-examples
git clone https://gitlab.iqrf.org/open-source/iqrf-gateway-daemon.git
cd iqrf-gateway-daemon/examples
```
* Contribution to the examples very much appreciated!
......
......@@ -2,7 +2,7 @@
## Step 1 - Insert IQRF coordinator
![IQRF SPI board](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-spi-board.png)
![IQRF SPI board](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-spi-board.png)
* Attach [IQRF SPI board](http://www.iqrf.org/weben/downloads.php?id=412)
* Insert prepared IQRF Coordinator to the IQRF SPI board
......@@ -56,12 +56,12 @@ sudo mosquitto_passwd -c /etc/mosquitto/passwd <user_name>
#### Create ACL file
* Add [ACL file](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/up-board/mosquitto/acls)
* Add [ACL file](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/up-board/mosquitto/acls)
to your /etc/mosquitto folder
#### Modify mosquitto configuration
* Include lines to enable authorization as in [configuration file](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/up-board/mosquitto/mosquitto.conf) to your /etc/mosquitto/mosquitto.conf file
* Include lines to enable authorization as in [configuration file](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/up-board/mosquitto/mosquitto.conf) to your /etc/mosquitto/mosquitto.conf file
* Restart MQTT broker
......@@ -73,7 +73,7 @@ sudo systemctl restart mosquitto.service
#### Modify mosquitto configuration
* Include lines to enable websocket as in [configuration file](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/up-board/mosquitto/mosquitto.conf) to your /etc/mosquitto/mosquitto.conf file
* Include lines to enable websocket as in [configuration file](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/up-board/mosquitto/mosquitto.conf) to your /etc/mosquitto/mosquitto.conf file
* Restart MQTT broker
......@@ -81,38 +81,32 @@ sudo systemctl restart mosquitto.service
sudo systemctl restart mosquitto.service
```
## Step 5A - Install IQRF Gateway Daemon
## Step 5A - Stop IQRF Gateway Daemon v1
```bash
sudo apt-get install -y dirmngr
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9C076FCC7AB8F2E43C2AB0E73241B9B7B4BD8F8E
echo "deb http://repos.iqrfsdk.org/debian stretch stable" | sudo tee -a /etc/apt/sources.list.d/iqrf-daemon.list
sudo apt-get update && sudo apt-get install -y iqrf-daemon
sudo systemctl stop iqrf-daemon
sudo systemctl disable iqrf-daemon
```
### Step 5B - Confirm IQRF Gateway Daemon is running
## Step 5B - Install IQRF Gateway Daemon
```bash
systemctl status iqrf-daemon.service
sudo apt-get install -y dirmngr
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9C076FCC7AB8F2E43C2AB0E73241B9B7B4BD8F8E
echo "deb http://repos.iqrf.org/debian stretch stable" | sudo tee -a /etc/apt/sources.list.d/iqrf-gateway.list
sudo apt-get update && sudo apt-get install -y iqrf-gateway-daemon
```
### Step 5C - Confirm IQRF Gateway Daemon is running
```bash
ubilinux@ubilinux:~$ systemctl status iqrf-daemon.service
â iqrf-daemon.service - IQRF daemon iqrf_startup
Loaded: loaded (/lib/systemd/system/iqrf-daemon.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2017-11-22 17:31:01 UTC; 52s ago
Main PID: 15905 (iqrf_startup)
Tasks: 11 (limit: 4915)
CGroup: /system.slice/iqrf-daemon.service
ââ15905 /usr/bin/iqrf_startup /etc/iqrf-daemon/config.json
systemctl status iqrf-gateway-daemon.service
```
## Step 6A - Install IQRF Gateway Daemon WebApp
```bash
cd /home/ubilinux
git clone https://github.com/iqrfsdk/iqrf-daemon-webapp.git
cd iqrf-daemon-webapp/install/
sudo python3 install.py -d debian -v 9
sudo apt-get install -y iqrf-gateway-webapp
```
### Step 6B - Confirm IQRF Gateway Daemon WebApp is running
......@@ -120,16 +114,16 @@ sudo python3 install.py -d debian -v 9
```bash
http://localhost/en
```
![IQRF Gateway Daemon WebApp dashboard](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp.png "IQRF Gateway Daemon WebApp dashboard")
![IQRF Gateway Daemon WebApp dashboard](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp.png "IQRF Gateway Daemon WebApp dashboard")
* Login using: user=admin; pass=iqrf
* Create your own login credentials
## Step 7A - Configure IQRF SPI interface
```bash
http://localhost/en/config/iqrf
```
![Select spidev2.0 interface](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-config-iqrf.png "Select spidev2.0 interface")
![Select spidev2.0 interface](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-config-iqrf.png "Select spidev2.0 interface")
* Select available interface!
* Save new configuration!
......@@ -139,7 +133,7 @@ http://localhost/en/config/iqrf
```bash
http://localhost/en/service
```
![Restart IQRF Gateway Daemon](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-service-restart.png "Restart IQRF Gateway Daemon")
![Restart IQRF Gateway Daemon](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-service-restart.png "Restart IQRF Gateway Daemon")
* Hit Restart!
......@@ -147,7 +141,7 @@ http://localhost/en/service
```bash
cd /home/ubilinux
git clone https://github.com/iqrfsdk/iot-starter-kit.git
git clone https://gitlab.iqrf.org/open-source/iot-starter-kit.git
cd iot-starter-kit/install
sudo cp etc/lsb-release-debian /etc/lsb-release
sudo apt-get install curl
......@@ -175,8 +169,8 @@ pm2 start /usr/bin/node-red
```bash
http://localhost:1880
```
![Manage palete](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-add-dashboard-1.png "Manage palete")
![Install node-red-dashboard](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-add-dashboard-2.png "Install node-red-dashboard")
![Manage palete](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/node-red-add-dashboard-1.png "Manage palete")
![Install node-red-dashboard](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/node-red-add-dashboard-2.png "Install node-red-dashboard")
### Step 9D - Run IoT-Starter-Kit flow
......@@ -229,25 +223,25 @@ systemctl status pm2-ubilinux
```bash
http://localhost:1880/ui
```
![IQRF Gateway App dashboard](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-ui.png "IQRF App Dashboard")
![IQRF Gateway App dashboard](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/node-red-ui.png "IQRF App Dashboard")
### Step 10B - Check Node-RED flow
```bash
http://localhost:1880
```
![IQRF Gateway App flow](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/node-red-flows.png "IQRF App Flow")
![IQRF Gateway App flow](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/node-red-flows.png "IQRF App Flow")
### Step 10C - Blink coordinator LEDR from IQRF Gateway Daemon WebAPP
```bash
http://localhost/en/iqrfnet/send-raw
```
![IQRF Send DPA packet](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-pulse-ledr.png "IQRF Send DPA packet")
![IQRF Send DPA packet](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-pulse-ledr.png "IQRF Send DPA packet")
* Select macro Pulse LEDR and send it!
![IQRF JSON DPA RAW structure](https://github.com/iqrfsdk/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-pulse-ledr-json-raw.png "IQRF JSON DPA RAW structure")
![IQRF JSON DPA RAW structure](https://gitlab.iqrf.org/open-source/iot-starter-kit/blob/master/install/pics/iqrf-daemon-webapp-pulse-ledr-json-raw.png "IQRF JSON DPA RAW structure")
* Learn JSON DPA RAW structure!
......@@ -269,8 +263,8 @@ mosquitto_sub -t Iqrf/DpaResponse
```bash
cd /home/ubilinux
git clone https://github.com/iqrfsdk/iqrf-daemon-examples.git
cd iqrf-daemon-examples
git clone https://gitlab.iqrf.org/open-source/iqrf-gateway-daemon.git
cd iqrf-gateway-daemon/examples
```
* Contribution to the examples very much appreciated!
......
# IQRF(A) Gateways
![Gateway schema](https://github.com/iqrfsdk/iqrf-daemon/blob/master/doc/iqrf-gateways.png "Schema for GWs")
- https://github.com/iqrfsdk/iqrf-daemon/
- https://github.com/iqrfsdk/iqrf-daemon/wiki
# Hands-on Workshop
![Workshop schema](schema/workshop-schema.png "Schema for the workshop")
1. Setup IQRF sensors and actuators
2. Install Linux OS
3. Install IQRF daemon
4. Install MQTT broker
5. Configure IQRF daemon
6. Test MQTT channel
7. Test UDP channel
8. Test MQ channel
9. Connect GW to Azure Cloud
## 1. Setup IQRF sensors and actuators
- Download IQRF Startup [package](http://www.iqrf.org/support/how-to-start)
- Install IQRF IDE software that is included in the package
- Upload DPA plugins, custom handlers and configurations
- Use IDE macros for IoT Starter Kit to test your IQRF mesh network
## 2. Install Linux
- UbiLinux
- Ubuntu
- Yocto
## 3. Install IQRF daemon
### Connect IQRF module
- [Connect](http://www.iqrf.org/weben/downloads.php?id=412) IQRF SPI board to the UP board extension connector
- Plug-in already prepared IQRF coordinator to IQRF SPI board
### Connect to UP board
- Download [Putty](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) and connect to your UP board via SSH (192.168.13.x)
### Installation from IQRF repository
- Download public key to verify the packages from the repository
```bash
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 66CB9A85
```
- Add repository to the source list
```bash
echo "deb http://repos.iqrfsdk.org/debian jessie testing" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
```
- Install the daemon
```bash
sudo apt-get install iqrf-daemon
```
- Check the iqrf-daemon service status
```bash
sudo systemctl status iqrf-daemon.service
```
## 4. Install MQTT mosquitto broker
```bash
sudo apt-get update
sudo apt-get install mosquitto
```
## 5. Configure IQRF daemon by [iqrf-daemon-webapp](https://github.com/iqrfsdk/iqrf-daemon-webapp)
- Use your browser to http://192.168.13.x (admin/iqrf)
- Configure the daemon components
- Restart the iqrf-daemon service
## 6. Test MQTT channel
- Download MQTT Paho [client](http://repo.eclipse.org/content/repositories/paho-releases/org/eclipse/paho/org.eclipse.paho.ui.app/1.0.0/org.eclipse.paho.ui.app-1.0.0-win32.win32.x86.zip) for Win/Linux
- Connect Paho client to your Mosquitto broker on the UP (192.168.13.x)
- Use prepared JSON [examples](json-messages/1-dpa-raw) to communicate with IQRF sensors and actuators
## 7. Test UDP channel
- Switch the daemon to **Service** mode by prepared JSON [examples](json-messages/5-conf-mode)
- Connect IQRF IDE to the UP board via UDP
- Run IQMesh Network Manager to control your IQRF network
- Switch the daemon to **Forwarding** mode by prepared JSON [examples](json-messages/5-conf-mode)
- Send any JSON [message](json-messages/1-dpa-raw) from Paho client
- Switch the daemon back to **Operational** mode by prepared JSON [examples](json-messages/5-conf-mode)
## 8. Test MQ channel
- Use iqrf-daemon-webapp iqrfapp interface and send 01.00.06.03.ff.ff
- Or use Putty to connect to your UP board via SSH
- And use iqrfapp and prepared [scripts](scripts) to communicate via the daemon to IQRF network
## 9. Connect to Azure cloud
- Start with dev essentials [program](https://www.visualstudio.com/cs/dev-essentials/) and activate Azure package
- Create iothub in your Azure portal
- Create device in the iothub that will represent IQRF GW - UP board
- Use Device Explorer [app](https://github.com/Azure/azure-iot-sdk-csharp/releases) to connect to iothub
- Copy connection string (http://192.168.13.x/iqrf_hostnames.txt) from your Azure portal and put it to the Device Explorer
- Generate SAS token using Device Explorer - is used as password in MQTT [config](daemon-config/MqttMessaging.json)
- Update MQTT [config](daemon-config/MqttMessaging.json) in the iqrf-daemon
- Enable [scheduler](daemon-config/Scheduler.json) for regural every 30s readings from DDC-SE
- Restart the daemon in the webapp service interface
- Confirm receiving scheduled DDC-SE readings by Device Explorer [app](https://github.com/Azure/azure-iot-sdk-csharp/releases)
{
"Implements": "IService",
"Instances": [
{
"Name": "BaseServiceForMQ",
"Messaging": "MqMessaging",
"Serializers": [
"SimpleSerializer",
"JsonSerializer"
],
"Properties": {
}
},
{
"Name": "BaseServiceForMQTT1",
"Messaging": "MqttMessaging1",
"Serializers": [
"JsonSerializer"