---
# System prepended metadata

title: 2020 02-12

---

###### tags: SPP API 

# 2020 02-12

### 出廠資料導入工具
- si_item
```jsonld
{
  "DEVICE_SN": "VMOWK181600140",
  "IMEI": "351918068891108",
  "WIFI_KEY": "9bb13610a4",
  "SSID": "Roadmio_EC55DE",
  "WIFI_AP_MAC": "001FFBEC55DE",
  "WIFI_STATION_MAC": "001FFBEC55DF",
  "BT_MAC": "001FFBEC55E0",
  "FWVER": "MPSS: M18QW_v07.05.174461 APSS: VM325_v12.00.181552_Truck CUSTAPP: VM325_v12.00.181552_Truck-custapp",
  "CARTONNO": "CH19L80419001J",
  "PALLET_ID": "PH80427005",
  "BOARD_BARCODE": "NJK4I1500631J01",
  "PRODUCT_DATE": "ISODate",
  "DEVICE_CODE": "VM-325",
  "DEVICE_TYPE": "OBDⅡ",
  "COLOR": "黑色",
  "USER_NAME": "Roadmin",
  "PASSWORD": "Roadmin",
  "OEM_EXPIRY": "",
  "BOX_ID": "",
  "PACKING_LIST_NO": "",
  "PRODUCT_BARCODE": "",
  "MID_CASE_BARCODE": "",
  "BOX_BARCODE": "",
  "deviceMode": "hotpot" // -> 新加的欄位
  "po": "20180814180956605",
  "status": 0,
  "track": [
    {
      "from_id": "ObjectId",
      "to_id": "ObjectId",
      "po": "20180814180956605",
      "type": "out"
    }
  ],
  "owner": "ObjectId",
  "lastModified": "ISODate"
}
```
- Peter寫的parser tool優化
- 前端介面讓FAE操作?
    - import csv to {si_item}

---

### SPP
- 出貨流程 (有[BUG](http://jira.roadmio.com:8080/browse/SI-137), 需要修正)
```flow
st=>start: start
op=>operation: create order list
op2=>operation: picking
op3=>operation: delivering
e=>end: end
st->op->op2->op3->e
```
- ** Create order list
![](https://i.imgur.com/pTY7omB.png)
- **[NEW FEATURE]** 增加選擇deviceMode欄位 (OBD/Hotspot Tracker)
- 切換模式的介面 (?)

---

### 模式如何同步
- VM-325每次開機跟server sync
    - 拉S3config
    - curl 訪問API
    - via MQTT
- 如果有切換模式的介面, change mode via MQTT

---

### Hotspot tracker -?-> Telematics 
- 網站付費升級功能
    - 前端介面 (公司網站/ETP/SPP?)
    - 後段API

---
    
### APP
- 最多兩個APP可以綁定一個設備
> 現在的規則是一個Owner, 多個Viewer
> 兩個APP綁定的設備的關係是兩個都是owner? 
- 每一個APP只能綁定一個設備 (?)
