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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@avimesa/examples-group-api-amqp

v0.0.2

Published

Group API examples using AMQP (0-9-1) and Node.js

Readme

Avimesa Group API Examples, Node.js and AMQP

Group API examples using Node.js abd AMQP (0-9-1)

Introduction

This project contains simple example of how to interface with the Avimesa Device Cloud's Group API using Node.js and AMQP. Common tasks are captured in a simple example application to illustrate how one could go about interfacing withe system.

Table of Contents

1. Overview

Top

2. Prerequisites

  • Node.js
  • A valid Avimesa Device Cloud Group ID and Authentication Key

Top

3. Usage

Checkout and initialize the project:

git clone https://github.com/Avimesa/examples-nodejs-group-api-amqp.git
cd examples-nodejs-group-api-amqp
npm init

Update the credentials in the .env file in the root of the project:

# RMQ Server Hostname
RMQ_HOSTNAME=rmqserv001.avimesa.com

# RMQ Server Port
RMQ_PORT=5672

# RMQ Group ID / Vhost
RMQ_GROUP_ID= *<TODO>*

# RMQ Authentication Key
RMQ_AUTH_KEY= *<TODO>*

# Set this to 0 to allow certless TLS
NODE_TLS_REJECT_UNAUTHORIZED=0

Run the example from its directory, for example to run the queue-subscriber example, do ths following from the root of the project:

node queue-subscriber/index.js

Top

4. Examples

actuate-device

Summary:

Device actuation occurs by sending a command to the Device. Because the device may be offline, a queue for the Device is available to cache the message. The Device's queue is automatically configured by the Avimesa Device Cloud upon addition of the Device to the Group.

To actuate a device, we send a JSON command to the actuation.dx exchange, and use a routing key that is the Device's ID (lower case, string based UUID, no hyphens).

This is all done for you by the actuate API, where you just pass in a Device ID and a JSON message.

Top

add-device

Summary:

This example shows how to add a Device to the Device Cloud. The Device ID must be a 32 character string using a-f or 0-9 (i.e. base16 values for a UUID...). It also must be unique in the Avimesa Device Cloud instance, so one could use a UUID generator to make the Device ID.

In response to a successful Device addition, you get a 32 character string (base16, UUID) authentication key.

The combination of the Device ID and Authentication key can then be used by an Avimesa Device.

Top

list-devices

Summary:

An Avimesa Group contains Devices. This example shows how to query for a list of devices.

Top

list-files

Summary:

Each Device in the Avimesa Device Cloud has its own file system. This will contain things like the device script, device config, DFU files, and any temporary files used by te script engine.

This example shows listing a devices files.

Top

message-count

Summary:

Sometimes you want to see if there are any messages in a queue. This example shows you how to do that.

Top

queue-purge

Summary:

It's possible that you will want to empty a queue, for example a device's actuation queue to clear any pending commands.

This example shows how to purge a queue.

Top

queue-subscriber

Summary:

This example consumes data from a queue. When using the consume API, it's assumed that the user of this API is in charge of moving data to permanent storage. Upon first connection, all pending messages are available. This allows an application to go offline and not worry about data loss.

Top

queue-temp-subscriber

Summary:

Sometimes you want to 'listen' to a queue for live data passing through it, but not necessarily be responsible for handling the datastore.

This example shows how to create a temporary queue that will get data from the source of your choice by setting up a routing key.

Top

upload-files

Summary:

This example shows how one can upload a Device Driver Script and Device Configuration.

Top

4. Dependencies

@avimesa/group-api-amqp
amqplib
dotenv