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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@jetsonhome/apctl

v0.5.2

Published

CLI tool to support various commands pertaining to Autopilot (e.g., board operations, provisioning, MQTT commands).

Downloads

17

Readme

apctl: Autopilot CLI

Install

  • yarn install
  • yarn build
  • npm link
  • Make sure you have /usr/local/bin in your PATH

Usage

gen: Generate Autopilot Board Configuration

TODO

run: Run a command over ACP to a connected Autopilot Board

The run command allows interaction with a connected Autopilot Board. It supports various operations including device provisioning, configuration, and emission testing.

Serial Server Mode

By default, apctl run commands require exclusive access to the serial port, which means you cannot view logs in one terminal while running commands in another. The optional Serial Server Mode addresses this limitation:

# Terminal 1: Start the server with log tailing
apctl run --server --device /dev/cu.usbserial-XXX --tail-logs
# Terminal 2: Run commands through the server
apctl run --client test wifi --state on

The server maintains the serial connection and displays logs, while client commands are sent through the server without reopening the serial port.

test: Emission Testing Commands

The commands below allow a test operator to configure the state of each radio for the purposes of emission testing. To apply the setting, the operator should run:

apctl run --write-test-config --reboot

Set Emission Mode
apctl run test --emission-mode [always|normal]
  • none: Stops emission test mode on the device, allowing it to operate normally when reset
  • always: Enables continuous emission mode for testing
  • normal: Sets the device to mimic normal emission patterns
Radio State Control
apctl run test [wifi|ble|lora] --state <on|off|standby>
  • Controls the state of the specified radio (WiFi, BLE, or LoRa)
  • --state on: Turns the radio on 🟢
  • --state off: Turns the radio off 🔴
  • --state standby: Puts the radio in standby mode 🟡
TX Power Control
apctl run test [wifi|ble|lora] --tx-power <dBm>
  • Sets the transmit power of the applicable radio

LoRa CW Frequency

apctl run test lora --cw-freq <Hz>
  • Sets the CW frequency of the LoRa module

Recover ublox module

If the autopilot board is no longer able to connect, it can be recovered with:

apctl run --factory-reset-ublox

flash: Flash firmware to a connected device

The flash command allows you to update the firmware on various devices connected to your system.

NINA-W15 Module

Flash the NINA-W15 module with ublox firmware:

apctl flash ninaw15 --port <serial_port> --config <config_file_path>
  • --port: Path to the serial port device
  • --config: Path to the firmware configuration JSON file

mqtt: Perform an MQTT operation

The mqtt subcommand allows the user to use the command line to:

  1. Publish to MQTT topics, or
  2. Subscribe to MQTT topic filters.

To use this utility the user must have the aws CLI installed (e.g., through brew) as well as configured the jetson-staging and jetson-production environments in ~/.aws.

Publish

Usage:

apctl mqtt --[staging,production], --topic <topic> --payload <payload> [--qos [0,1]] [--retain]
  • --[staging,production] indicates the environment to use (staging or production)
  • --topic indicates the MQTT topic
  • --payload specifies the payload
  • --qos X indicates the QoS to use (0 or 1). Default of 0.
  • --retain if specified, marks the message for retention under the default expiration period

modbus: Interact with Modbus devices

The modbus command allows you to configure, query, and interact with Modbus devices.

General Usage

Use the help flag for general usage instructions:

apctl modbus --help

Device-Specific Instructions

Thermostat (--device thermostat)

Connection: Plug the thermostat directly into the custom NWI provided adapter and then into your PC.

Supported Actions: --configure, --query, --firmware-update, --validate, --read, --write

Examples:

  • Configure the thermostat:
    apctl modbus --configure --device thermostat
  • Update firmware:
    apctl modbus --firmware-update path/to/firmware.bin --device thermostat
  • Validate operation:
    apctl modbus --validate --device thermostat
  • Read the current ambient temperature (in decidegrees Celsius):
    • Register address for "Ambient Temperature Sensor" is 0x0200 which is 512 in decimal.
    apctl modbus --read --device thermostat --register 512
  • Set the temperature setpoint to 22.5°C:
    • Register address for "Ambient Temperature Setpoint" is 0x0201 (513).
    • The value is in decidegrees Celsius, so 22.5°C is 225.
    apctl modbus --write --device thermostat --register 513 --value 225

AirLab Sensor (--device air)

Connection: Plug the RS485 adapter into the spare AHU/HWT port on the sensor bus. Press the user button on the board to enter provisioning mode (indicated by a blue LED). When finished, press again or reset to exit.

Supported Actions: --configure, --query, --read, --write

Examples:

  • Configure the sensor:
    apctl modbus --configure --device air
  • Query all registers:
    apctl modbus --query --device air
  • Read the current CO2 level (in ppm):
    • Register address for "Co2Sensor" is 139.
    apctl modbus --read --device air --register 139
  • Set the Modbus address to 10:
    • Register address for "ModbusAddress" is 6.
    apctl modbus --write --device air --register 6 --value 10

Temperature Sensor (--device temp)

Connection: Plug the RS485 adapter into the spare AHU/HWT port on the sensor bus. Press the user button on the sensor board to enter provisioning mode (indicated by a blue LED). When finished, press again or reset to exit.

Supported Actions: --configure, --query, --read, --write

Examples:

  • Configure the sensor:
    apctl modbus --configure --device temp
  • Query all registers:
    apctl modbus --query --device temp
  • Read the temperature in Celsius:
    • Register address for "TemperatureC" is 37.
    apctl modbus --read --device temp --register 37
  • Set the temperature offset:
    • Register address for "TemperatureOffset" is 35.
    apctl modbus --write --device temp --register 35 --value <offset_value>

Jetson Air Heat Pump (--device jetson-air)

Supported Actions: --read, --write (Note: configure and query are not fully implemented for this device yet).

Examples:

  • Read the current operating mode:
    • Register address for "OperatingMode" is 30001.
    apctl modbus --read --device jetson-air --register 30001
  • Turn the heat pump on:
    • Register address for "OperatingOnOff" is 40002.
    • Value 1 is for "On".
    apctl modbus --write --device jetson-air --register 40002 --value 1
  • Set the mode to "Cool":
    • Register address for "SetMode" is 40003.
    • Value 2 is for "Cool".
    apctl modbus --write --device jetson-air --register 40003 --value 2