Lora-Map/documentation/Communication.md
2019-10-29 17:56:44 +01:00

21 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

Topic witch contains the 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
}

Topic witch contains the tracking data, when the panic buttons was pressed

Channel Parameters

deviceID

The ID of the streetlight.

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

subscribe lora/panic/{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
}

Topic witch contains status of the devices

Channel Parameters

deviceID

The ID of the streetlight.

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

subscribe lora/status/{deviceID}

Message

Informs you about a 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
DeviceStatus
string</td>

Shows the internal state in a Field

Startup, Powersave, Shutdown
Frequency
integer</td>

The Frequency on that the Message was arrived

Any
FrequencyOffset
integer</td>

The internal offset to the base frequency, to compensate cheap china rf modules

Any
Host
string</td>

Name of the Gateway that Recieves the Data

Any
IpAddress
string</td>

IP-Address of the device, for debug

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
Version
integer</td>

Software-Versionsnumber of the Device

Any
WifiActive
boolean</td>

Status if the Device successufly connect to a wifi

Any
WifiSsid
string</td>

SSID of the WIFI witch the device connects to.

Any
Example of payload (generated)
{
  "Bandwidth": 7800,
  "BatteryLevel": 2.5,
  "Calculatedcrc": 0,
  "Codingrate": 5,
  "Crcstatus": "Ok",
  "DeviceStatus": "Startup",
  "Frequency": 0,
  "FrequencyOffset": 0,
  "Host": "string",
  "IpAddress": "0.0.0.0",
  "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,
  "Version": 0,
  "WifiActive": true,
  "WifiSsid": "string"
}