Custom Setup on macOS

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: Install the driver for the BigClown Radio Dongle

Step 2: Restart your computer

Step 3: Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Step 4: Upgrade all packages

brew update && brew upgrade

Step 5: Install Mosquitto server and clients

brew install mosquitto
brew services start mosquitto

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

brew install node

Step 4: Install Node-RED

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

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

cd ~/.node-red/
npm i node-red-dashboard

Step 7: Install PM2

sudo npm install -g pm2

PM2 is a process manager that will help you to start Node-RED and other processes on boot.

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

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

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

brew install python3

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

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

Step 10: Install the BigClown Firmware Tool

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

Step 11: Install the BigClown Gateway

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

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

Step 13: 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 15: Upload the latest firmware into the BigClown Radio Dongle:

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

Step 16: 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 17: Open your web browser with the URL:

Playground Upgrade on macOS

Upgrade all the packages

brew update && brew 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