2025-11-07 18:18:45 - lzwcai_mcp_iot - INFO - [logger_config.py:215] - ================================================================================
2025-11-07 18:18:45 - lzwcai_mcp_iot - INFO - [logger_config.py:216] - 日志系统初始化完成 - 2025-11-07 18:18:45
2025-11-07 18:18:45 - lzwcai_mcp_iot - INFO - [logger_config.py:217] - 日志级别: INFO
2025-11-07 18:18:45 - lzwcai_mcp_iot - INFO - [logger_config.py:218] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai-mcp-server-package\lzwcai_mcp_iot\lzwcai_mcp_iot.log
2025-11-07 18:18:45 - lzwcai_mcp_iot - INFO - [logger_config.py:219] - 控制台输出: False
2025-11-07 18:18:45 - lzwcai_mcp_iot - INFO - [logger_config.py:220] - 文件输出: True
2025-11-07 18:18:45 - lzwcai_mcp_iot - INFO - [logger_config.py:221] - 文件轮转: 最大10MB, 保留5个备份
2025-11-07 18:18:45 - lzwcai_mcp_iot - INFO - [logger_config.py:222] - ================================================================================
2025-11-07 18:18:45 - lzwcai_mcp_iot.config - INFO - [config.py:89] - 配置加载完成
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:44] - DeviceOperator初始化完成，API基础URL: http://192.168.2.236:8088
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:39] - VectorService初始化完成，API基础URL: http://192.168.2.236:5002
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:348] - ================================================================================
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:349] - IoT设备MCP服务器启动流程开始
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:350] - 配置信息: {'device_api_base_url': 'http://192.168.2.236:8088', 'vector_api_base_url': 'http://192.168.2.236:5002', 'enterprise_id': '1952978233106669569', 'employeeId': '1986712221817815042', 'request_timeout': 30, 'max_retries': 3, 'vector_store_name': '设备库', 'vector_store_description': '向量库', 'encoder_type': 'word2vec', 'default_top_k': 1, 'default_auto_create': True, 'log_level': 'INFO', 'log_format': '%(asctime)s - %(name)s - %(levelname)s - %(message)s'}
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:351] - ================================================================================
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:354] - 正在初始化核心组件...
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:355] - 设备操作器API地址: http://192.168.2.236:8088
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:356] - 向量服务API地址: http://192.168.2.236:5002
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:357] - 核心组件初始化完成
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:362] - 检测到员工ID配置: 1986712221817815042
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:363] - 开始初始化MCP服务器...
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:75] - 开始初始化MCP服务器，员工ID: 1986712221817815042
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:78] - 第一步：获取企业ID...
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:410] - 正在获取员工ID为 1986712221817815042 的数字员工信息...
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:418] - 成功获取数字员工信息: {'msg': '操作成功', 'code': 200, 'data': {'userInfo': {'createBy': '', 'createTime': '2025-11-07 16:27:59', 'updateBy': None, 'updateTime': None, 'remark': None, 'userId': '1909', 'enterpriseId': '1952978233106669569', 'deptId': None, 'userName': '物联网设备管家4628', 'nickName': '物联网设备管家4628', 'userType': '03', 'email': '', 'phonenumber': '', 'sex': '2', 'avatar': '', 'password': '123456', 'status': '0', 'delFlag': '0', 'loginIp': '', 'loginDate': None, 'createSubject': False, 'createSpeakSubject': False, 'bizSysId': None, 'dept': None, 'roles': [], 'roleIds': None, 'postIds': None, 'roleId': None, 'enterprise': {'id': None, 'createBy': '', 'createTime': '2025-11-07 16:27:59', 'updateBy': None, 'updateTime': None, 'enterpriseName': None, 'enterpriseCode': None, 'description': None, 'type': None, 'businessLicense': None, 'licenseFileId': None, 'legalPerson': None, 'industryInvolved': None, 'datasetId': None, 'datasetName': None, 'datasetDescribe': None, 'oaType': None, 'oaMap': None, 'status': False}, 'bindOA': False, 'oaMap': None, 'spaceName': None, 'admin': False}, 'employeeInfo': {'id': '1986712221817815042', 'enterpriseId': '1952978233106669569', 'name': '物联网设备管家', 'type': 'assistant', 'imageInfo': None, 'personality': None, 'prompt': '管理设备', 'modelConfig': None, 'promptConfig': None, 'datasetId': '166a9087-830c-443f-81f9-924f8b089530', 'datasetApiKey': 'dataset-nNE2K1KSeagOQnCJjLQzXbpH', 'zhipuApiKey': '12334444', 'enableLongTermMemory': False}, 'enterpriseVO': {'enterpriseId': '1952978233106669569', 'enterpriseName': '中科天目', 'enterpriseCode': '002233', 'type': '人工智能', 'description': None, 'businessLicense': None, 'licenseFileId': None, 'legalPerson': None, 'industryInvolved': None, 'datasetId': 'ec8b1391-d093-4b3c-a675-5c88455f094c', 'datasetName': '中科天目', 'datasetDescribe': '系统默认创建', 'difyHost': 'http://192.168.2.236:3001', 'difyEmail': 'lingzewanchuan@lzwcai.com', 'difyName': '中科天目', 'difyPassword': 'Lzwc@2025.'}, 'postVOList': [], 'serverConfigToAI': {'id': '1932057383785390081', 'name': '4dc437bf3d2e', 'ipAddr': '192.168.2.236', 'isMajor': None}, 'deviceBindingList': []}}
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:99] - 成功获取企业ID: 1952978233106669569
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:102] - 第二步：检查向量库状态...
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:435] - 检查向量库状态，keyId: 1952978233106669569
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:447] - 向量库状态检查完成，keyId: 1952978233106669569, exists: True
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:104] - 向量库状态检查完成，存在状态: True
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:137] - 向量库已存在，无需创建
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:366] - MCP服务器初始化结果: {'code': 200, 'msg': 'MCP服务器初始化成功，向量库已存在', 'data': {'enterprise_id': '1952978233106669569', 'vector_store_created': False, 'vector_store_existed': True}}
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:371] - MCP服务器初始化成功
2025-11-07 18:18:45 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:61] - 企业ID已更新: 1952978233106669569
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:376] - 企业ID已保存到环境变量: 1952978233106669569
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:384] - 已注册的MCP工具:
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:385] - 1. iot_get_devices_by_location - 根据位置获取设备列表
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:386] - 2. iot_get_all_spaces_and_devices - 获取所有空间位置信息
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:387] - 3. iot_device_precise_controller - IoT设备精确控制
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:388] - 4. smart_space_device_locator_matcher - 智能空间设备定位
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:390] - ================================================================================
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:391] - MCP服务器即将启动，等待客户端连接...
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:392] - 传输方式: stdio (标准输入输出)
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:393] - 注意: 控制台日志已禁用，所有日志将写入文件
2025-11-07 18:18:45 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:394] - ================================================================================
2025-11-07 18:18:53 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:119] - 开始处理获取所有空间位置信息请求
2025-11-07 18:18:53 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:130] - 获取到企业ID: 1952978233106669569
2025-11-07 18:18:53 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:499] - 查询设备列表，keyId: 1952978233106669569, location: 
2025-11-07 18:18:53 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:516] - 设备列表查询成功，返回设备数量: 27
2025-11-07 18:18:53 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:137] - 查询所有设备结果: {'devices': [{'location_key': '32', 'location_desc': '研发办公区;研发部', 'entityId': 'climate.qjiang_cn_741479129_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '32', 'location_desc': '研发办公区;研发部', 'entityId': 'switch.zimi_cn_1144259387_dhkg01_on_p_2_1', 'device_desc': '灵泽办公区左吊灯  开关 按键', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '33', 'location_desc': '研发办公区走廊过道；研发办公区走廊；研发办公区过道；研发部走廊', 'entityId': 'switch.zimi_cn_1144138206_dhkg01_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'climate.qjiang_cn_741478765_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'switch.zimi_cn_1119705212_dhkg05_on_p_3_1', 'device_desc': '办公桌灯；主位灯；吊灯；灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'switch.zimi_cn_1119705212_dhkg05_on_p_4_1', 'device_desc': '入口灯;吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'cover.lumi_cn_1132313226_hmcn02_s_2_2', 'device_desc': '左窗帘；窗帘；帘', 'operations': [{'command': 'open_cover', 'operation_desc': '打开;开;展开;开放', 'operation_params': []}, {'command': 'close_cover', 'operation_desc': '关闭;关;合并;合起来;合', 'operation_params': []}, {'command': 'toggle', 'operation_desc': '切换;一键开关', 'operation_params': []}, {'command': 'stop_cover', 'operation_desc': '停止;停;停一下；', 'operation_params': []}]}, {'location_key': '35', 'location_desc': '灵泽展厅；灵泽展区', 'entityId': 'climate.qjiang_cn_741362991_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '35', 'location_desc': '灵泽展厅；灵泽展区', 'entityId': 'switch.zimi_cn_1121232402_dhkg05_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '36', 'location_desc': '大会议室；大会议区', 'entityId': 'climate.qjiang_cn_741470846_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '36', 'location_desc': '大会议室；大会议区', 'entityId': 'switch.huca_cn_1134958712_lh4_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '37', 'location_desc': '李总办公室；董事长；李总房间；董事长办公室', 'entityId': 'climate.qjiang_cn_741478700_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '38', 'location_desc': '公司前台；前台；前台大门；门口', 'entityId': 'climate.qjiang_cn_741479337_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '40', 'location_desc': '健身房；运动区；健身室；健', 'entityId': 'climate.qjiang_cn_741352250_wb20', 'device_desc': '空调', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '40', 'location_desc': '健身房；运动区；健身室；健', 'entityId': 'switch.zimi_cn_1144125565_dhkg01_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '41', 'location_desc': '小会议室；小会议区', 'entityId': 'switch.huca_cn_1134958712_lh4_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '42', 'location_desc': '电梯走廊；前台门口；公司门口；公司大门口；大门', 'entityId': 'button.zimi_cn_1119697824_dhkg05_toggle_a_4_1', 'device_desc': '吊灯；电梯灯；灯；照明灯', 'operations': [{'command': 'press', 'operation_desc': '按下;按;开关；打开或者关闭；', 'operation_params': []}]}, {'location_key': '43', 'location_desc': '公司大门；大门口；前台；公司前台；大门', 'entityId': 'switch.giot_cn_1110921716_v51ksm_on_p_2_1', 'device_desc': '大门开关', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '44', 'location_desc': '董事长办公室门口走廊；董事长门口走廊；董事长门口走廊过道', 'entityId': 'switch.huca_cn_1134957033_lh4_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '44', 'location_desc': '董事长办公室门口走廊；董事长门口走廊；董事长门口走廊过道', 'entityId': 'switch.huca_cn_1134957033_lh4_on_p_3_1', 'device_desc': '射灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '45', 'location_desc': '会议室过道；会议室走廊；会议区过道', 'entityId': 'switch.huca_cn_1134958712_lh4_on_p_5_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '46', 'location_desc': '爱易拍展厅；爱一拍展厅；爱一拍展区；爱一排展区', 'entityId': 'switch.zimi_cn_1144256905_dhkg02_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '47', 'location_desc': '灵泽展厅过道；灵泽展厅走廊', 'entityId': 'switch.zimi_cn_1121232402_dhkg05_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '48', 'location_desc': '休息室一楼；休息室一层', 'entityId': 'climate.qjiang_cn_741348975_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '48', 'location_desc': '休息室一楼；休息室一层', 'entityId': 'switch.huca_cn_1134958682_lh4_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '49', 'location_desc': '休息室二楼；休息室二层', 'entityId': 'switch.huca_cn_1134958682_lh4_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '50', 'location_desc': '前台休息区', 'entityId': 'switch.zimi_cn_1119697824_dhkg05_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}], 'count': 27, 'location_filter': None}
2025-11-07 18:19:09 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:57] - 开始处理IoT设备查询请求 - 位置: 研发
2025-11-07 18:19:09 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:70] - 获取到企业ID: 1952978233106669569
2025-11-07 18:19:09 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:499] - 查询设备列表，keyId: 1952978233106669569, location: 研发
2025-11-07 18:19:09 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:516] - 设备列表查询成功，返回设备数量: 3
2025-11-07 18:19:09 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:77] - 查询设备列表结果: {'devices': [{'location_key': '32', 'location_desc': '研发办公区;研发部', 'entityId': 'climate.qjiang_cn_741479129_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '32', 'location_desc': '研发办公区;研发部', 'entityId': 'switch.zimi_cn_1144259387_dhkg01_on_p_2_1', 'device_desc': '灵泽办公区左吊灯  开关 按键', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '33', 'location_desc': '研发办公区走廊过道；研发办公区走廊；研发办公区过道；研发部走廊', 'entityId': 'switch.zimi_cn_1144138206_dhkg01_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}], 'count': 3, 'location_filter': '研发'}
2025-11-07 18:19:09 - lzwcai_mcp_iot.src.device_results_pretreatment - INFO - [device_results_pretreatment.py:458] - 设备列表格式化完成，设备数量: 3
2025-11-07 18:19:09 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:92] - 设备列表已格式化，设备数量: 3
2025-11-07 18:21:20 - lzwcai_mcp_iot - INFO - [logger_config.py:215] - ================================================================================
2025-11-07 18:21:20 - lzwcai_mcp_iot - INFO - [logger_config.py:216] - 日志系统初始化完成 - 2025-11-07 18:21:20
2025-11-07 18:21:20 - lzwcai_mcp_iot - INFO - [logger_config.py:217] - 日志级别: INFO
2025-11-07 18:21:20 - lzwcai_mcp_iot - INFO - [logger_config.py:218] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai-mcp-server-package\lzwcai_mcp_iot\lzwcai_mcp_iot.log
2025-11-07 18:21:20 - lzwcai_mcp_iot - INFO - [logger_config.py:219] - 控制台输出: False
2025-11-07 18:21:20 - lzwcai_mcp_iot - INFO - [logger_config.py:220] - 文件输出: True
2025-11-07 18:21:20 - lzwcai_mcp_iot - INFO - [logger_config.py:221] - 文件轮转: 最大10MB, 保留5个备份
2025-11-07 18:21:20 - lzwcai_mcp_iot - INFO - [logger_config.py:222] - ================================================================================
2025-11-07 18:21:20 - lzwcai_mcp_iot.config - INFO - [config.py:89] - 配置加载完成
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:44] - DeviceOperator初始化完成，API基础URL: http://192.168.2.236:8088
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:39] - VectorService初始化完成，API基础URL: http://192.168.2.236:5002
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:353] - ================================================================================
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:354] - IoT设备MCP服务器启动流程开始
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:355] - 配置信息: {'device_api_base_url': 'http://192.168.2.236:8088', 'vector_api_base_url': 'http://192.168.2.236:5002', 'enterprise_id': '1952978233106669569', 'employeeId': '1986712221817815042', 'request_timeout': 30, 'max_retries': 3, 'vector_store_name': '设备库', 'vector_store_description': '向量库', 'encoder_type': 'word2vec', 'default_top_k': 1, 'default_auto_create': True, 'log_level': 'INFO', 'log_format': '%(asctime)s - %(name)s - %(levelname)s - %(message)s'}
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:356] - ================================================================================
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:359] - 正在初始化核心组件...
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:360] - 设备操作器API地址: http://192.168.2.236:8088
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:361] - 向量服务API地址: http://192.168.2.236:5002
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:362] - 核心组件初始化完成
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:367] - 检测到员工ID配置: 1986712221817815042
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:368] - 开始初始化MCP服务器...
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:75] - 开始初始化MCP服务器，员工ID: 1986712221817815042
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:78] - 第一步：获取企业ID...
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:410] - 正在获取员工ID为 1986712221817815042 的数字员工信息...
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:418] - 成功获取数字员工信息: {'msg': '操作成功', 'code': 200, 'data': {'userInfo': {'createBy': '', 'createTime': '2025-11-07 16:27:59', 'updateBy': None, 'updateTime': None, 'remark': None, 'userId': '1909', 'enterpriseId': '1952978233106669569', 'deptId': None, 'userName': '物联网设备管家4628', 'nickName': '物联网设备管家4628', 'userType': '03', 'email': '', 'phonenumber': '', 'sex': '2', 'avatar': '', 'password': '123456', 'status': '0', 'delFlag': '0', 'loginIp': '', 'loginDate': None, 'createSubject': False, 'createSpeakSubject': False, 'bizSysId': None, 'dept': None, 'roles': [], 'roleIds': None, 'postIds': None, 'roleId': None, 'enterprise': {'id': None, 'createBy': '', 'createTime': '2025-11-07 16:27:59', 'updateBy': None, 'updateTime': None, 'enterpriseName': None, 'enterpriseCode': None, 'description': None, 'type': None, 'businessLicense': None, 'licenseFileId': None, 'legalPerson': None, 'industryInvolved': None, 'datasetId': None, 'datasetName': None, 'datasetDescribe': None, 'oaType': None, 'oaMap': None, 'status': False}, 'bindOA': False, 'oaMap': None, 'spaceName': None, 'admin': False}, 'employeeInfo': {'id': '1986712221817815042', 'enterpriseId': '1952978233106669569', 'name': '物联网设备管家', 'type': 'assistant', 'imageInfo': None, 'personality': None, 'prompt': '管理设备', 'modelConfig': None, 'promptConfig': None, 'datasetId': '166a9087-830c-443f-81f9-924f8b089530', 'datasetApiKey': 'dataset-nNE2K1KSeagOQnCJjLQzXbpH', 'zhipuApiKey': '12334444', 'enableLongTermMemory': False}, 'enterpriseVO': {'enterpriseId': '1952978233106669569', 'enterpriseName': '中科天目', 'enterpriseCode': '002233', 'type': '人工智能', 'description': None, 'businessLicense': None, 'licenseFileId': None, 'legalPerson': None, 'industryInvolved': None, 'datasetId': 'ec8b1391-d093-4b3c-a675-5c88455f094c', 'datasetName': '中科天目', 'datasetDescribe': '系统默认创建', 'difyHost': 'http://192.168.2.236:3001', 'difyEmail': 'lingzewanchuan@lzwcai.com', 'difyName': '中科天目', 'difyPassword': 'Lzwc@2025.'}, 'postVOList': [], 'serverConfigToAI': {'id': '1932057383785390081', 'name': '4dc437bf3d2e', 'ipAddr': '192.168.2.236', 'isMajor': None}, 'deviceBindingList': []}}
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:99] - 成功获取企业ID: 1952978233106669569
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:102] - 第二步：检查向量库状态...
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:435] - 检查向量库状态，keyId: 1952978233106669569
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:447] - 向量库状态检查完成，keyId: 1952978233106669569, exists: True
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:104] - 向量库状态检查完成，存在状态: True
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:137] - 向量库已存在，无需创建
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:371] - MCP服务器初始化结果: {'code': 200, 'msg': 'MCP服务器初始化成功，向量库已存在', 'data': {'enterprise_id': '1952978233106669569', 'vector_store_created': False, 'vector_store_existed': True}}
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:376] - MCP服务器初始化成功
2025-11-07 18:21:20 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:61] - 企业ID已更新: 1952978233106669569
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:381] - 企业ID已保存到环境变量: 1952978233106669569
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:389] - 已注册的MCP工具:
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:390] - 1. iot_get_devices_by_location - 根据位置获取设备列表
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:391] - 2. iot_get_all_spaces_and_devices - 获取所有空间位置信息
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:392] - 3. iot_device_precise_controller - IoT设备精确控制
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:393] - 4. smart_space_device_locator_matcher - 智能空间设备定位
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:395] - ================================================================================
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:396] - MCP服务器即将启动，等待客户端连接...
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:397] - 传输方式: stdio (标准输入输出)
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:398] - 注意: 控制台日志已禁用，所有日志将写入文件
2025-11-07 18:21:20 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:399] - ================================================================================
2025-11-07 18:21:26 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:120] - 开始处理获取所有空间位置信息请求
2025-11-07 18:21:26 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:131] - 获取到企业ID: 1952978233106669569
2025-11-07 18:21:26 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:499] - 查询设备列表，keyId: 1952978233106669569, location: 
2025-11-07 18:21:26 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:516] - 设备列表查询成功，返回设备数量: 27
2025-11-07 18:21:26 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:138] - 查询所有设备结果: {'devices': [{'location_key': '32', 'location_desc': '研发办公区;研发部', 'entityId': 'climate.qjiang_cn_741479129_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '32', 'location_desc': '研发办公区;研发部', 'entityId': 'switch.zimi_cn_1144259387_dhkg01_on_p_2_1', 'device_desc': '灵泽办公区左吊灯  开关 按键', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '33', 'location_desc': '研发办公区走廊过道；研发办公区走廊；研发办公区过道；研发部走廊', 'entityId': 'switch.zimi_cn_1144138206_dhkg01_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'climate.qjiang_cn_741478765_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'switch.zimi_cn_1119705212_dhkg05_on_p_3_1', 'device_desc': '办公桌灯；主位灯；吊灯；灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'switch.zimi_cn_1119705212_dhkg05_on_p_4_1', 'device_desc': '入口灯;吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'cover.lumi_cn_1132313226_hmcn02_s_2_2', 'device_desc': '左窗帘；窗帘；帘', 'operations': [{'command': 'open_cover', 'operation_desc': '打开;开;展开;开放', 'operation_params': []}, {'command': 'close_cover', 'operation_desc': '关闭;关;合并;合起来;合', 'operation_params': []}, {'command': 'toggle', 'operation_desc': '切换;一键开关', 'operation_params': []}, {'command': 'stop_cover', 'operation_desc': '停止;停;停一下；', 'operation_params': []}]}, {'location_key': '35', 'location_desc': '灵泽展厅；灵泽展区', 'entityId': 'climate.qjiang_cn_741362991_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '35', 'location_desc': '灵泽展厅；灵泽展区', 'entityId': 'switch.zimi_cn_1121232402_dhkg05_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '36', 'location_desc': '大会议室；大会议区', 'entityId': 'climate.qjiang_cn_741470846_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '36', 'location_desc': '大会议室；大会议区', 'entityId': 'switch.huca_cn_1134958712_lh4_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '37', 'location_desc': '李总办公室；董事长；李总房间；董事长办公室', 'entityId': 'climate.qjiang_cn_741478700_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '38', 'location_desc': '公司前台；前台；前台大门；门口', 'entityId': 'climate.qjiang_cn_741479337_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '40', 'location_desc': '健身房；运动区；健身室；健', 'entityId': 'climate.qjiang_cn_741352250_wb20', 'device_desc': '空调', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '40', 'location_desc': '健身房；运动区；健身室；健', 'entityId': 'switch.zimi_cn_1144125565_dhkg01_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '41', 'location_desc': '小会议室；小会议区', 'entityId': 'switch.huca_cn_1134958712_lh4_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '42', 'location_desc': '电梯走廊；前台门口；公司门口；公司大门口；大门', 'entityId': 'button.zimi_cn_1119697824_dhkg05_toggle_a_4_1', 'device_desc': '吊灯；电梯灯；灯；照明灯', 'operations': [{'command': 'press', 'operation_desc': '按下;按;开关；打开或者关闭；', 'operation_params': []}]}, {'location_key': '43', 'location_desc': '公司大门；大门口；前台；公司前台；大门', 'entityId': 'switch.giot_cn_1110921716_v51ksm_on_p_2_1', 'device_desc': '大门开关', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '44', 'location_desc': '董事长办公室门口走廊；董事长门口走廊；董事长门口走廊过道', 'entityId': 'switch.huca_cn_1134957033_lh4_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '44', 'location_desc': '董事长办公室门口走廊；董事长门口走廊；董事长门口走廊过道', 'entityId': 'switch.huca_cn_1134957033_lh4_on_p_3_1', 'device_desc': '射灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '45', 'location_desc': '会议室过道；会议室走廊；会议区过道', 'entityId': 'switch.huca_cn_1134958712_lh4_on_p_5_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '46', 'location_desc': '爱易拍展厅；爱一拍展厅；爱一拍展区；爱一排展区', 'entityId': 'switch.zimi_cn_1144256905_dhkg02_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '47', 'location_desc': '灵泽展厅过道；灵泽展厅走廊', 'entityId': 'switch.zimi_cn_1121232402_dhkg05_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '48', 'location_desc': '休息室一楼；休息室一层', 'entityId': 'climate.qjiang_cn_741348975_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '48', 'location_desc': '休息室一楼；休息室一层', 'entityId': 'switch.huca_cn_1134958682_lh4_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '49', 'location_desc': '休息室二楼；休息室二层', 'entityId': 'switch.huca_cn_1134958682_lh4_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '50', 'location_desc': '前台休息区', 'entityId': 'switch.zimi_cn_1119697824_dhkg05_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}], 'count': 27, 'location_filter': None}
2025-11-07 18:21:26 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:189] - 已获取所有空间位置信息，空间数: 51
2025-11-07 18:22:56 - lzwcai_mcp_iot - INFO - [logger_config.py:215] - ================================================================================
2025-11-07 18:22:56 - lzwcai_mcp_iot - INFO - [logger_config.py:216] - 日志系统初始化完成 - 2025-11-07 18:22:56
2025-11-07 18:22:56 - lzwcai_mcp_iot - INFO - [logger_config.py:217] - 日志级别: INFO
2025-11-07 18:22:56 - lzwcai_mcp_iot - INFO - [logger_config.py:218] - 日志文件: E:\yh-ai\project\lzwcai-szyg\lzwcai-mcp-server-package\lzwcai-mcp-server-package\lzwcai_mcp_iot\lzwcai_mcp_iot.log
2025-11-07 18:22:56 - lzwcai_mcp_iot - INFO - [logger_config.py:219] - 控制台输出: False
2025-11-07 18:22:56 - lzwcai_mcp_iot - INFO - [logger_config.py:220] - 文件输出: True
2025-11-07 18:22:56 - lzwcai_mcp_iot - INFO - [logger_config.py:221] - 文件轮转: 最大10MB, 保留5个备份
2025-11-07 18:22:56 - lzwcai_mcp_iot - INFO - [logger_config.py:222] - ================================================================================
2025-11-07 18:22:56 - lzwcai_mcp_iot.config - INFO - [config.py:89] - 配置加载完成
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:44] - DeviceOperator初始化完成，API基础URL: http://192.168.2.236:8088
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:39] - VectorService初始化完成，API基础URL: http://192.168.2.236:5002
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:348] - ================================================================================
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:349] - IoT设备MCP服务器启动流程开始
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:350] - 配置信息: {'device_api_base_url': 'http://192.168.2.236:8088', 'vector_api_base_url': 'http://192.168.2.236:5002', 'enterprise_id': '1952978233106669569', 'employeeId': '1986712221817815042', 'request_timeout': 30, 'max_retries': 3, 'vector_store_name': '设备库', 'vector_store_description': '向量库', 'encoder_type': 'word2vec', 'default_top_k': 1, 'default_auto_create': True, 'log_level': 'INFO', 'log_format': '%(asctime)s - %(name)s - %(levelname)s - %(message)s'}
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:351] - ================================================================================
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:354] - 正在初始化核心组件...
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:355] - 设备操作器API地址: http://192.168.2.236:8088
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:356] - 向量服务API地址: http://192.168.2.236:5002
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:357] - 核心组件初始化完成
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:362] - 检测到员工ID配置: 1986712221817815042
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:363] - 开始初始化MCP服务器...
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:75] - 开始初始化MCP服务器，员工ID: 1986712221817815042
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:78] - 第一步：获取企业ID...
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:410] - 正在获取员工ID为 1986712221817815042 的数字员工信息...
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:418] - 成功获取数字员工信息: {'msg': '操作成功', 'code': 200, 'data': {'userInfo': {'createBy': '', 'createTime': '2025-11-07 16:27:59', 'updateBy': None, 'updateTime': None, 'remark': None, 'userId': '1909', 'enterpriseId': '1952978233106669569', 'deptId': None, 'userName': '物联网设备管家4628', 'nickName': '物联网设备管家4628', 'userType': '03', 'email': '', 'phonenumber': '', 'sex': '2', 'avatar': '', 'password': '123456', 'status': '0', 'delFlag': '0', 'loginIp': '', 'loginDate': None, 'createSubject': False, 'createSpeakSubject': False, 'bizSysId': None, 'dept': None, 'roles': [], 'roleIds': None, 'postIds': None, 'roleId': None, 'enterprise': {'id': None, 'createBy': '', 'createTime': '2025-11-07 16:27:59', 'updateBy': None, 'updateTime': None, 'enterpriseName': None, 'enterpriseCode': None, 'description': None, 'type': None, 'businessLicense': None, 'licenseFileId': None, 'legalPerson': None, 'industryInvolved': None, 'datasetId': None, 'datasetName': None, 'datasetDescribe': None, 'oaType': None, 'oaMap': None, 'status': False}, 'bindOA': False, 'oaMap': None, 'spaceName': None, 'admin': False}, 'employeeInfo': {'id': '1986712221817815042', 'enterpriseId': '1952978233106669569', 'name': '物联网设备管家', 'type': 'assistant', 'imageInfo': None, 'personality': None, 'prompt': '管理设备', 'modelConfig': None, 'promptConfig': None, 'datasetId': '166a9087-830c-443f-81f9-924f8b089530', 'datasetApiKey': 'dataset-nNE2K1KSeagOQnCJjLQzXbpH', 'zhipuApiKey': '12334444', 'enableLongTermMemory': False}, 'enterpriseVO': {'enterpriseId': '1952978233106669569', 'enterpriseName': '中科天目', 'enterpriseCode': '002233', 'type': '人工智能', 'description': None, 'businessLicense': None, 'licenseFileId': None, 'legalPerson': None, 'industryInvolved': None, 'datasetId': 'ec8b1391-d093-4b3c-a675-5c88455f094c', 'datasetName': '中科天目', 'datasetDescribe': '系统默认创建', 'difyHost': 'http://192.168.2.236:3001', 'difyEmail': 'lingzewanchuan@lzwcai.com', 'difyName': '中科天目', 'difyPassword': 'Lzwc@2025.'}, 'postVOList': [], 'serverConfigToAI': {'id': '1932057383785390081', 'name': '4dc437bf3d2e', 'ipAddr': '192.168.2.236', 'isMajor': None}, 'deviceBindingList': []}}
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:99] - 成功获取企业ID: 1952978233106669569
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:102] - 第二步：检查向量库状态...
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:435] - 检查向量库状态，keyId: 1952978233106669569
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:447] - 向量库状态检查完成，keyId: 1952978233106669569, exists: True
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:104] - 向量库状态检查完成，存在状态: True
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.init_mcp - INFO - [init_mcp.py:137] - 向量库已存在，无需创建
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:366] - MCP服务器初始化结果: {'code': 200, 'msg': 'MCP服务器初始化成功，向量库已存在', 'data': {'enterprise_id': '1952978233106669569', 'vector_store_created': False, 'vector_store_existed': True}}
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:371] - MCP服务器初始化成功
2025-11-07 18:22:56 - lzwcai_mcp_iot.src.device_operations - INFO - [device_operations.py:61] - 企业ID已更新: 1952978233106669569
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:376] - 企业ID已保存到环境变量: 1952978233106669569
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:384] - 已注册的MCP工具:
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:385] - 1. iot_get_devices_by_location - 根据位置获取设备列表
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:386] - 2. iot_get_all_spaces_and_devices - 获取所有空间位置信息
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:387] - 3. iot_device_precise_controller - IoT设备精确控制
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:388] - 4. smart_space_device_locator_matcher - 智能空间设备定位
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:390] - ================================================================================
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:391] - MCP服务器即将启动，等待客户端连接...
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:392] - 传输方式: stdio (标准输入输出)
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:393] - 注意: 控制台日志已禁用，所有日志将写入文件
2025-11-07 18:22:56 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:394] - ================================================================================
2025-11-07 18:23:00 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:119] - 开始处理获取所有空间位置信息请求
2025-11-07 18:23:00 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:130] - 获取到企业ID: 1952978233106669569
2025-11-07 18:23:00 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:499] - 查询设备列表，keyId: 1952978233106669569, location: 
2025-11-07 18:23:00 - lzwcai_mcp_iot.src.vector_service - INFO - [vector_service.py:516] - 设备列表查询成功，返回设备数量: 27
2025-11-07 18:23:00 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:137] - 查询所有设备结果: {'devices': [{'location_key': '32', 'location_desc': '研发办公区;研发部', 'entityId': 'climate.qjiang_cn_741479129_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '32', 'location_desc': '研发办公区;研发部', 'entityId': 'switch.zimi_cn_1144259387_dhkg01_on_p_2_1', 'device_desc': '灵泽办公区左吊灯  开关 按键', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '33', 'location_desc': '研发办公区走廊过道；研发办公区走廊；研发办公区过道；研发部走廊', 'entityId': 'switch.zimi_cn_1144138206_dhkg01_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'climate.qjiang_cn_741478765_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'switch.zimi_cn_1119705212_dhkg05_on_p_3_1', 'device_desc': '办公桌灯；主位灯；吊灯；灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'switch.zimi_cn_1119705212_dhkg05_on_p_4_1', 'device_desc': '入口灯;吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '34', 'location_desc': '何总办公室；总经办；总经房间', 'entityId': 'cover.lumi_cn_1132313226_hmcn02_s_2_2', 'device_desc': '左窗帘；窗帘；帘', 'operations': [{'command': 'open_cover', 'operation_desc': '打开;开;展开;开放', 'operation_params': []}, {'command': 'close_cover', 'operation_desc': '关闭;关;合并;合起来;合', 'operation_params': []}, {'command': 'toggle', 'operation_desc': '切换;一键开关', 'operation_params': []}, {'command': 'stop_cover', 'operation_desc': '停止;停;停一下；', 'operation_params': []}]}, {'location_key': '35', 'location_desc': '灵泽展厅；灵泽展区', 'entityId': 'climate.qjiang_cn_741362991_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '35', 'location_desc': '灵泽展厅；灵泽展区', 'entityId': 'switch.zimi_cn_1121232402_dhkg05_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '36', 'location_desc': '大会议室；大会议区', 'entityId': 'climate.qjiang_cn_741470846_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '36', 'location_desc': '大会议室；大会议区', 'entityId': 'switch.huca_cn_1134958712_lh4_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '37', 'location_desc': '李总办公室；董事长；李总房间；董事长办公室', 'entityId': 'climate.qjiang_cn_741478700_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '38', 'location_desc': '公司前台；前台；前台大门；门口', 'entityId': 'climate.qjiang_cn_741479337_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '40', 'location_desc': '健身房；运动区；健身室；健', 'entityId': 'climate.qjiang_cn_741352250_wb20', 'device_desc': '空调', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '40', 'location_desc': '健身房；运动区；健身室；健', 'entityId': 'switch.zimi_cn_1144125565_dhkg01_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '41', 'location_desc': '小会议室；小会议区', 'entityId': 'switch.huca_cn_1134958712_lh4_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '42', 'location_desc': '电梯走廊；前台门口；公司门口；公司大门口；大门', 'entityId': 'button.zimi_cn_1119697824_dhkg05_toggle_a_4_1', 'device_desc': '吊灯；电梯灯；灯；照明灯', 'operations': [{'command': 'press', 'operation_desc': '按下;按;开关；打开或者关闭；', 'operation_params': []}]}, {'location_key': '43', 'location_desc': '公司大门；大门口；前台；公司前台；大门', 'entityId': 'switch.giot_cn_1110921716_v51ksm_on_p_2_1', 'device_desc': '大门开关', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '44', 'location_desc': '董事长办公室门口走廊；董事长门口走廊；董事长门口走廊过道', 'entityId': 'switch.huca_cn_1134957033_lh4_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '44', 'location_desc': '董事长办公室门口走廊；董事长门口走廊；董事长门口走廊过道', 'entityId': 'switch.huca_cn_1134957033_lh4_on_p_3_1', 'device_desc': '射灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '45', 'location_desc': '会议室过道；会议室走廊；会议区过道', 'entityId': 'switch.huca_cn_1134958712_lh4_on_p_5_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '46', 'location_desc': '爱易拍展厅；爱一拍展厅；爱一拍展区；爱一排展区', 'entityId': 'switch.zimi_cn_1144256905_dhkg02_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '47', 'location_desc': '灵泽展厅过道；灵泽展厅走廊', 'entityId': 'switch.zimi_cn_1121232402_dhkg05_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '48', 'location_desc': '休息室一楼；休息室一层', 'entityId': 'climate.qjiang_cn_741348975_wb20', 'device_desc': '空调；制冷设备', 'operations': [{'command': 'turn_on', 'operation_desc': '打开空调;开空调;打开；开', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关空调;关闭空调;关闭；关；闭空调；空调', 'operation_params': []}, {'command': 'set_temperature', 'operation_desc': '设置温度;调节温度；', 'operation_params': [{'description': '温度', 'key': 'temperature', 'value': '7-35°C'}, {'description': '运行模式', 'key': 'hvac_mode', 'value': 'heat/cool/auto/dry/fan_only/off'}]}]}, {'location_key': '48', 'location_desc': '休息室一楼；休息室一层', 'entityId': 'switch.huca_cn_1134958682_lh4_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '49', 'location_desc': '休息室二楼；休息室二层', 'entityId': 'switch.huca_cn_1134958682_lh4_on_p_3_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}, {'location_key': '50', 'location_desc': '前台休息区', 'entityId': 'switch.zimi_cn_1119697824_dhkg05_on_p_2_1', 'device_desc': '吊灯；灯；照明灯', 'operations': [{'command': 'turn_on', 'operation_desc': '开启；打开；开；', 'operation_params': []}, {'command': 'turn_off', 'operation_desc': '关闭；关', 'operation_params': []}]}], 'count': 27, 'location_filter': None}
2025-11-07 18:23:00 - lzwcai_mcp_iot.iot_device_tool - INFO - [iot_device_tool.py:184] - 已获取所有空间位置信息，空间数: 18
