Custom Setup on Ubuntu

Introduction

If you need more permanent solution than BigClown Playground you can install all the services yourself in your system. This guide will help you to install and configure these services:

  • BigClown Gateway bcg

  • BigClown Firmware Tool bcf

  • BigClown Host Tool bch

  • Mosquitto MQTT broker

  • Node-RED

  • The process manager pm2

Playground Setup on Ubuntu

  • open Terminal application

Step 1: Upgrade all packages

sudo apt update && sudo apt upgrade

Step 2: Install Mosquitto server and clients

sudo apt install mosquitto mosquitto-clients

Step 3: Install Node.js version 6 (required by Node-RED)

sudo apt install nodejs nodejs-legacy npm

Step 4: Install Node-RED

sudo npm install -g --unsafe-perm node-red

Step 5: Install node-red-dashboard for graphs, gauges, buttons

sudo npm install -g pm2

Step 6: Install PM2

sudo npm install -g pm2

Step 7: Tell PM2 to run Node-RED

pm2 start `which node-red`

Step 8: Tell PM2 to run on boot

pm2 save
pm2 startup systemd

Now you must follow the instructions provided by the command pm2 startup systemd.

Step 9: Install Python 3 (required by the BigClown Firmware Tool and BigClown Gateway)

sudo apt install python3.5 python3-pip

Step 10: Update pip (Python Package Manager) to the latest version

sudo pip3 install --upgrade --no-cache-dir pip

Step 11: Install the BigClown Firmware Tool

sudo pip3 install --upgrade --no-cache-dir bcf

Step 12: Install the BigClown Gateway

sudo pip3 install --upgrade --no-cache-dir bcg

Step 13: Add yourself to the dialout user group

sudo usermod $USER -a -G dialout

Step 14: Plug the BigClown Radio Dongle into a USB port

Step 15: List the available devices

bcf devices

You can use -v parameter to see verbose information about the connected devices (possibly helping you to identify them).

Step 16: Upload the latest firmware into the BigClown Radio Dongle:

bcf update
bcf flash bigclownlabs/bcf-gateway-usb-dongle:latest

Step 17: Start the BigClown Gateway as PM2 service:

pm2 start `which python3` --name "bcg-ud" -- `which bcg` --device ...

Replace ... with the device listed using bcf devices.

If you want to update firmware in the Radio Dongle, first you have to stop bcg by the command pm2 stop bcg-ud. After update, restart the service by the command pm2 restart bcg-ud.

Step 18: Open your web browser with the URL:

Playground Upgrade on Ubuntu

Upgrade all the packages

sudo apt update && sudo apt upgrade

Upgrade Node-RED

sudo npm update -g node-red

Upgrade PM2

sudo npm update -g pm2

Upgrade the BigClown Firmware Tool

sudo pip3 install --upgrade --no-cache-dir bcf

Upgrade the BigClown Gateway

sudo pip3 install --upgrade --no-cache-dir bcg