Skip to main content

Command line for Wio Link

Project description

===============================
Wio Link Command Line Interface
===============================

.. image:: https://img.shields.io/badge/pypi-0.0.14-orange.svg
:target: https://pypi.python.org/pypi/wio-cli/
:alt: Latest Version

Getting Started
===============

Wio Link Client can be installed from PyPI using pip::

pip install wio-cli

A list of global options and supported, commands is shown with ``--help``::

wio --help

More info, that can be used to get help text for a specific command::

wio <command> --help

Command
==========
Login with your Wiolink account::

wio login

Login state::

wio state

example:
$ wio state
email: xxx@xxx.xx
token: 4LxiwvwFAw3C7LiiUQiZh6qOj44tV6KGsXyjp3jVzxx
mserver: https://iot.seeed.cc
mserver_ip: 45.79.4.239

Displays a list of your devices and their APIs::

wio list

example:
$ wio list
|-- home (online)
|-- sn: e3d0dccd4587f40a5d6ffda236755aa4
|-- token: ce140e79f24717ed7d6d44bfb5d848b2
|-- resource url: http://192.168.21.115:8080/v1/node/resources?access_token=ce140e79f24717ed7d6d44bfb5d848b2
|-- well_known:
|-- GET /v1/node/GroveTempHumProD0/humidity -> float humidity
|-- GET /v1/node/GroveTempHumProD0/temperature -> float celsius_degree
|-- GET /v1/node/GroveTempHumProD0/temperature_f -> float fahrenheit_degree

Request api, return json::

wio call <token> <method> <endpoint>

example:
$ wio call c74a110c2e397823f0ce53ef669d5b7f GET /v1/node/GroveMoistureA0/moisture
{u'moisture': 0}

Add a new device with USB connect::

wio setup

config your main server::

wio config mserver

Serial port permissions
==========
- now as normal user from terminal:
ls -l /dev/ttyUSB*
you will get something like:
crw-rw---- 1 root uucp 188, 0 5 apr 23.01 ttyUSB0
The "0" might be a different number, or multiple entries might be returned. In the first case the data we need is "uucp", in the second "dialout" (is the group owner of the file.

- Now we just need to add our user to the group:
usermod -a -G group-name username
where group-name is the data found before, and username is your linux user name. You will need to log out and in again for this change to take effect.

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

wio-cli-0.0.20.tar.gz (8.8 kB view details)

Uploaded Source

File details

Details for the file wio-cli-0.0.20.tar.gz.

File metadata

  • Download URL: wio-cli-0.0.20.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wio-cli-0.0.20.tar.gz
Algorithm Hash digest
SHA256 55bd16bfccf186ed1af52b6bbd88aa85baee22f8d813fad1e6f95056e84909f8
MD5 80983e02046751beeee933f310b7a91f
BLAKE2b-256 359a77028a606a6f7d612549880ed22721118538a9e82cac045826c53841d757

See more details on using hashes here.

Provenance

Supported by

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