After adding devices to the LNS (LoraWan Network Server) and sending data from these devices for the first time, a directory structure is built up under the lorawan.x objects:
The directory structure of the LoraWan objects is as follows: instance number, application ID, devices, DEVEUI, with Name: device ID (CS device name).
The name can be changed by the user according to his wishes.
(Expert mode, right on the pencil, common, NAME)
Below that are the directories, uplink, downlink and configuration. There is also an info folder under the instance number in which the connection status can be checked.
Uplink.decoded: Decoded (user data) data (depending on the codec stored on the LNS side)
Uplink.raw: Raw data from the payload in the form of Base64, HEX, ASCII/string, and in JSON format
Uplink.remaining: leftover data, mainly transmission parameters
A spezial state is created in to INFO Folder "deviceinformations" for all decoded data
http://Your_Iobroker_ip:8087/getPlainValue/lorawan.0.info.deviceinformations?json&user=SimpleAPI-UserName&pass=password
"294cf585f55fa497":{
"uplink":{
"decoded":{
"temperature":6.94,
"batteryLevel":0,
"batteryVoltage":3.598,
"humidity":67,
"pressure":1023.14
},
"time":"2024-03-07T13:55:35.852882001+00:00"
},
"applicationId":"03630d6f-070c-4559-a0da-6e3735bd6f7b",
"applicationName":"WeatherStation",
"usedApplicationName":"WeatherStation",
"deviceId":"WeatherStation4",
"usedDeviceId":"WeatherStation4"
},
"70b3d52dd300ed31":{
"uplink":{
"decoded":{
"lowMotorConsumption":false,
"extSensorTemperature":18.4,
"calibrationFailed":false,
"reason":81,
"brokenSensor":false,
"childLock":false,
"openWindow":false,
"sensorTemperature":22,
"highMotorConsumption":false,
"perceiveAsOnline":true,
"motorRange":175,
"attachedBackplate":true,
"targetTemperature":10,
"relativeHumidity":53.91,
"batteryVoltage":3.3,
"motorPosition":175
},
"time":"2024-03-07T13:51:32.923733764+00:00"
},
"applicationId":"59bcc5a7-59e2-4481-9615-fc4e58791915",
"applicationName":"Mclimate_Vicki",
"usedApplicationName":"Mclimate_Vicki_X",
"deviceId":"MClimate_Vicki_Heizkoerperventil_001",
"usedDeviceId":"MClimate_Vicki_Heizkoerperventil_001"
},
"a840419e81830b5a":{
"uplink":{
"decoded":{
"MOD":1,
"BAT_V":2.994,
"LAST_DOOR_OPEN_DURATION":0,
"DOOR_OPEN_STATUS":1,
"ALARM":0,
"DOOR_OPEN_TIMES":56
},
"time":"2024-03-07T11:53:16.226286632+00:00"
},
"applicationId":"6934bd1a-a34a-4336-8697-f594b32aff8a",
"applicationName":"DoorSensor",
"usedApplicationName":"DoorSensor",
"deviceId":"DoorSensor_001",
"usedDeviceId":"DoorSensor_001"
},
"a84041f621857cd2":{
"uplink":{
"decoded":{
"soilmoisture":0,
"soiltemperature":20.7,
"Voltage":3.376,
"soilconductivity":0
},
With this function it is possible to have user data automatically saved in a database, even for devices that are subsequently added to TTN/Chirpstack.
Go to the gear of any data point and set up logging in a database and make your desired settings
Save and End
Click on the pencil.
Mark the settings for logging (as shown). The marking ends below after the last curly bracket (without the comma)
Copy the selected to the clipboard
In the instances, go to the desired LoraWAn instance and go to the "Custom Configurations". Check the box for "Custom JSON" and open the "JSON Editor"
Paste the contents of the clipboard here
OK
Save and End
The instance now restarts and the logging entries are entered for all data points in Uplink.Decoded. This also happens for all data points for devices that are added later. Individual changes made in the gear wheel are retained. If the automatic function is no longer required, the check mark next to "Custom JSON" can be removed.
To delete the entries:
Influxdb.0 : null
Basically, the data is stored as it is, with a few exceptions:
Timestamps Data in Unixtime (seconds since January 1, 1970) are
By adjusting the names (exact spelling!) in the decoder, certain roles can be created. These roles can be used for further logic, grouping, visualization, etc.
Link to documentation Iobroker state roles
Name | role | Unit |
---|---|---|
Contact | sensor | |
OPEN | sensor | |
Open | sensor.window | |
WindowOpen | sensor.window | |
DoorOpen | sensor.door |
Name | role | Unit |
---|---|---|
TargetTemperature | level.temperature | °C |
ExternTemperature | level | °C |
Volt | value.voltage | V |
Soiltemperature | value.temperature | °C |
Soilmoisture | value | % |
Soilconductivity | value | μS/cm |
This list will be expanded