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

@corelink/cls-aoa

v0.2.0

Published

> via NPM ```bash npm i -g @corelink/cls-aoa ```

Downloads

5

Readme

Installation

via NPM

npm i -g @corelink/cls-aoa

via downloaded zip archive

  1. unzip archive to wherever you want. eg. /opt/cls-aoa
  2. add path to system environment variable.
export PATH=$PATH:/opt/cls-aoa

Windows OS is deferent. Google it yourself.

Usage

Start service

cls-aoa path/to/cpaFile [flags]

Eg.

cls-aoa ~/Document/demo.cpa

HTTP APIs

List all beacons

GET http://localhost:44444/beacons

Parameters

| Name | In | Optional | Description | |---|---|---|---| | macs | query | YES | Beacon macs |

HTTP Status

| Code | Description | Body | |---|---|---| | 200 | OK | JSON Result

Result Structure

{
  [beaconMac: string]: {
    x: number; // Position x-axis
    y: number; // Position y-axis
    z: number; // Position z-axis
    mapId: string; // Map ID
    zoneId: string; // Zone ID
    updatedAt: number; // Timestamp for last package
    userData: {
      161: {
        channel: number; //
        frequency: number; //
        power: { // 
          type: 'TI' | 'Nordic'; // 
          value: number; //
        };
        sos: boolean; // Button pressed
        battery: number; // Battery percentage
      };
    };
  }
}

Example. GET http://localhost:44444/beacons?macs=806fb00c45d9,806fb00c45c9

{
  "806fb00c45d9": {
    "x":9.573189735412598,
    "y":5.213486194610596,
    "z":0.800000011920929,
    "mapId":"lwlx6fFgu",
    "zoneId":"z1",
    "updatedAt":1571109529308,
    "userData":{
      "161":{
        "channel":2481,
        "frequency":50,
        "power":{
          "type":"TI",
          "value":5
        },
        "sos":false,
        "battery":83
      }
    }
  },
  "806fb00c45c9":{
    "x":6.329273700714111,
    "y":7.880806922912598,
    "z":0.800000011920929,
    "mapId":"lwlx6fFgu",
    "zoneId":"z1",
    "updatedAt":1571109529215,
    "userData":{
      "161":{
        "channel":2481,
        "frequency":110,
        "power":{
          "type":"TI",
          "value":0
        },
        "sos":false,
        "battery":95
      }
    }
  }
}

List all locators

GET http://localhost:44444/locators

Parameters

| Name | In | Optional | Description | |---|---|---|---| | macs | query | YES | Locator macs |

HTTP Status

| Code | Description | Body | |---|---|---| | 200 | OK | JSON Result

Result Structure

{
  [locatorIpAddressV4: string]: {
    mac: string; // Locator mac
    angles: number[6]; // Locator angles
    updatedAt: number; // Timestamp for last package
  }
}

Example. GET http://localhost:44444/locators?macs=18:04:ed:7a:c5:01,18:04:ed:7a:c4:78

{
  "192.168.123.137": {
    "mac": "18:04:ed:7a:c5:01",
    "angles": [26, -137, 2150, 60, 550, 491],
    "updatedAt": 1571109502971
  },
  "192.168.123.28": {
    "mac": "18:04:ed:7a:c4:78",
    "angles": [118, 191, 2091, -113, 248, 646],
    "updatedAt": 1571109502988
  }
}

Retrieve a beacon

GET http://localhost:44444/beacons/:mac

Parameters

| Name | In | Optional | Description | |---|---|---|---| | mac | path | NO | Beacon mac |

HTTP Status

| Code | Description | Body | |---|---|---| | 200 | OK | JSON Result | 404 | Not Fount | Error Message

Result Structure

{
  mac: string; // Beacon mac
  x: number; // Position x-axis
  y: number; // Position y-axis
  z: number; // Position z-axis
  mapId: string; // Map ID
  zoneId: string; // Zone ID
  updatedAt: number; // Timestamp for last package
  userData: {
    161: {
      channel: number; //
      frequency: number; //
      power: { // 
        type: 'TI' | 'Nordic'; // 
        value: number; //
      };
      sos: boolean; // Button pressed
      battery: number; // Battery percentage
    };
  };
}

Example. GET http://localhost:44444/beacons/806fb00c45c9

{
  "mac": "806fb00c45c9",
  "x": 6.963463306427002,
  "y": 6.864238739013672,
  "z": 0.800000011920929,
  "mapId": "lwlx6fFgu",
  "zoneId": "z1",
  "updatedAt": 1571120302882,
  "userData": {
    "161": {
      "channel": 2481,
      "frequency": 110,
      "power":{
        "type": "TI",
        "value": 0
      },
      "sos": false,
      "battery": 95
    }
  }
}

Example. GET http://localhost:44444/beacons/mac_not_existed

Beacon not found

Retrieve a locator

GET http://localhost:44444/locators/:mac

Parameters

| Name | In | Optional | Description | |---|---|---|---| | mac | path | NO | Locator mac |

HTTP Status

| Code | Description | Body | |---|---|---| | 200 | OK | JSON Result | 404 | Not Fount | Error Message

Result Structure

{
  ip: string; // Locator ip address v4
  mac: string; // Locator mac
  angles: number[6]; // Locator angles
  updatedAt: number; // Timestamp for last package
}

Example. GET http://localhost:44444/locators/18:04:ed:7a:c4:78

{
  "ip": "192.168.123.28",
  "mac": "18:04:ed:7a:c4:78",
  "angles": [119, 190, 2093, -122, 232, 641],
  "updatedAt": 1571118991384
}

Example. GET http://localhost:44444/locators/mac_not_existed

Locator not found