Files
relay/config/config.yaml

69 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 通信中继器配置文件
# 中继器配置
relay:
# 中继设备唯一标识符用于WebSocket连接时的身份标识
device_id: "1"
# 中继器名称
name: "猪场1"
# WebSocket配置
websocket:
# WebSocket服务器地址
host: "localhost"
# WebSocket端口
port: 8086
# WebSocket请求超时时间(秒)
timeout: 5
# 模拟模式配置
simulation:
# 是否开启模拟模式
enabled: true
# 模拟区域主控设备列表(没有冒号的地址)
controllers:
- id: "2"
name: "猪舍1"
type: "pig_pen_controller"
lora_address: "121"
status: "running"
- id: "5"
name: "做料1"
type: "feed_mill_controller"
lora_address: "123"
status: "stopped"
- id: "8"
name: "猪舍2"
type: "pig_pen_controller"
lora_address: "122"
status: "running"
# 模拟普通设备列表(带冒号的地址,格式为总线号:总线地址)
devices:
- id: "3"
name: "风机1"
type: "fan"
rs485_bus: "1"
rs485_address: "12"
controller_id: "2"
status: "stopped"
- id: "9"
name: "风机2"
type: "fan"
rs485_bus: "1"
rs485_address: "11"
controller_id: "2"
status: "running"
- id: "10"
name: "水帘1"
type: "water_curtain"
rs485_bus: "1"
rs485_address: "11"
controller_id: "8"
status: "stopped"
- id: "11"
name: "风机3"
type: "fan"
rs485_bus: "2"
rs485_address: "21"
controller_id: "2"
status: "stopped"