Service
#
Phân trangusers-service
devices-service
relations-service
automatic-service
update-service
files-service
Định nghĩa cấu hình phân trang các api tìm kiếm find
"paginate": { "default": 200, "max": 1000}
default
: giới hạn trang mặc địnhmax
: giới hạn trang lớn nhất người dùng có thể tùy chỉnh thông qua param$limit
trong truy vấn
#
Logusers-service
devices-service
relations-service
automatic-service
update-service
files-service
"log2Console": true,"logLevel": "debug","logPath": "/media/data/",
log2Console
: print log ra console terminal hay khônglogLevel
: cấp độ loglogPath
: Folder chứa file log trong quá trình hoạt động (đường dẫn trong container)
#
net_interfaceusers-service
devices-service
relations-service
automatic-service
update-service
files-service
Không sử dụng. Chỉ thay đổi khi chạy trực tiếp trên máy
#
private_networkusers-service
devices-service
relations-service
automatic-service
update-service
files-service
"private_network": { "addr": "10.200.0.0", "whiteList":[]}
addr
: dải địa chỉ trong mạng nội bộ của các servicewhiteList
: danh sách IP ngoại lệ ở ngoài mạng
#
Giới hạn số lượng dữ liệu cho user"limit": { "schema": 100}
schema
: giới hạn số lượng kịch bản có thể tạo của mỗi userusers-service
rule
: giới hạn số lượng luật tự động có thể tạo của mỗi userautomatic-service
scheduleGroup
: giới hạn số hẹn giờ có thể tạo của mỗi userdevices-service
#
Firebase notifyusers-service
"firebase": { "serviceAccountKey": "", "databaseURL": ""}
serviceAccountKey
: Đường dẫn tương đối trỏ tới file json (đặt trong cùng folder)databaseURL
: đường dẫn tới firebase urlVí dụ :
"firebase":{ "serviceAccountKey":"../config/smarthome-f859f-firebase-adminsdk-05in8-5a2957635b.json", "databaseURL":"https://smarthome-f859f.firebaseio.com" },
#
Liên kết google assitantusers-service
devices-service
relations-service
"googleApikey": "","googleClientId": "","googleClientSecret": "","googleApi": { "serviceAccountKey": ""},
Ví dụ :
"googleApikey":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","googleClientId":"xxxxxxxxxxxxxxxx","googleClientSecret":"xxxxxxxxxxxxxxxx","googleApi":{ "serviceAccountKey":"../config/Makipos Smarthome-xxxxxxxxx.json"},
#
Liên kết maika assistantusers-service
devices-service
relations-service
"maikaClientId":"","maikaClientSecret":"","maikaHomeGraphKey":"","maikaHomeGraphUrl":"https://staging.actions-api.iviet.com/v1/devices",
#
Open weather map apiusers-service
Sử dụng để lấy thời tiết theo vị trí.
"openweatherapiKey": "",
#
Slack notifyusers-service
devices-service
relations-service
automatic-service
update-service
files-service
Cấu hình slack notify để thông báo trạng thái hoạt động của service qua kênh slack. Thông báo lỗi, thông báo khởi động
"slack":{ "token":"", "conversationId":""},
#
Maildevices-service
Cấu hình Email sử dụng cho chức năng tự động gửi email cảnh báo hệ thống tới cho người vận hành hệ thống.
"mail":{ "host":"", "port":465, "secure":true, "user":"", "pass":""},
#
OTP (SMS service)users-service
Cấu hình FTP API sử dụng cho chức năng đăng nhập sử dụng OTP
"fpt":{ "clientId":"", "clientSecret":"", "brandName":""}