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 <device_token> <method> <endpoint>

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

Add a new device with USB connect::

wio setup

Delete a device::

wio delete <device_sn>

example:
$wio delete 2885b2cab8abc5fb8e229e4a77bf5e4d
>> Delete device commplete!

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.21.tar.gz (9.0 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for wio-cli-0.0.21.tar.gz
Algorithm Hash digest
SHA256 b3ef85c4c14b99e834928696bd11c5de3d569dec6ef116a5d236492464b4d0e5
MD5 d63344b5ab6358357afcf7dc81b8b462
BLAKE2b-256 659025a1404c723da2b8884a8d150f1f7d8ca68270e44d8db98f35d19a8118a9

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