Noyito Relay Driver

jumpstarter-driver-noyito-relay provides Jumpstarter power drivers for NOYITO USB relay boards in 1, 2, 4, and 8-channel variants.

Two hardware series are supported:

  • NoyitoPowerSerial - 1/2-channel boards using a CH340 USB-to-serial chip (serial port, supports status query)

  • NoyitoPowerHID - 4/8-channel “HID Drive-free” boards presenting as a USB HID device (no serial port, supports all-channels status query)

Both use the same 4-byte binary command protocol (A0 + channel + state + checksum).

Installation

$ pip3 install --extra-index-url https://pkg.jumpstarter.dev/simple jumpstarter-driver-noyito-relay

If you are using NoyitoPowerHID, the hid Python package requires the native hidapi shared library. Install it for your OS before use:

OS

Command

macOS

brew install hidapi

Debian/Ubuntu

sudo apt-get install libhidapi-hidraw0

Fedora/RHEL

sudo dnf install hidapi

Configuration

NoyitoPowerSerial (1/2-Channel Serial)

Parameter

Type

Default

Description

port

str

(required)

Serial port path, e.g. /dev/ttyUSB0

channel

int

1

Relay channel to control (1 or 2)

all_channels

bool

false

Switch both channels simultaneously

Example configuration controlling both channels independently:

export:
  relay1:
    type: jumpstarter_driver_noyito_relay.driver.NoyitoPowerSerial
    config:
      port: "/dev/ttyUSB0"
      channel: 1
  relay2:
    type: jumpstarter_driver_noyito_relay.driver.NoyitoPowerSerial
    config:
      port: "/dev/ttyUSB0"
      channel: 2

NoyitoPowerHID (4/8-Channel HID)

Parameter

Type

Default

Description

num_channels

int

4

Number of relay channels on the board (4 or 8)

channel

int

1

Relay channel to control (1..num_channels)

all_channels

bool

false

Fire every channel simultaneously

vendor_id

int

5131

USB vendor ID (override if needed)

product_id

int

2007

USB product ID (override if needed)

Example configuration for a 4-channel board (channel 1) and an 8-channel board (all channels simultaneously):

export:
  relay_4ch_ch1:
    type: jumpstarter_driver_noyito_relay.driver.NoyitoPowerHID
    config:
      num_channels: 4
      channel: 1
  relay_8ch_all:
    type: jumpstarter_driver_noyito_relay.driver.NoyitoPowerHID
    config:
      num_channels: 8
      channel: 1
      all_channels: true

Board Detection

To determine which driver to use, check whether the board appears as a serial port or a HID device:

  • Serial port (/dev/ttyUSB*, /dev/tty.usbserial-*): Use NoyitoPowerSerial (1/2-channel CH340 board)

  • No serial port / HID only: Use NoyitoPowerHID (4/8-channel HID Drive-free board). Confirm with lsusb - the NOYITO HID module appears with VID 0x1409 / PID 0x07D7 (decimal: 5131 / 2007).

Hardware Notes (Serial)

  • Purchase: NOYITO 2-Channel USB Relay Module (Amazon)

  • Chip: CH340 USB-to-serial

  • Baud rate: 9600

  • Default port: /dev/ttyUSB0 (Linux) - may appear as /dev/tty.usbserial-* on macOS

  • Channels: 1 or 2 independent relay channels on one USB port

  • Supply voltage: 5 V via USB

Hardware Notes (HID)

Usage

Inside a jmp exporter shell:

# Power on relay 1
j relay1 on

# Query state of relay 1
j relay1 status
# on

# Power cycle relay 2 with a 3-second wait
j relay2 cycle --wait 3

# Power off relay 1
j relay1 off

# Power on all 8 channels simultaneously
j relay_8ch_all on

API Reference

class jumpstarter_driver_noyito_relay.driver.NoyitoPowerSerial

Driver for the NOYITO 5V 2-Channel USB Relay Module.

Controls one relay channel on the NOYITO USB relay board via the CH340 USB-to-serial chip at 9600 baud with a 4-byte binary protocol.

Set all_channels=True in the exporter config to switch both channels simultaneously (e.g. for high-current applications).

classmethod client() str

Return full import path of the corresponding driver client class

off() None

De-energise the relay channel.

on() None

Energise the relay channel.

read() Generator[PowerReading, None, None]

Yield a power reading for the relay channel.

status() str

Return the relay channel state as a string.

class jumpstarter_driver_noyito_relay.driver.NoyitoPowerHID

Driver for the NOYITO 4/8-Channel HID Drive-free USB Relay Module.

Uses USB HID (hid library) instead of serial.

vendor_id / product_id default to the NOYITO HID module values (5131 / 2007). Set num_channels to 4 or 8 to match the physical board. Set all_channels=True to fire every channel simultaneously for high-current use.

classmethod client() str

Return full import path of the corresponding driver client class

off() None

De-energise the relay channel.

on() None

Energise the relay channel.

read() Generator[PowerReading, None, None]

Yield a power reading for the relay channel.

status() str

Return the relay channel state as a string.