Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

 

Expected completion time of this lab: 20 min.

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

JsonServer

  • Double-click on smartmeshsdk\app\JsonServer\JsonServer.py. The application starts
  • The h command allows you to get a list of available commands

    > h
    Available commands:
     - help (h): print this menu
     - info (i): information about this application
     - quit (q): quit this application
     - uptime (ut): how long this application has been running
     - status (s): get the current status of the application
     - seriaports (sp): list the available serialports
     - connectmanager (cm): connect to a manager's API serial port
     - disconnectmanager (dm): disconnect from a manager's API serial port
    >
  • type "sp". What are the available serial ports on your computer?

    Answer 1:


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

    The API serial port is the 4th one. So if the "sm" command returns

    COM3, COM4, COM5, COM6

    The API port is COM6

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

Node-RED

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

    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:
     
  • No labels