mqtt_server              = {"remote":"192.168.1.59", "port":1883, "user_name": "admin", "password": "miler502"}
# mqtt_server              = {"remote":"192.168.1.70", "port":1883, "user_name": "admin", "password": "miler502"}
# mqtt_server              = {"remote":"127.0.0.1", "port":1883, "user_name": "admin", "password": "miler502"}

#人脸识别串口模块配置
DEFAULT_PORT = {
    "Windows": "COM9",
    "Linux": "/dev/ttyUSB0",
    "Darwin": "/dev/tty.usbserial-0001",
}
BAUDRATE = 115200

#UART列表可以有多个设备，  unique_name 应用于MQTT协议, 用于区分设备
uart_list1 = [
    {"device_name":"ZZ_9TE", "comm_addr": 2, "device_remap" : 6000, "unique_name": "circuit_1", "circuit_id" : 3, "camera_url" : "rtsp://192.168.1.205:554"},
    {"device_name":"ZZ_9TE", "comm_addr" :2, "device_remap" : 8000, "unique_name": "circuit_2", "circuit_id" : 4, "camera_url" : "rtsp://192.168.1.84:8554/live/stream"},
]

#TCP列表只有一个设备，  unique_name 应用于MQTT协议, 用于区分设备
tcp_list1 = [
    {"device_name":"menu_mine", "comm_addr": 1, "device_remap" : 2000, "unique_name": "circuit_0", "circuit_id" : 0, "camera_url" : "rtsp://192.168.1.205:554"},
]

#TCP列表只有一个设备，  unique_name 应用于MQTT协议, 用于区分设备
tcp_list2 = [
    {"device_name":"menu_light_7", "comm_addr": 2, "device_remap" : 4000, "unique_name": "circuit_1", "circuit_id" : 1, "camera_url" : "rtsp://192.168.1.205:554"},
]

#TCP列表只有一个设备，  unique_name 应用于MQTT协议, 用于区分设备
tcp_list3 = [
    {"device_name":"menu_light_7_inch", "comm_addr": 3, "device_remap" : 6000, "unique_name": "circuit_2", "circuit_id" : 2, "camera_url" : "rtsp://192.168.1.205:554"},
]

# 增加足够多的回路以测试
tcp_list4 = [
    {"device_name":"menu_high", "comm_addr": 4, "device_remap" : 8000, "unique_name": "circuit_3", "circuit_id" : 3, "camera_url" : "rtsp://192.168.1.205:554"},
]

tcp_list5 = [
    {"device_name":"menu_high", "comm_addr": 5, "device_remap" : 8000, "unique_name": "circuit_4", "circuit_id" : 4, "camera_url" :"rtsp://192.168.1.205:554"}
]

tcp_list6 = [
    {"device_name":"menu_high", "comm_addr": 6, "device_remap" : 8000, "unique_name": "circuit_5", "circuit_id" : 5, "camera_url" : "rtsp://192.168.1.205:554"},
]

tcp_list7 = [
    {"device_name":"menu_mine", "comm_addr": 7, "device_remap" : 8000, "unique_name": "circuit_6", "circuit_id" : 6, "camera_url" : "rtsp://192.168.1.205:554"},
]

tcp_list8 = [
    {"device_name":"menu_light", "comm_addr": 8, "device_remap" : 8000, "unique_name": "circuit_7", "circuit_id" : 7, "camera_url" : "rtsp://192.168.1.205:554"},
]

#每一项配置都会创建一个通讯线程, device_list为该通讯线程的设备列表
comm_thread_config = [
    {"protocol" : "modbus_tcp", "device_list": tcp_list1,  "mode" : '{"ip": "192.168.1.182", "port": 502}'},
    # {"protocol" : "modbus_tcp", "device_list": tcp_list2,  "mode" : '{"ip": "192.168.1.182", "port": 502}'},
    # {"protocol" : "modbus_tcp", "device_list": tcp_list3,  "mode" : '{"ip": "192.168.1.183", "port": 502}'},
    # {"protocol" : "modbus_tcp", "device_list": tcp_list4,  "mode" : '{"ip": "192.168.1.184", "port": 502}'},
    # {"protocol" : "modbus_tcp", "device_list": tcp_list5,  "mode" : '{"ip": "192.168.1.185", "port": 502}'},
    # {"protocol" : "modbus_tcp", "device_list": tcp_list6,  "mode" : '{"ip": "192.168.1.186", "port": 502}'},
    # {"protocol" : "modbus_tcp", "device_list": tcp_list7,  "mode" : '{"ip": "192.168.1.187", "port": 502}'},
    # {"protocol" : "modbus_tcp", "device_list": tcp_list8,  "mode" : '{"ip": "192.168.1.188", "port": 502}'},
]
