LASS - Data specification
Field separator ( | ), SubField separator ( , )
資料格式
Sample log data
data.log-20151011
- LASS/Test/MAPS |ver_format=1|fmt_opt=0|app=MAPS|ver_app=0.7.0|device_id=LASS-MAPS-LJ|tick=421333057|date=2015-10-10|time=06:54:52|device=LinkItONE|values=37250.00,100.00,1.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,1007.71,26.70,81.30,6.00,0.00,0.00,0.00,0.00,0.00,0.00|data-0=37250.00|data-1=100.00|data-2=1.00|data-3=0.00|data-B=1007.71|data-T=26.70|data-H=81.30|data-L=6.00|gps-loc={ type:"Point", coordinates: [25.024463 , 121.368752 ] }|gps-fix=1|gps-num=6|gps-alt=3
python DataPresentation/lass.py
- 22:51:12|LASS/Test/MAPSer_format=2|fmt_opt=0|app=MAPS|ver_app=0.7.1|device_id=LASS-MAPS-LJ|tick=132560330|date=2015-10-12|time=14:51:09|device=LinkItONE|data-0=11568.00|data-1=100.00|data-2=1.00|data-3=0.00|data-B=1016.39|data-T=22.80|data-H=57.70|data-L=0.00|gps-lat=25.024421|gps-lon=121.368866|gps-fix=1|gps-num=5|gps-alt=
Log definition
local time|MQTT topic| MQTT record definition
MQTT Topic definition
The topic must start by LASS
The second layer defined as topic group
The third layer defined as app name
MQTT Record definition
|ver_format=1|fmt_opt=0|app=MAPS|ver_app=0.6.6|device_id=LASS-MAPS-LJ|tick=24082421|date=30/9/15|time=11:37:21|device=LinkItONE|values=2128.00,100.00,1.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,1008.58,28.10,99.90,0.00,0.00,0.00,0.00,0.00,0.00,0.00|gps=$GPGGA,113721.000,2502.2129,N,12136.8749,E,0,0,,137.1,M,15.3,M,,*4F\r
Record field definition
ver_format (current default 3)
- the MQTT record format version.
- ver_format=0 reserved for user defined format, default system tool will filter out these data because of format can’t be handle.
fmt_opt
- the format option. (0) default (1) gps information invalid
app
- the system wide unique application name, please name it as what ever you like. To avoid the duplication, please register app name here
ver_app
- the LASS version (ex. 0.7.5)
device_id
- the device id, should be unique in your application (ex. LASS-MAPS-LJ)
tick :
date :
- date information ( device parse it from gps information) (ex. 2015-10-12)
time :
- time information ( device parse it from gps information) (ex. 06:54:52)
device:
s_n:
- sensor type
- sensor type format is type+sequence+.extension, type start from 1 character. Can extend to more characters. Sequence, extension must be numbers. start from 1 digit, be extend to more digits. .extension is optional. numbers
- Valid Example: s_d0, s_b20, s_p0.15
- from 1 char, can be extend to 2 char.
- 0: sequence number
- 1: battery level
- 2: battery mode(0) or charging (1)
- 3: motion speed
- b: barometer
- b0: Grove Barometer sensor (high accuracy)
- b1: BMP180 sensor
- b2:BME280 sensor
- d: dust sensor
- d0: G3/G5 dust sensor PM2.5
- d1 : G3/G5 dust sensor PM10
- d2: G3/G5 dust sensor PM1
- d3: Panasonic SN-GCHA1 dust sensor PM2.5
- ... reserved for PMxx
- grove dust sensor
- g: gas related
- g0:NH3
- g1:CO
- g2:NO2
- g3:C3H8
- g4:C4H10
- g5:CH4
- g6:H2
- g7:C2H5OH
- g8: SenseAir S8 CO2
- h: humidity
- h0: DHT22 sensor
- h1: HTS221 sensor
- h2: SHT31 sensor
- h3: HTU21D sensor
- h4: BME280 sensor
- h5: SHT25 sensor
- l: light
- l0: Lux
- l1: visible light
- l2: UV
- l3: BH1750FVI sensor
- n: nucleon( radiation )
- o: other, misc
- p: rain
- rain sensor support .extension format. The definition of extension is data duration (unit minutes). example: p0.10 mean 10 min rainfall data
- p0:
s: sound sensor
t: temperature- t0: DHT22 sensor
- t1: HTS221 sensor
- t2: SHT31 sensor
- t3: HTU21D sensor
- t4: BME280 sensor
- t5: SHT25 sensor
w: wind- w0: wind speed
- w1: wind direction
r: rain- r10: 10min rainfall data
- r60: 1hr rainfall data
sensor values - |s_0=37250.00|s_1=100.00|s_2=1.00|s_3=0.00|s_b=1007.71|s_t=26.70|s_h=81.30|s_l=6.00|
gps:
- gps string, we select GPGGA as our default format.
- gps_lat: latitude
- gps_lon: longitude
- gps_fix: fix quality
- 0: invalid
- 1: GPS fix
- 2: DGPS fix
- gps_num: The number of satellites involved in the GPS fix.
- gps_alt: The altitude above the sea level.
- |gps-loc={ type:"Point", coordinates: [25.024463 , 121.368752 ] }|gps-fix=1|gps-num=6|gps-alt=3
- [Ref]: http://freenmea.net/docs
CSV format definition
- csv format reference sample ( https://publicwiki.deltares.nl/display/FEWSDOC/General+Csv#GeneralCsv-SamplesImport )
Scenarios Example