SkillAgentSearch skills...

IoTgo

Open source IoT cloud service

Install / Use

/learn @itead/IoTgo
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

IoTgo

Introdution

IoTgo is an open source IoT platform, like WordPress, ZenCart and all other open source software, you can deploy your own IoTgo cloud service.

We at ITEAD Studio are committed to provide a complete set of hardware for IoTgo with open source hardware designs and open source firmware.

The overall IoTgo system architecture including IoTgo, IoTgo-compatible apps and IoTgo-compatible devices is illustrated by following graph.

IoTgo System Architecture

Single-board microcontroller (like Arduino) developers, single-board computer (like Raspberry PI) developers and other embedded system developers could use IoTgo Device API to connect their devices to IoTgo and then easily control their devices by utilizing IoTgo Web App.

Note: we also provide IoTgo-compatible Device Library which wraps IoTgo Device API. Please refer to IoTgo Arduino Library, IoTgo Segnix Library for details.

Web developers and mobile developers could use IoTgo Web API to build various apps that manage devices connected to IoTgo. To control those devices, IoTgo Device API can be used.

In one word, we want to provide cloud capability for device developers and device capability for app developers.

For more detailed information and a working IoTgo cloud service, please head over to iotgo.iteadstudio.com.

Future Plan

IoTgo is not an ordinary IoT cloud platform, we designed this platform to be open, simple and easy to use, so everyone can handle the hardware, software and website design in the same time.

However, this platform is still very primitive. For now, it only supports three simple device types. We know what we provide is not enough to satisfy your need. That’s why we set up this Future Plan to improve IoTgo step by step. Let’s see what we will do in the near future.

  1. Improve UI design: display device connecting status and last connect time on device detail page. [Connecting status added]

  2. Support GPS device: receive device GPS information and display the exact location on google map.

  3. Add the functions of brightness control and RGB adjustment for Light device.

  4. Show power consumption information and the control function for Switch device.

  5. Store historic data collected from all kinds of sensers.

  6. ~~Provide websocket interface and support bidirectional communication between IoTgo and devices.~~ [Done! Currently is only enabled for indie device]

  7. ~~Provide Android app code.~~ [Done! Please head over to IoTgo Android App]

If you have any advice, please contact us. We sincerely appreciate it.

Installation [Automatically almost]

If you just want to get a feel of IoTgo, or deploy it for internal use, we recommend IoTgo docker image which could set up a IoTgo instance by only 4 commands and within 3 minutes (depends on your internet bandwidth).

Note: IoTgo docker image should not be used in production environment, because it lacks several security features, such as Google reCAPTCHA

Update: Here is a video demonstration of installation process: http://v.youku.com/v_show/id_XMTM1NjQ2NjcwNA==.html

Prerequisite

  • Docker: An open platform for distributed applications for developers and sysadmins.

Install IoTgo

sudo docker pull dockerfile/mongodb
sudo docker pull humingchun/iotgo
sudo docker run -d --name mongodb dockerfile/mongodb mongod --smallfiles
sudo docker run -d -p 80:80 --name iotgo --link mongodb:mongodb humingchun/iotgo node /opt/IoTgo/bin/www

And that's all! You can now access IoTgo at your linux box's ip address and port 80.

If you want to use another port instead of 80, change the -p option in the last command from 80 to any other port, such as -p 3000:80.

The admin panel is at http://linuxBoxIp:linuxBoxPort/admin, and the default admin account is iotgo@iteadstudio.com, corresponding password is password. If you want to change the default account and password, you can use sudo docker exec -i -t iotgo /bin/bash to login IoTgo docker container and use text editor (vi for example) to change admin information in the config.js file.

Installation [Manually]

Install IoTgo manually takes some effort, but it also means everything is under control.

Prerequisite

  • Git: Free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

  • MongoDB: Open-source document database, the leading NoSQL database

  • Node.js: An asynchronous JavaScipt event driven framework, and yes, JavaScript on the server!

  • Forever: Running Node application as system service.

  • Bower: A package manager for the web, optimized for the front-end.

CentOS 6

yum install git
yum install mongodb
yum install npm
npm install forever -g
npm install bower

Install IoTgo

Get IoTgo source code from github.com

git clone https://github.com/itead/IoTgo.git

Change directory to downloaded IoTgo and install dependencies.

cd IoTgo && npm install

Change directory to IoTgo Web App frontend and install dependencies.

cd public/frontend && bower install

Change directory to IoTgo Web App backend and install dependencies.

cd ../backend && bower install

Change directory back to IoTgo root

cd ../..

Configure IoTgo

Copy config.js.sample to config.js which is the actual configuration file being used during IoTgo boot process.

cp config.js.sample config.js

Edit config.js and change corresponding fields to reflect your hosting environment.

module.exports = {
    host: 'iotgo.iteadstudio.com',          // Hostname of IoTgo
    db: {
        uri: 'mongodb://localhost/iotgo',   // MongoDB database address
        options: {
            user: 'iotgo',                  // MongoDB database username
            pass: 'iotgo'                   // MongoDB database password
        }
    },
    jwt: {
        secret: 'jwt_secret'                // Shared secret to encrypt JSON Web Token
    },
    admin:{
        'iotgo@iteadstudio.com': 'password' // Administrator account of IoTgo
    },
    page: {
        limit: 50,                          // Default query page limit
        sort: -1                            // Default query sort order
    },
    recaptcha: {
		    secret: 'reCAPTCHA secret key',			// https://developers.google.com/recaptcha/intro
        url: 'https://www.google.com/recaptcha/api/siteverify'
    }
};

Edit public/frontend/views/signup.html and add your reCAPTCHA site key applied from Google

<div ng-model="response" class="form-group" g-recaptcha
    g-recaptcha-sitekey="Your reCAPTCHA site key goes here"></div>

IoTgo as System Service

To manage IoTgo like system service, such as:

sudo service iotgo start  // Start IoTgo
sudo service iotgo stop // Stop IoTgo

and make IoTgo start automatically during OS boot, we can create init scripts utilizing Forever to monitor IoTgo.

The following init script is a working example. If you want to use it, please put the script in /etc/init.d/ folder and change file permission to 755. You may also need to change NAME, NODE_PATH, NODE_APPLICATION_PATH to reflect your hosting environment.

sudo touch /etc/init.d/iotgo
sudo chmod 755 /etc/init.d/iotgo
sudo update-rc.d iotgo defaults

Note: please refer to Node.js and Forever as a Service: Simple Upstart and Init Scripts for Ubuntu for detailed explanations of the script.

#!/bin/bash
#
# An init.d script for running a Node.js process as a service using Forever as
# the process monitor. For more configuration options associated with Forever,
# see: https://github.com/nodejitsu/forever
#
# This was written for Debian distributions such as Ubuntu, but should still
# work on RedHat, Fedora, or other RPM-based distributions, since none of the
# built-in service functions are used. So information is provided for both.
#

NAME="ITEAD IoTgo"
NODE_BIN_DIR="/usr/bin:/usr/local/bin"
NODE_PATH="/home/itead/IoTgo/node_modules"
APPLICATION_PATH="/home/itead/IoTgo/bin/www"
PIDFILE="/var/run/iotgo.pid"
LOGFILE="/var/log/iotgo.log"
MIN_UPTIME="5000"
SPIN_SLEEP_TIME="2000"
 
PATH=$NODE_BIN_DIR:$PATH
export NODE_PATH=$NODE_PATH
 
start() {
    echo "Starting $NAME"
    forever \
      --pidFile $PIDFILE \
      -a \
      -l $LOGFILE \
      --minUptime $MIN_UPTIME \
      --spinSleepTime $SPIN_SLEEP_TIME \
      start $APPLICATION_PATH 2>&1 > /dev/null &
    RETVAL=$?
}
 
stop() {
    if [ -f $PIDFILE ]; then
        echo "Shutting down $NAME"
        forever stop $APPLICATION_PATH 2>&1 > /dev/null
        rm -f $PIDFILE
        RETVAL=$?
    else
        echo "$NAME is not running."
        RETVAL=0
    fi
}
 
restart() {
    stop
    start
}
 
status() {
    echo `forever list` | grep -q "$APPLICATION_PATH"
    if [ "$?" -eq "0" ]; then
        echo "$NAME is running."
        RETVAL=0
    else
        echo "$NAME is not running."
        RETVAL=3
    fi
}
 
case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    status)
        status
        ;;
    restart)
        restart
        ;;
    *)
        echo "Usage: {start|stop|status|restart}"
        exit 1
        ;;
esac
exit $RETVAL

Running IoTgo

To run IoTgo, you can start it in console mode

DEBUG="iotgo" ./bin/www

To run IoTgo on other port instead of 80, you can use PORT environment varia

View on GitHub
GitHub Stars379
CategoryDevelopment
Updated14d ago
Forks219

Languages

HTML

Security Score

95/100

Audited on Mar 27, 2026

No findings