meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc_urecs:software_interface [2023/10/18 13:04] – vor | doc_urecs:software_interface [2024/06/06 13:04] (current) – vor | ||
---|---|---|---|
Line 27: | Line 27: | ||
==== Access ==== | ==== Access ==== | ||
- | The u.RECS Management API is accessible via the IP-Address or the hostname of the u.RECS. The basic URL of the API has the format '' | + | The u.RECS Management API is accessible via the IP-Address or the hostname of the u.RECS. The basic URL of the API has the format '' |
+ | |||
+ | https://192.168.0.50/ | ||
Accessing the REST API requires HTTP Basic authentication. The password of the admin account can be changed in the Settings page. | Accessing the REST API requires HTTP Basic authentication. The password of the admin account can be changed in the Settings page. | ||
Line 51: | Line 53: | ||
<node maxPowerUsage=" | <node maxPowerUsage=" | ||
actualNodePowerUsage=" | actualNodePowerUsage=" | ||
- | rcuId=" | + | rcuId=" |
<node maxPowerUsage=" | <node maxPowerUsage=" | ||
actualNodePowerUsage=" | actualNodePowerUsage=" | ||
Line 74: | Line 76: | ||
|'' | |'' | ||
|'' | |'' | ||
- | |'' | + | |'' |
|'' | |'' | ||
|'' | |'' | ||
|'' | |'' | ||
+ | |'' | ||
In accordance to the component node the API offers nodeList which returns multiple instances of node. | In accordance to the component node the API offers nodeList which returns multiple instances of node. | ||
Line 92: | Line 95: | ||
regulatorsTemperature=" | regulatorsTemperature=" | ||
loraJoinEui=" | loraJoinEui=" | ||
- | loraVendorID=" | + | loraVendorID=" |
firmwareVersion=" | firmwareVersion=" | ||
< | < | ||
Line 102: | Line 105: | ||
^ Attribute ^ Description ^ Unit ^ Data type ^ | ^ Attribute ^ Description ^ Unit ^ Data type ^ | ||
|'' | |'' | ||
- | |'' | + | |'' |
- | |'' | + | |'' |
- | |'' | + | |'' |
- | |'' | + | |'' |
- | |'' | + | |'' |
- | |'' | + | |'' |
- | |'' | + | |'' |
- | + | |'' | |
- | In accordance | + | |'' |
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
+ | |'' | ||
==== System ==== | ==== System ==== | ||
+ | |||
+ | The output of the ''/ | ||
Example XML: | Example XML: | ||
Line 132: | Line 157: | ||
<node maxPowerUsage=" | <node maxPowerUsage=" | ||
actualNodePowerUsage=" | actualNodePowerUsage=" | ||
- | health=" | + | health=" |
<node maxPowerUsage=" | <node maxPowerUsage=" | ||
actualNodePowerUsage=" | actualNodePowerUsage=" | ||
Line 163: | Line 188: | ||
|''/ | |''/ | ||
|''/ | |''/ | ||
+ | |''/ | ||
+ | rest_node_smarc_debug_uart_uri | ||
=== LoRaWAN API === | === LoRaWAN API === | ||
The LoRaWAN interface allows up and downlink connections to an application server. | The LoRaWAN interface allows up and downlink connections to an application server. | ||
- | Packets | + | Payload |
^ Attribute ^ Description ^ HTTP method ^ | ^ Attribute ^ Description ^ HTTP method ^ | ||
- | |''/ | + | |''/ |
- | |''/ | + | |''/ |
- | |''/ | + | |
- | Example | + | Example |
- | <code xml>< | + | <code xml>< |
- | <packetbody>lora packet content in base64</packetbody> | + | <payload>{custom lorawan payload}</payload> |
+ | < | ||
</ | </ | ||
- | Example | + | Example |
- | <code xml>< | + | <code xml>< |
- | <band>eu</band> | + | <payload>{custom lorawan payload}</payload> |
- | < | + | |
- | < | + | |
- | < | + | |
</ | </ | ||
- | In order to remotely manage the RECS power status via LoRaWAN, the Application Server must send the downlink command payload in following format: | + | ==== FPort ==== |
- | <code xml> | + | The Frame Port (fport) separates different communication parties on the API, and functions as an identifyer for the message sender |
- | <l masterkey=""> | + | When using the REST API, you are free to choose a value between 2 - 223. |
- | < | + | FPort 1 is reserved for the management controller. |
- | <l> | + | |
- | </ | + | |
- | + | ||
- | The master and API keys are managed in the RECS web interface. | + | |
=== Errors === | === Errors === | ||
Line 205: | Line 225: | ||
==== LoRa Message ==== | ==== LoRa Message ==== | ||
- | The u.RECS supports | + | The u.RECS supports upstream |
+ | |||
+ | All system related management communication (excluding the REST API) uses **FPort 1**. | ||
+ | |||
+ | Upstream message payload layout: | ||
^ Byte(s) ^ Description ^ Unit ^ Data type ^ | ^ Byte(s) ^ Description ^ Unit ^ Data type ^ | ||
Line 225: | Line 249: | ||
|26 | PoE Status Port 1 | - (see below) | Byte | | |26 | PoE Status Port 1 | - (see below) | Byte | | ||
|27 | PoE Status Port 2 | - (see below) | Byte | | |27 | PoE Status Port 2 | - (see below) | Byte | | ||
+ | |||
+ | The u.RECS supports basic control functions over LoRaWAN. | ||
+ | Downstream message payloads: | ||
+ | |||
+ | **Change power state for node:** | ||
+ | ^ Byte(s) ^ Description ^ Unit ^ Data type ^ | ||
+ | |0 | Lora Message-Version | - | Byte | | ||
+ | |1 | Node ID | - | Byte | | ||
+ | |2 | LoRa Command (0x01 = ON, 0x02 = OFF, 0x03 = RESET) | - | Byte | | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== PoE status decoder ==== | ||
Here is some C-Code to decode the PoE Status: | Here is some C-Code to decode the PoE Status: |