Ubuntu/CentOS
Enable edges support
Edges functionality enabled on ThingsBoard Professional/Community Edition server by default starting from 3.3.1 version. If you are using 3.3.0 please do next steps to enable edge functionality. To enable it please 编辑配置文件:
1
sudo nano /etc/thingsboard/conf/thingsboard.conf
Add the following lines to the configuration file:
1
export EDGES_ENABLED=true
RPC port for edge communication
ThingsBoard Edge connects to ThingsBoard Professional/Community Edition server on 7070 port (by default).
You can overwrite this by setting EDGES_RPC_PORT variable in configuration file. To change it please 编辑配置文件:
1
sudo nano /etc/thingsboard/conf/thingsboard.conf
Add the following lines to the configuration file:
1
export EDGES_RPC_PORT=**NEW_EDGES_RPC_PORT**
Restart the service
1
2
$ sudo service thingsboard stop
$ sudo service thingsboard start
Windows
Enable edges support
以管理员用户身份打开记事本或其他编辑器(右键单击应用程序图标,然后选择“以管理员身份运行”)。
打开以下文件进行编辑(在文件选择对话框中选择“所有文件”而不是“文本文档”,编码为UTF-8):
1
C:\Program Files (x86)\thingsboard\conf\thingsboard.yml
and locate “# Edges parameters” block:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Edges parameters
edges:
enabled: "${EDGES_ENABLED:false}"
rpc:
port: "${EDGES_RPC_PORT:7070}"
client_max_keep_alive_time_sec: "${EDGES_RPC_CLIENT_MAX_KEEP_ALIVE_TIME_SEC:300}"
ssl:
# Enable/disable SSL support
enabled: "${EDGES_RPC_SSL_ENABLED:false}"
cert: "${EDGES_RPC_SSL_CERT:certChainFile.pem}"
private_key: "${EDGES_RPC_SSL_PRIVATE_KEY:privateKeyFile.pem}"
storage:
max_read_records_count: "${EDGES_RPC_STORAGE_MAX_READ_RECORDS_COUNT:50}"
no_read_records_sleep: "${EDGES_RPC_NO_READ_RECORDS_SLEEP:1000}"
sleep_between_batches: "${EDGES_RPC_SLEEP_BETWEEN_BATCHES:1000}"
scheduler_pool_size: "${EDGES_SCHEDULER_POOL_SIZE:4}"
edge_events_ttl: "${EDGES_EDGE_EVENTS_TTL:0}"
state:
persistToTelemetry: "${EDGES_PERSIST_STATE_TO_TELEMETRY:false}"
locate “EDGES_ENABLED” parameter. Replace “false” with “true”.
1
enabled: "${EDGES_ENABLED:true}"
ThingsBoard Edge connects to ThingsBoard Professional/Community Edition server on 7070 port (by default).
You can overwrite this by updating EDGES_RPC_PORT variable in configuration file. locate “EDGES_RPC_PORT” parameter. Replace “7070” with “NEW_EDGES_RPC_PORT”.
1
2
rpc:
port: "${EDGES_RPC_PORT:NEW_EDGES_RPC_PORT}"
Restart the service
1
2
net stop thingsboard
net start thingsboard