npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-smartmesh

v2.1.0

Published

Node-RED nodes for Analog Devices' SmartMesh IP™ Motes and Manager

Downloads

25

Readme

node-red-contrib-smartmesh

GitHub release master Build Status

Node-RED nodes for Analog Devices' DC2274A-A SmartMesh IP™ USB Network Manager.

DC2274A-A, Motes, RPi Zero WH and CANDY_Pi_Lite

The above picture shows a typical demonstration set including:

  • DC2274A-A SmartMesh IP™ USB Manager dongle
  • SmartMesh IP™ Motes containing controllable LED, temperature sensor and GPIO/UART/SPI/I2C interfaces
  • Raspberry Pi Zero WH for running Node-RED/CANDY RED(a custom version of Node-RED dedicated to CANDY Pi Lite)
  • CANDY Pi Lite LTE Board for 4G/LTE mobile connection to upload data/download control commands to/from cloud servers

Example Flow

The bundled example flow includes the following operations:

  • Turn on/off LED on remote motes
  • Getting LED on/off command results
  • Showing temperature data from remote motes
  • Showing SmartMesh network event notifications
  • Sending a binary data packet to a remote mote

Example flow

Easy to use

These are provided by the default firmware on the evaluation kit. So you don't have to flash a specific firmware to work the example but just turn all motes on and connect the USB manager to Raspberry Pi, ASUS Tinker Board or other Linux box where Node-RED runs.

Listing Active Motes

You can find the active (online) motes from the manager dialog while monitoring the flow.

DC2274A-A SmartMesh IP™ USB Manager Dialog

SmartMesh IP™ Document

See SmartMesh IP™ Tools Guide(PDF) for SmartMesh IP™ technical details.

Prerequisites

SmartMesh SDK v1.3.0.1 (GitHub repo) requires the following environments.

  1. Python 2.7 (Python 2.6/3.x are NOT supported)
  2. PySerial 3.4+

How to install

For Windows users, use Docker or Linux box VM to start Node-RED in order to install this node.

How to change Network ID

In order to change the current Network ID, run the following command manually with the SmartMesh IP Manager CLI. Note that you need to have all motes join the current network so that the change takes effect to all the connecting motes as well as the IP Manager.

# Connect to the SmartMesh IP USB Manager CLI serial port
$ screen /dev/DC2274A-A.CLI 9600
> login user
> sm
MAC                MoteId  State Nbrs Links Joins    Age StateTime
00-11-22-00-00-11-22-33    1     Oper    2    22     1      0    0-00:17:57
00-11-22-00-00-11-22-44    2     Oper    2    10     1      4    0-00:16:09
00-11-22-00-00-11-22-55    3     Oper    2    10     1      5    0-00:16:13

Number of motes (max 101): Total 3, Live 3, Joining 0 Blink 0

# Assume that you're changing the Network ID to 1234.
> exec exchNetId 1234
Start Global Unicast Command exchNetId

# Restart a remote mote by providing MoteId (shown above list)
# You can turn it off then on rather than the following command.
> reset mote 2
> reset mote 3

# Restart the manager itself
> reset system

# Login again
> login user

# Show the renewed Network ID
> minfo

Net stack  1.4.1.10
state:     Oper
mac:       00:11:22:33:44:55:66:77
moteid:    1
netid:     1234
blSwVer:   15
ldrSwVer:  0.0.0.0
board id/rev:0x7/0x7
UTC time:  1025666424.260 sec
reset st:  400
battery:   3295 mV
temp:      22 C

Node-RED users

Run the following commands:

sudo pip install pyserial
cd ~/.node-red
sudo npm install --unsafe-perm node-red-contrib-smartmesh

Then restart Node-RED process.

sudo is used for installing SmartMesh SDK into dist-package directory.

Node-RED users cannot install this node via Manage Palette dialog because of insufficient permission unless the process is owned by privileged user. Use the above commands to install it.

Uninstallation

The following command uninstalls SmartMesh SDK python executables/libraries as well as this node package.

cd ~/.node-red
sudo npm uninstall --unsafe-perm node-red-contrib-smartmesh

CANDY RED users

Use Manage Palette dialog in the browser editor or run the following commands:

sudo pip install pyserial
cd /opt/candy-red/.node-red
sudo npm install --unsafe-perm node-red-contrib-smartmesh

Then restart candy-red service.

sudo systemctl restart candy-red

Uninstallation

Manage Palette dialog should work for uninstallation as well as the following commands:

cd /opt/candy-red/.node-red
sudo npm uninstall --unsafe-perm node-red-contrib-smartmesh

The above command uninstalls SmartMesh SDK python executables/libraries as well as this node package.

Appendix

How to build

# build
$ NODE_ENV=development npm run build
# package
$ NODE_ENV=development npm pack

Revision History

  • 2.1.0

    • Add support Node.js v12
    • Drop support Node.js v8
  • 2.0.1

    • Fix an issue where a JSON expression for Buffer object couldn't be translated into a Buffer object.
  • 2.0.0

    • Raw data packet is supported as well as OAP.
    • Add a logging configuration file for Python process
    • The output object structure is modified as of the release. No backward compatibility with 1.x. The changes are as follows.
      • timestamp value is now ISO 8601 date string rather than the unix timestamp.
      • received_timestamp property is gone, use timestamp property instead.
      • packet_timestamp value is now ISO 8601 date string rather than the int array.
  • 1.1.0

    • Remove shrinkwrap file
    • Fix an issue where an error was swallowed on receiving 'close' event
  • 1.0.1

    • Update README
    • Remove .pyc files on running clean task
  • 1.0.0

    • Initial General Availability Release
    • Add node-red keyword
    • Fix an issue where Active Motes were never shown in the manager dialog
  • 0.3.1

    • Fix an issue where Object.value function was missing on Node.js v6
  • 0.3.0

    • Add the mac property only when it's available
    • Fix an issue where some of events didn't contain the mac address
    • Show active motes on the manager dialog for better user experience
    • Add the connected mote counter to the connected status label
    • Add a new type 'Data' for subscription type
  • 0.2.0

    • Fix an issue where /usr/local directory was removed when uninstalling this package
    • Add a new property to SmartMesh IP™ manager node to append a source manager identifier to the mote event message
  • 0.1.0

    • Initial Release (alpha)
    • node-red keyword is not yet added