Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ Anonymous auth is the most simple option. It is useful for testing.
Security subsection in configuration file will look like this:

```json
"security": {
"type": "anonymous"
}
{
"security": {
"type": "anonymous"
}
}
```
{: .copy-code}
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ The REST Connector waits for HTTP requests with the Authorization header that co
Security section in configuration file will look like this:

```json
"security": {
"type": "basic",
"username": "username",
"password": "password"
}
{
"security": {
"type": "basic",
"username": "username",
"password": "password"
}
}
```

Also, make sure that your request have `Authorization` header with provided credentials.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@
Configuration section will look like:
```json
{
"host": "127.0.0.1",
"port": "5000",
"SSL": false
"server": {
"host": "127.0.0.1",
"port": "5000",
"SSL": false,
"security": {
"cert": "~/ssl/cert.pem",
"key": "~/ssl/key.pem"
}
}
}
```
{: .copy-code}
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@
|---

Configuration section will look like:

```json
{
"host": "127.0.0.1",
"port": "5000",
"SSL": true,
"security": {
"cert": "~/ssl/cert.pem",
"key": "~/ssl/key.pem"
"server": {
"host": "127.0.0.1",
"port": 5000,
"SSLVerify": true,
"security": {
"cert": "~/ssl/cert.pem",
"key": "~/ssl/key.pem"
}
}
}
```
{: .copy-code}
68 changes: 37 additions & 31 deletions _includes/templates/iot-gateway/rest-converter-custom-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@ A custom converter is converter written for some device:



|**Parameter**|**Default value**|**Description**|
|:-|:-|-
| type | **custom** | Provides information to connector that custom converter will be uses for converting data from request. |
| deviceNameExpression | **SuperAnonDevice** | Device name. |
| deviceTypeExpression | **default** | Devcie type. |
| extension | **CustomRESTUplinkConverter** | Name of custom converter class. |
| extension-config | | Configuration, for custom converter (You can put anything, there. It will be passed to the converter object on initialization). |
| key | **Totaliser** | |
| datatype | **float** | |
| fromByte | **0** | |
| toByte | **4** | |
| byteorder | **big** | |
| signed | **true** | |
| multiplier | **1** | |
|---
| **Parameter** | **Default value** | **Description** |
|:------------------------------|:------------------------------|---------------------------------------------------------------------------------------------------------------------------------
| type | **custom** | Provides information to connector that custom converter will be uses for converting data from request. |
| deviceNameExpression | **SuperAnonDevice** | Device name. |
| deviceNameExpressionSource | **constant** | Device name source. |
| deviceProfileExpressionSource | **constant** | Device profile source. |
| deviceProfileExpression | **default** | Device profile name. |
| extension | **CustomRESTUplinkConverter** | Name of custom converter class. |
| extension-config | | Configuration, for custom converter (You can put anything, there. It will be passed to the converter object on initialization). |
| key | **Totaliser** | |
| datatype | **float** | |
| fromByte | **0** | |
| toByte | **4** | |
| byteorder | **big** | |
| signed | **true** | |
| multiplier | **1** | |
| ---

{% capture difference %}

Expand All @@ -29,20 +31,24 @@ A custom converter is converter written for some device:
Mapping subsection in the configuration looks like:

```json
"converter": {
"type": "custom",
"deviceNameExpression": "SuperAnonDevice",
"deviceTypeExpression": "default",
"extension": "CustomRestUplinkConverter",
"extension-config": [
{
"key": "Totaliser",
"datatype": "float",
"fromByte": 0,
"toByte": 4,
"byteorder": "big",
"signed": true,
"multiplier": 1
}]
}
"converter": {
"type": "custom",
"deviceInfo": {
"deviceNameExpression": "SuperAnonDevice",
"deviceNameExpressionSource": "constant",
"deviceProfileExpressionSource": "constant",
"deviceProfileExpression": "default"
},
"extension": "CustomRestUplinkConverter",
"extensionConfig": {
"key": "Totaliser",
"datatype": "float",
"fromByte": 0,
"toByte": 4,
"byteorder": "big",
"signed": true,
"multiplier": 1
}
}
```
{: .copy-code}
Loading