Versions Compared

Key

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

...

 On your computer, you will run both the JsonServer and Node-RED programs:

  • JsonServer is the program that connects to the API serial port of your manager and offers an HTTP interface

  • Node-RED interacts with the JsonServer over HTTP and offers a graphical user interface

Gliffy
imageAttachmentIdatt111460377
baseUrlhttps://dustcloud.atlassian.net/wiki
migration1
namejsonserver_node-red_setup
diagramAttachmentIdatt111460381
containerId40468536

...

  • using the "cm" command, connect the JsonServer to your manager's API port

    • the API serial port to connect to is the 4th one

    • so if command “sp” returns COM3, COM4, COM5, COM6 {'serialports': ['COM11', 'COM12', 'COM13', 'COM14']}, you need to connect to COM14

    • type cm COM14 to connect to COM6that manager

  • type "s". Verify the manager appears as "connected".

    Code Block
    > s
    {   'SmartMesh SDK version': '1.4.0.1',
        'current time': '04/12/2021 22:35:51',
        'managers': {'COM14': 'connected'},
        'running since': '04/12/2021 22:34:52 (0:00:58.863536 ago)',
        'threads running': [   'MainThread',
                               'SnapshotThread',
                               'DustCli',
                               'WebServer',
                               'ManagerHandler@COM14',
                               'COM14_HDLC',
                               'IpMgrSubscribe']}

Node-RED

  • in a command prompt, start Node-RED by typing

    Code Block
    C:\Users\twatteyne>node-red
    30 Mar 03:14:22 - [info]
    
    Welcome to Node-RED
    ===================
    
    30 Mar 03:14:22 - [info] Node-RED version: v0.16.2
    30 Mar 03:14:22 - [info] Node.js  version: v6.9.5
    30 Mar 03:14:22 - [info] Windows_NT 6.1.7601 x64 LE
    30 Mar 03:14:24 - [info] Loading palette nodes
    30 Mar 03:14:26 - [info] Dashboard version 2.3.2 started at /ui
    30 Mar 03:14:27 - [warn] ------------------------------------------------------
    30 Mar 03:14:27 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node
    30 Mar 03:14:27 - [warn] [tail] Not currently supported on Windows.
    30 Mar 03:14:27 - [warn] ------------------------------------------------------
    30 Mar 03:14:27 - [info] Settings file  : \Users\twatteyne\.node-red\settings.js
    
    30 Mar 03:14:27 - [info] User directory : \Users\twatteyne\.node-red
    30 Mar 03:14:27 - [info] Flows file     : \Users\twatteyne\.node-red\flows_HDC_S
    W01.json
    30 Mar 03:14:27 - [info] Server now running at http://127.0.0.1:1880/
    30 Mar 03:14:27 - [info] Starting flows
    30 Mar 03:14:27 - [info] Started flows
  • open http://127.0.0.1:1880 to see the Node-RED interface:

    Image RemovedImage Added

Tip

There are no question in this lab. This lab is preparation for all the ones that follow, in which we will be interacting with the Node-RED interface.