Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Install spinal-system-basic

The first step is to create the directory where the project will be stored. We will call it fine-wine-system. Then, install inside the “spinal-system-basic” template. We suggest that before running the following command you initialize an npm project (with npm init):

~/$ mkdir button-system ~/$ cd button-system ~/button-system$ npm init -y ~/button-system$ npm i

Increase Spinal-system : “button-system”

After the Getting Started & Getting Started Extended, you may have a Spinal-system called
button-system with some models and organs. We will use it to create an intelligent system with
more process in our system. We add viewer into our system, use our differents organs and
display them into the viewer. If you don’t know what is a viewer or what is drive, check
utilities : drive, viewer. If you don’t follow these step to install drive & viewer, you will not be
able to continue this tutorial.
Image Added
Actually we work in admin environment. This is an user manager environment and usually
we don’t work with sensor and data. That’s why we have a drive environment to share your
list and give some specific data for specific user. We have 3 basic user and you can create
some user from admin panel. We always work with admin user and we will continue but you
can do the same with another user.
admin

Launch spinal-system

Panel
titleGoal

Anchor
1
1

Description du systeme

We will create a simple IoT system that will alert us through a nice web interface whenever the temperature at our wine cellar is not between 10°C and 16°C. We will call this system FineWine.

Image Removed

This system, based on our understanding of intelligent micro-system, is composed of the following organs:

  • Nerve center: where the hub and its data are located.

  • Admin dashboard: the administration interface of your hub.

  • VirtualTemperatureSensor organ: simulate the temperature sensor of the wine cellar continuously and synchronize the samples with the hub.

  • Analytics organ: analyzes the temperature and alerts if the temperature is ok or not.

  • Monitoring interface organ: a web interface, displaying the current status of our wine cellar.

Panel
titleCreating a new Spinal System
Anchor
22
Code Block
languagebash
themeDJango
Code Block
languagebash
themeDJango
~/button-system$ pm2 start launch.config.js

PM2 will automatically start the Spinal Hub and the organs. Take care, if you have another hub running on port 7777, your new hub will not be launched ! (here is a command to see what port are used on ubuntu: sudo netstat -lp --inet)

After this installation, only SpinalHub is running on port 7777. SpinalHub containes a web server that provide his own Admin interface. Here is the architecture of the system you have after this first install:

Connect to Admin UI

As we have done in the getting started, connect to the admin dashboard to see if you hub is running :

http://127.0.0.1:7777/html/admin

The default admin account is :

Username

client ID

Passwordadmin168JHGgcz45JKilmzknzelf65ddDadggftIO98P

fine-wine-system Folder organization

Image Removed

  • .browser_organs : This is your web browser folder

  • .config_env : Your env configuration

  • nerve-center : The Spinalcom nerve center

  • node_modules : npm (node package manager) & spinal-package

  • .apps.json : installed package of your spinal system

  • .config.json : spinalcom connection configuration file

  • launch.config.js : Start your hub using pm2

  • package.json : config of your package


    Panel
    titleShare your automate & create your digital twin

    Anchor
    2
    2

    Share your automate & create your digital twin

    To give our list to an user, just do a right click and share the list to the user “admin”.
    To see if everything is fine just open drive panel and go into the folder “share with me”.

    Image Added

    Image Added


    Panel
    titleCreate a data model

    Anchor
    3
    3


    Panel
    titleCreate our new virtualButton organ

    Anchor
    4
    4


    Panel
    titleLaunch the system

    Anchor
    5
    5

    Panel
    titleCreate our second organ : virtualButtonMonitor

    Anchor
    66


    Conclusion