# Lora-Internal-Flow 1.0.0 documentation Internal Communication for: * Lora-Gateway * Lora-Map ## Table of Contents * [Servers](#servers) * [Channels](#channels) ## 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 Any
### `subscribe` lora/data/{deviceID} #### Message Informs you about a Position and Status of a Tracker ##### Payload
Name Type Description Accepted values
Bandwidth integer

Bandwidth on witch the Signal was recieved

Any
BatteryLevel number

Voltage of the battery from the device

Any
Calculatedcrc integer

The calculated CRC

Any
Codingrate integer

The Codingrate in witch the Signal was recieved

Any
Crcstatus string

Shows the CRC-Status in a Field

Ok, Bad, No
Frequency integer

The Frequency on that the Message was arrived

Any
Gps object

Gps-Data of a Message

Any
Gps.Fix boolean

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

Any
Gps.Hdop number

Dislocation from GPS-Reciever

Any
Gps.Height number

Height of the GPS-Reciever

Any
Gps.LastGPSPos string

Timestamp when the GPS-Reciever has its last position

Any
Gps.LastLatitude number

Last Latitude of the GPS-Reciever

Any
Gps.LastLongitude number

Last Longitude of the GPS-Reciever

Any
Gps.Latitude number

Latitude of the GPS-Reciever

Any
Gps.Longitude number

Longitude of the GPS-Reciever

Any
Gps.Time string

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

Any
Host string

Name of the Gateway that Recieves the Data

Any
Name string

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

Any
PacketRssi number

Recieve Signal Strength Index for the whole LORA-Messgae

Any
Receivedtime string

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

Any
Recieverinterface integer

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

Any
Recieverradio integer

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

Any
Rssi number

Recieve Signal Strength Index for the LORA-Message

Any
Snr number

Signal to Noise Ratio of the LORA-Message

Any
Snrmax number

Maximum Signal to Noise Ratio of the LORA-Message

Any
Snrmin number

Minimum Signal to Noise Ratio of the LORA-Message

Any
Spreadingfactor integer

The Spreadingfactor of the LORA-Message

Any
Time integer

Internal Timecounter of the LORA-Reciever

Any
###### Example of payload _(generated)_ ```json { "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 Any
### `subscribe` lora/panic/{deviceID} #### Message Informs you about a Position and Status of a Tracker ##### Payload
Name Type Description Accepted values
Bandwidth integer

Bandwidth on witch the Signal was recieved

Any
BatteryLevel number

Voltage of the battery from the device

Any
Calculatedcrc integer

The calculated CRC

Any
Codingrate integer

The Codingrate in witch the Signal was recieved

Any
Crcstatus string

Shows the CRC-Status in a Field

Ok, Bad, No
Frequency integer

The Frequency on that the Message was arrived

Any
Gps object

Gps-Data of a Message

Any
Gps.Fix boolean

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

Any
Gps.Hdop number

Dislocation from GPS-Reciever

Any
Gps.Height number

Height of the GPS-Reciever

Any
Gps.LastGPSPos string

Timestamp when the GPS-Reciever has its last position

Any
Gps.LastLatitude number

Last Latitude of the GPS-Reciever

Any
Gps.LastLongitude number

Last Longitude of the GPS-Reciever

Any
Gps.Latitude number

Latitude of the GPS-Reciever

Any
Gps.Longitude number

Longitude of the GPS-Reciever

Any
Gps.Time string

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

Any
Host string

Name of the Gateway that Recieves the Data

Any
Name string

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

Any
PacketRssi number

Recieve Signal Strength Index for the whole LORA-Messgae

Any
Receivedtime string

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

Any
Recieverinterface integer

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

Any
Recieverradio integer

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

Any
Rssi number

Recieve Signal Strength Index for the LORA-Message

Any
Snr number

Signal to Noise Ratio of the LORA-Message

Any
Snrmax number

Maximum Signal to Noise Ratio of the LORA-Message

Any
Snrmin number

Minimum Signal to Noise Ratio of the LORA-Message

Any
Spreadingfactor integer

The Spreadingfactor of the LORA-Message

Any
Time integer

Internal Timecounter of the LORA-Reciever

Any
###### Example of payload _(generated)_ ```json { "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 Any
### `subscribe` lora/status/{deviceID} #### Message Informs you about a Status of a Tracker ##### Payload
Name Type Description Accepted values
Bandwidth integer

Bandwidth on witch the Signal was recieved

Any
BatteryLevel number

Voltage of the battery from the device

Any
Calculatedcrc integer

The calculated CRC

Any
Codingrate integer

The Codingrate in witch the Signal was recieved

Any
Crcstatus string

Shows the CRC-Status in a Field

Ok, Bad, No
DeviceStatus string

Shows the internal state in a Field

Startup, Powersave, Shutdown
Frequency integer

The Frequency on that the Message was arrived

Any
FrequencyOffset integer

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

Any
Host string

Name of the Gateway that Recieves the Data

Any
IpAddress string

IP-Address of the device, for debug

Any
Name string

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

Any
PacketRssi number

Recieve Signal Strength Index for the whole LORA-Messgae

Any
Receivedtime string

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

Any
Recieverinterface integer

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

Any
Recieverradio integer

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

Any
Rssi number

Recieve Signal Strength Index for the LORA-Message

Any
Snr number

Signal to Noise Ratio of the LORA-Message

Any
Snrmax number

Maximum Signal to Noise Ratio of the LORA-Message

Any
Snrmin number

Minimum Signal to Noise Ratio of the LORA-Message

Any
Spreadingfactor integer

The Spreadingfactor of the LORA-Message

Any
Time integer

Internal Timecounter of the LORA-Reciever

Any
Version integer

Software-Versionsnumber of the Device

Any
WifiActive boolean

Status if the Device successufly connect to a wifi

Any
WifiSsid string

SSID of the WIFI witch the device connects to.

Any
###### Example of payload _(generated)_ ```json { "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" } ```