Skip to main content

Onwords - Gate Control Package for Smart Gate Systems

Project description

Onwords

Gate Control Package for Smart Gate Systems

PyPI version Python 3.8+ License: MIT

Control your Onwords smart gates (Sliding Gate, Arm Gate) via Python or CLI.


Installation

pip install onwords

Get Your API Key

  1. Visit ostapi.onwords.in
  2. Click "Get API Key" from the menu
  3. Login with your email and password
  4. Select the devices you want to control
  5. Click "Generate API Key" and copy it

⚠️ Store your API key securely. Never expose it in public code.

Quick Start

1. Configure API Key

import onwords

onwords.configure("your-api-key")

Or via CLI:

onwords-config --api-key YOUR_API_KEY

2. List Your Products

import onwords

products = onwords.get_products()
for product_id in products:
    print(product_id)

Or via CLI:

onwords-list

3. Control Your Gate

import onwords

gate = onwords.control("your-product-id")

# Sliding Gate (3chsg)
gate.open()
gate.close()
gate.pause()       # or gate.stop()

# Sliding Gate Advanced (3chsgsl)
gate.open()
gate.close()
gate.pause()
gate.partial_open()  # or gate.pedestrian()

# Arm Gate - Single (3chag)
gate.open_single_gate()
gate.close_single_gate()
gate.pause_single_gate()

# Arm Gate - Double (3chag)
gate.open_double_gate()
gate.close_double_gate()
gate.pause_double_gate()

Or via CLI:

onwords-control PRODUCT_ID open
onwords-control PRODUCT_ID close
onwords-control PRODUCT_ID pause

Supported Gate Types

Gate Type Product Prefix Description
Sliding Gate 3chsg Standard sliding gate
Sliding Gate Advanced 3chsgsl Sliding gate with pedestrian mode
Arm Gate 3chag Boom barrier / arm gate

Supported Actions

Gate Type Actions
Sliding Gate (3chsg) open, close, pause
Sliding Gate Advanced (3chsgsl) open, close, pause, partial_open
Arm Gate Single (3chag) open_single_gate, close_single_gate, pause_single_gate
Arm Gate Double (3chag) open_double_gate, close_double_gate, pause_double_gate

CLI Commands

Command Description
onwords Show help and config status
onwords-config -k KEY Configure your API key
onwords-list List all your products
onwords-list --json List products as JSON
onwords-control ID ACTION Control a gate

Python API Reference

onwords.configure(api_key)

Save your API key for future use.

onwords.get_products()

Fetch all product IDs from your account.

onwords.control(product_id)

Get a controller for a specific product.

Controller Methods

Sliding Gate:

  • .open() - Open the gate
  • .close() - Close the gate
  • .pause() / .stop() - Pause/stop the gate
  • .partial_open() / .pedestrian() - Partial opening (Advanced only)

Arm Gate:

  • .open_single_gate() / .close_single_gate() / .pause_single_gate()
  • .open_double_gate() / .close_double_gate() / .pause_double_gate()

Generic:

  • .action(action_name) - Send any action

Configuration

Config is stored at ~/.onwords/config.json

API Documentation

Full API docs: ostapi.onwords.in/api-documentation

Support

📧 contact@onwords.in

License

MIT License - see LICENSE for details.


Onwords - Where Luxury Meets Innovation
onwords.in

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onwords-0.2.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onwords-0.2.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file onwords-0.2.0.tar.gz.

File metadata

  • Download URL: onwords-0.2.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for onwords-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1fc11a306b8f333b0f7bba943a9aba4caf53ceeb6a16099833cb00805582a237
MD5 4e93516617691e917c61a540d4156d78
BLAKE2b-256 74d84850e4c5f1371632019978851d1b5dbe498d9661337675ae23707415b8e2

See more details on using hashes here.

File details

Details for the file onwords-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: onwords-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for onwords-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13583775889b66a62fe3df122f439d4fc0b667bc840b19ffef1a5abacf07a3a2
MD5 3ca07cc5ca21d5455f48a2958bc3b8d3
BLAKE2b-256 3b4513464def7d1a597887ff8241ecd1fe17cb5e01e3838068e1b87fd73c1878

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page