Lora-Map/Communication.md
2019-09-24 15:13:36 +02:00

10 KiB

Lora-Internal-Flow 1.0.0 documentation

Internal Communication for:

  • Lora-Gateway
  • Lora-Map

Table of Contents

Servers

URL Protocol Description
127.0.0.1:{port} mqtt Lora-Broker
URL Variables
Name Default value Possible values Description
port 1883
  • 1883
  • 8883
Secure connection (TLS) is available through port 8883.
Security Requirements
Type In Name Scheme Format Description
userPassword

Using Username and Password to connect to online broker

Channels

The topic on whitch the devices are shown for Tracking data.

Channel Parameters

deviceID

The ID of the streetlight.

Name Type Description Accepted values
deviceID
string</td>
Any

subscribe lora/data/{deviceID}

Message

Informs you about a Position and Status of a Tracker

Payload
Name Type Description Accepted values
Bandwidth
integer</td>

Bandwidth on witch the Signal was recieved

Any
BatteryLevel
number</td>

Voltage of the battery from the device

Any
Calculatedcrc
integer</td>

The calculated CRC

Any
Codingrate
integer</td>

The Codingrate in witch the Signal was recieved

Any
Crcstatus
string</td>

Shows the CRC-Status in a Field

Ok, Bad, No
Frequency
integer</td>

The Frequency on that the Message was arrived

Any
Gps
object</td>

Gps-Data of a Message

Any
Gps.Fix
boolean</td>

Status of the Tracker, true if it has GPS-Signal

Any
Gps.Hdop
number</td>

Dislocation from GPS-Reciever

Any
Gps.Height
number</td>

Height of the GPS-Reciever

Any
Gps.LastGPSPos
string</td>

Timestamp when the GPS-Reciever has its last position

Any
Gps.LastLatitude
number</td>

Last Latitude of the GPS-Reciever

Any
Gps.LastLongitude
number</td>

Last Longitude of the GPS-Reciever

Any
Gps.Latitude
number</td>

Latitude of the GPS-Reciever

Any
Gps.Longitude
number</td>

Longitude of the GPS-Reciever

Any
Gps.Time
string</td>

Timestamp of the GPS-Reciever, that it gets from the Satelites

Any
Host
string</td>

Name of the Gateway that Recieves the Data

Any
Name
string</td>

Name of the GPS-Tracker, must be unique between every Device

Any
PacketRssi
number</td>

Recieve Signal Strength Index for the whole LORA-Messgae

Any
Receivedtime
string</td>

Timestamp of the Gateway, when it recieves the LORA-Message

Any
Recieverinterface
integer</td>

Internal virtual Radio of the Gateway, witch recieves the LORA-Messange

Any
Recieverradio
integer</td>

Internal Radio of the Gateway, witch recieves the LORA-Messange

Any
Rssi
number</td>

Recieve Signal Strength Index for the LORA-Message

Any
Snr
number</td>

Signal to Noise Ratio of the LORA-Message

Any
Snrmax
number</td>

Maximum Signal to Noise Ratio of the LORA-Message

Any
Snrmin
number</td>

Minimum Signal to Noise Ratio of the LORA-Message

Any
Spreadingfactor
integer</td>

The Spreadingfactor of the LORA-Message

Any
Time
integer</td>

Internal Timecounter of the LORA-Reciever

Any
Example of payload (generated)
{
  "Bandwidth": 7800,
  "BatteryLevel": 2.5,
  "Calculatedcrc": 0,
  "Codingrate": 5,
  "Crcstatus": "Ok",
  "Frequency": 0,
  "Gps": {
    "Fix": true,
    "Hdop": 0.8,
    "Height": 0,
    "LastGPSPos": "01/01/2019 12:00:00",
    "LastLatitude": 50.7,
    "LastLongitude": 7.2,
    "Latitude": 50.7,
    "Longitude": 7.2,
    "Time": "01/01/2019 12:00:00"
  },
  "Host": "string",
  "Name": "string",
  "PacketRssi": 0,
  "Receivedtime": "01/01/2019 12:00:00",
  "Recieverinterface": 0,
  "Recieverradio": 0,
  "Rssi": 0,
  "Snr": 0,
  "Snrmax": 0,
  "Snrmin": 0,
  "Spreadingfactor": 7,
  "Time": 0
}

Channel Parameters

streetlightId

The ID of the streetlight.

Name Type Description Accepted values
streetlightId
string</td>
Any

publish smartylighting/streetlights/1/0/action/{streetlightId}/dim

Message

Command a particular streetlight to dim the lights.

Payload
Name Type Description Accepted values
percentage
integer</td>

Percentage to which the light should be dimmed to.

Any
sentAt
string</td>

Date and time when the message was sent.

Any
Example of payload (generated)
{
  "percentage": 0,
  "sentAt": "2019-09-24T12:10:43Z"
}