Python SDK to control NOVA A1 Robot — AP & WiFi mode, auto-discovery, live status
Project description
NOVA RBM — Robot Base Module
Python SDK to control the NOVA A1 robot via WebSocket.
Supports AP mode (direct hotspot) and WiFi mode (auto-discovery via mDNS).
Installation
pip install nova-rbm
Or install from source:
git clone https://github.com/nadhilrobomiracle/nova_rbm.git
cd nova-rbm
pip install -e .
Quick Start
WiFi Mode (robot on your home network)
The SDK discovers the robot automatically via nova-robot.local/status:
from nova_rbm import NovaRobot
bot = NovaRobot(mode="wifi")
bot.connect()
# Check robot status
print(bot.status()) # Full status dict
print(bot.servo_angles()) # {1: 75, 2: 90, 3: 85, 4: 80, 5: 110}
print(bot.motor_state()) # {'state': 'stop', 'speed': 180}
print(bot.led_color()) # {'r': 0, 'g': 0, 'b': 255}
print(bot.wifi_info()) # {'wifi_mode': 'station', 'connected_ssid': '...', ...}
bot.disconnect()
AP Mode (robot's own hotspot)
Connect your computer to the NOVA_A1 WiFi, then:
from nova_rbm import NovaRobot
bot = NovaRobot(mode="ap") # Uses 192.168.4.1
bot.connect()
print(bot.status())
bot.disconnect()
Manual IP Override
bot = NovaRobot(ip="192.168.1.42")
bot.connect()
Context Manager
Auto-connects, auto-stops motors, and auto-disconnects:
with NovaRobot(mode="wifi") as bot:
bot.forward()
bot.set_speed(200)
import time; time.sleep(2)
# stop() and disconnect() called automatically
API Reference
Connection
| Method | Description |
|---|---|
connect() |
Open WebSocket (discovers IP in WiFi mode) |
disconnect() |
Close the connection |
reconnect() |
Drop and re-establish (re-discovers in WiFi mode) |
Status & Telemetry
| Method | Returns |
|---|---|
status() |
Full status dict from /status endpoint |
servo_angles() |
{1: angle, 2: angle, ..., 5: angle} |
motor_state() |
{'state': 'stop', 'speed': 180} |
led_color() |
{'r': 0, 'g': 0, 'b': 255} |
wifi_info() |
{'wifi_mode': ..., 'connected_ssid': ..., 'ip_address': ..., 'rssi_dbm': ...} |
Movement
| Method | Description |
|---|---|
forward() |
Drive forward |
backward() |
Drive backward |
left() |
Spin left |
right() |
Spin right |
stop() |
Stop all motors |
set_speed(0–255) |
Set motor speed |
Servo Control
| Method | Description |
|---|---|
set_servo(servo, angle) |
Move servo 1-5 to angle (enforces firmware limits) |
set_all_servos({1: 60, 3: 100}) |
Set multiple servos at once |
reset_servos() |
Reset all servos to defaults |
get_servo_limits() |
Returns min/max/default for each servo |
Servo limits (from firmware):
| Servo | Min | Max | Default |
|---|---|---|---|
| S1 | 50 | 75 | 75 |
| S2 | 90 | 145 | 90 |
| S3 | 35 | 150 | 85 |
| S4 | 20 | 80 | 80 |
| S5 | 110 | 135 | 110 |
LED Control
| Method | Description |
|---|---|
set_rgb(r, g, b) |
Set LED strip color (0-255 each) |
set_color("red") |
Set by name: red, green, blue, white, off, cyan, magenta, yellow, orange, purple, pink |
Standalone Utilities
from nova_rbm import discover_robot_ip, fetch_status
# Discover without creating a robot object
ip = discover_robot_ip()
print(f"Robot found at {ip}")
# Fetch status from any IP
data = fetch_status("192.168.4.1")
print(data)
Full Status Response
The /status endpoint returns:
{
"status": "ok",
"device": "NOVA_A1",
"wifi_mode": "station",
"connected_ssid": "MyWiFi",
"ip_address": "192.168.1.42",
"rssi_dbm": -45,
"uptime_s": 1234,
"ws_clients": 1,
"motor": { "state": "stop", "speed": 180 },
"led": { "r": 0, "g": 0, "b": 255 },
"servos": { "s1": 75, "s2": 90, "s3": 85, "s4": 80, "s5": 110 }
}
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nova_rbm-0.3.0.tar.gz.
File metadata
- Download URL: nova_rbm-0.3.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36b81279a40f68b40bcd85ad10e72f67ff027c4a2039babe1ad2f3175d8d505c
|
|
| MD5 |
7a3431db9082b5b40ca366f43ec51ce7
|
|
| BLAKE2b-256 |
ade11111dcce042758aca20eddbd7ddfe8d4ab4bbd776dd46097e25e09279833
|
File details
Details for the file nova_rbm-0.3.0-py3-none-any.whl.
File metadata
- Download URL: nova_rbm-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1da29bf00aa019dc4120581504758a689dd4622b3bd5ae93386a1660bd080bf7
|
|
| MD5 |
7193f52fa727901a5496441bb79bc04a
|
|
| BLAKE2b-256 |
44259af51d2a0d2adec00885b2f49a6be66dd6fb94d7c6ed70fd74b7ae4f13cf
|