Library for connecting to GogoGate2 and iSmartGate hubs
Project description
Python gogogate2-api
Python library for controlling GogoGate2 and iSmartGate devices
Installation
pip install gogogate2-api
Usage in Commands
$ gogogate2 --help
Usage: gogogate2 [OPTIONS] COMMAND [ARGS]...
Interact with the device API.
Options:
--host TEXT [required]
--username TEXT [required]
--password TEXT Omit for interactive prompt. Use '-' to read from stdin.
--version Show the version and exit.
--help Show this message and exit.
Commands:
close Close the door.
info Get info from device.
open Open the door.
$ ismartgate --help
Usage: ismartgate [OPTIONS] COMMAND [ARGS]...
Interact with the device API.
Options:
--host TEXT [required]
--username TEXT [required]
--password TEXT Omit for interactive prompt. Use '-' to read from stdin.
--version Show the version and exit.
--help Show this message and exit.
Commands:
close Close the door.
info Get info from device.
open Open the door.
Usage in Code
from gogogate2_api import GogoGate2Api, ISmartGateApi
# GogoGate2 API
gogogate2_api = GogoGate2Api("10.10.0.23", "admin", "password")
# Get info about device and all doors.
gogogate2_api.info()
# Open/close door.
gogogate2_api.open_door(1)
gogogate2_api.close_door(1)
# iSmartGate API
ismartgate_api = ISmartGateApi("10.10.0.24", "admin", "password")
# Get info about device and all doors.
ismartgate_api.info()
# Open/close door.
ismartgate_api.open_door(1)
ismartgate_api.close_door(1)
Building
Building, testing and linting of the project is all done with one script. You only need a few dependencies.
Dependencies:
- python3 in your path.
- The python3
venv
module.
The build script will setup the venv, dependencies, test and lint and bundle the project.
./scripts/build.sh
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
gogogate2_api-2.0.3.tar.gz
(12.0 kB
view details)
Built Distribution
File details
Details for the file gogogate2_api-2.0.3.tar.gz
.
File metadata
- Download URL: gogogate2_api-2.0.3.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e2f2e3329e1e5f3812b7e397b490a30a385c4756319cd573bf868b7d0a17f71 |
|
MD5 | cd2bf2b06ebe0afcf9424aecc7875c58 |
|
BLAKE2b-256 | 9b5673cb9b330bd61322ffffcf1e2964165e6a6e37905118167a3650279a3c74 |
File details
Details for the file gogogate2_api-2.0.3-py3-none-any.whl
.
File metadata
- Download URL: gogogate2_api-2.0.3-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f75e78a5af3729fd3f80742e076646ba13c4d4f59d0ec8e414c320a3203dcbab |
|
MD5 | 5e79855f1d1e1d43b1bb14852b05c553 |
|
BLAKE2b-256 | 29133633694cf4e1968ef4bbe78d3227eb0d11a2c58706dfe239441351e29266 |