docs: revised methods, list of methods should appear in the main menu

This commit is contained in:
Aline
2020-01-15 15:54:57 +01:00
parent 7cac853d87
commit e86d87e6c3
34 changed files with 430 additions and 92 deletions

View File

@@ -4,7 +4,11 @@ aliases:
- pybytes/api
---
* [Connect Wifi](connect_wifi)
* [Add custom method](add_custom_method)
* [Activate](activate)
* [Connect](connect)
* [Connect LTE](connect_lte)
@@ -14,70 +18,66 @@ aliases:
* [Connect Sigfox](connect_sigfox)
* [Connect Wifi](connect_wifi)
* [Deepsleep](deepsleep)
* [Disconnect](disconnect)
* [Send custom message](send_custom_message)
* [Dump ca](dump_ca)
* [Set custom message callback](set_custom_message_callback)
* [Enable lte](enable_lte)
* [Send ping message](send_ping_message)
* [Send info message](send_info_message)
* [Send scan info message](send_scan_info_message)
* [Send digital pin value](send_digital_pin_value)
* [Send analog pin value](send_analog_pin_value)
* [Send virtual pin value](send_virtual_pin_value)
* [Send signal](send_signal)
* [Register periodical digital pin publish](register_periodical_digital_pin_publish)
* [Register periodical analog pin publish](register_periodical_analog_pin_publish)
* [Add custom method](add_custom_method)
* [Enable ssl](enable_ssl)
* [Enable terminal](enable_terminal)
* [Send battery level](send_battery_level)
* [Export config](export_config)
* [Send custom location](send_custom_location)
* [Get config](get_config)
* [Is connected](is_connected)
* [isconnected](isconnected)
* [Connect](connect)
* [Write config](write_config)
* [Print cfg msg](print_cfg_msg)
* [Print config](print_config)
* [Get config](get_config)
* [Set config](set_config)
* [Update config](update_config)
* [Read config](read_config)
* [Reconnect](reconnect)
* [Export config](export_config)
* [Register periodical analog pin publish](register_periodical_analog_pin_publish)
* [Enable ssl](enable_ssl)
* [Register periodical digital pin publish](register_periodical_digital_pin_publish)
* [Enable lte](enable_lte)
* [Send analog pin value](send_analog_pin_value)
* [Deepsleep](deepsleep)
* [Send battery level](send_battery_level)
* [Dump ca](dump_ca)
* [Send custom message](send_custom_message)
* [Set custom message callback](set_custom_message_callback)
* [Send custom location](send_custom_location)
* [Send digital pin value](send_digital_pin_value)
* [Send info message](send_info_message)
* [Send ping message](send_ping_message)
* [Send scan info message](send_scan_info_message)
* [Send signal](send_signal)
* [Send virtual pin value](send_virtual_pin_value)
* [Set config](set_config)
* [Start](start)
* [Activate](activate)
* [Update config](update_config)
* [Write config](write_config)

View File

@@ -6,7 +6,7 @@ aliases:
**Activate**
----
Activate device
Activate device on Pybytes.
**Method**
----
@@ -17,7 +17,7 @@ aliases:
----
| name | Description | is Required | Default value
| ------------- |:-------------:|:-------------:|:-------------:|
| activation string | generated by Pybytes | Yes | - |
| activation string | Generated by Pybytes | Yes | - |
**Example**

View File

@@ -6,8 +6,16 @@ aliases:
**Connect**
----
Initialize connection based on default parameters
Initialize connection based on the configured parameters.
**Method**
----
**pybytes.connect()**
**Example**
----
`pybytes.connect()`
**Success Response**
----
>> Connected using Sigfox. Only upload stream is supported

View File

@@ -6,8 +6,25 @@ aliases:
**Connect LoRa ABP**
----
Initialize LoRa ABP connection
Initialize LoRa ABP connection.
**Method**
----
**pybytes.connect_lora_abp()**
**pybytes.connect_lora_abp(timeout, nanogateway)**
**Parameters**
----
| name | Description | is Required | Default value
| ------------- |:-------------:|:-------------:|:-------------:|
| timeout | Connection timeout | Yes | - |
| nanogateway | TBD | Yes | - |
**Example**
----
`pybytes.connect_lora_abp(15000, false)`
**Success Response**
----
>> Trying to join LoRa.ABP for 15000 seconds...
>> Setting up LoRa socket...
>> Connected using LoRa

View File

@@ -6,8 +6,25 @@ aliases:
**Connect LoRa OTAA**
----
Initialize LoRa OTAA connection
Initialize LoRa OTAA connection.
**Method**
----
**pybytes.connect_lora_otaa()**
**pybytes.connect_lora_otaa(timeout, nanogateway)**
**Parameters**
----
| name | Description | is Required | Default value
| ------------- |:-------------:|:-------------:|:-------------:|
| timeout | Connection timeout | Yes | - |
| nanogateway | TBD | Yes | - |
**Example**
----
`pybytes.connect_lora_otaa(timeout=15, nanogateway=False)`
**Success Response**
----
>> Trying to join LoRa.OTAA for 15 seconds...
>> Setting up LoRa socket...
>> Connected using LoRa

View File

@@ -6,8 +6,23 @@ aliases:
**Connect LTE**
----
Initialize watchdog for WiFi and LTE connection
Initialize watchdog for WiFi and LTE connection.
**Method**
----
**pybytes.connect_lte()**
**pybytes.connect_lte(reconnect=True, check_interval=0.5)**
**Parameters**
----
| name | Description | is Required | Default value
| ------------- |:-------------:|:-------------:|:-------------:|
| reconnect | Boolean | Yes | - |
| check_interval | interval in seconds | Yes | - |
**Example**
----
`pybytes.connect_lte(reconnect=True, check_interval=0.5)`
**Success Response**
----
TBD

View File

@@ -6,8 +6,16 @@ aliases:
**Connect Sigfox**
----
Initialize Sigfox connection
Initialize Sigfox connection.
**Method**
----
**pybytes.connect_sigfox()**
**Example**
----
`pybytes.connect_sigfox()`
**Success Response**
----
>> Connected using Sigfox. Only upload stream is supported

View File

@@ -6,7 +6,7 @@ aliases:
**Connect Wifi**
----
Initialize watchdog for WiFi and LTE connection
Initialize watchdog for WiFi and LTE connection.
**Method**
----

View File

@@ -16,9 +16,9 @@ aliases:
----
| name | Description | is Required | Default value
| ------------- |:-------------:|:-------------:|:-------------:|
| ms | Time to sleep in ms | Yes | - |
| ms | Sleep period in ms | Yes | - |
| pins | Affected pins | No | None |
| mode | Sleep mode | No | None |
| mode | Sleep mode TBD | No | None |
| enable_pull | Enable pull | No | None |
**Example**

View File

@@ -22,7 +22,7 @@ aliases:
| apn | APN | No | None |
| type | Type | No | None |
| reset | Reset | No | None |
| fallback | Fallbackena | No | False |
| fallback | Fallback TBD | No | False |
**Example**
----

View File

@@ -4,9 +4,9 @@ aliases:
- pybytes/api/export_config
---
**Export Config**
**Export configuration file**
----
Export configuration file
Exports configuration file at specified path.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Get Config**
----
Returns configuration data
Returns configuration data.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Is connected**
----
Returns true if connected
Returns true if connected.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Is connected**
----
Returns true if connected
Returns true if connected.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Print config**
----
Prints current configuration in the terminal
Prints current configuration in the terminal.
**Method**
----
@@ -17,17 +17,17 @@ aliases:
`pybytes.print_config()`
**Success Response**
ssl = True
wifi = {'ssid': '', 'password': ''}
lte = {'apn': 'internet', 'cid': 1, 'reset': False, 'carrier': 'Standard', 'band': 3, 'type': 'IP'}
username = alipsilv@hotmail.com
network_preferences = ['lte', 'lte', 'lte', 'lora_otaa']
cfg_msg = Pybytes configuration read from /flash/pybytes_config.json
dump_ca = True
wlan_antenna = 0
server = 10.0.0.61
lora = {'otaa': {'app_key': '87c8105c151f885bc19ccb9484fe8185', 'app_device_eui': '909d7afb9b82c0f6', 'app_eui': '70B3D57ED000AFA0'}}
ota_server = {'port': 443, 'domain': 'software.pycom.io'}
pybytes_autostart = True
ssl_params = {'ca_certs': '/flash/cert/pycom-ca.pem'}
device_id = 139e95ed-7213-406b-b07a-a54bfbf021c8
>> ssl = True
>> wifi = {'ssid': '', 'password': ''}
>> lte = {'apn': 'internet', 'cid': 1, 'reset': False, 'carrier': 'Standard', 'band': 3, 'type': 'IP'}
>> username = alipsilv@hotmail.com
>> network_preferences = ['lte', 'lte', 'lte', 'lora_otaa']
>> cfg_msg = Pybytes configuration read from /flash/pybytes_config.json
>> dump_ca = True
>> wlan_antenna = 0
>> server = 10.0.0.61
>> lora = {'otaa': {'app_key': '87c8105c151f885bc19ccb9484fe8185', 'app_device_eui': '909d7afb9b82c0f6', 'app_eui': '70B3D57ED000AFA0'}}
>> ota_server = {'port': 443, 'domain': 'software.pycom.io'}
>> pybytes_autostart = True
>> ssl_params = {'ca_certs': '/flash/cert/pycom-ca.pem'}
>> device_id = 139e95ed-7213-406b-b07a-a54bfbf021c8

View File

@@ -6,7 +6,7 @@ aliases:
**Read config**
----
Reads configuration from file
Reads configuration from the given file.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Reconnect**
----
Reconnects device
Reconnects device.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Register periodical analog pin publish**
----
Publish periodically on the given analog pin
Publish periodically on the given analog pin.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Register periodical digital pin publish**
----
Publish periodically on the given digital pin
Publish periodically on the given digital pin.
**Method**

View File

@@ -6,7 +6,7 @@ aliases:
**Send analog pin value**
----
Send analog pin value
Send analog pin value.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Send battery level**
----
Send battery level
Send battery level.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Send custom location**
----
Send custom location
Send custom location.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Send custom location**
----
Send custom location
Send custom location.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Send analog pin value**
----
Send analog pin value
Send analog pin value.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Send info message**
----
Send info message
Send info message.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Send ping message**
----
Send ping message
Send ping message.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Send scan info message**
----
Send scan info message
Send scan info message.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Send signal**
----
Send signal
Send signal to the given pin.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Send ping message**
----
Send ping message
Send ping message. TBD
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Set configuration**
----
Set device configuration
Set device configuration.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Send custom message callback**
----
Send custom location
Send custom location.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Update configuration**
----
Update device configuration
Update device configuration.
**Method**
----

View File

@@ -6,7 +6,7 @@ aliases:
**Update configuration**
----
Update device configuration
Update device configuration.
**Method**
----