feat: 初始化小米 IoT (MIoT) 智能家居 Go 库
- 实现 MIoT 客户端核心功能(MQTT 连接、设备管理、属性读写) - 支持云端 API 调用与局域网设备发现(mDNS) - 集成国际化(i18n)多语言支持 - 添加 MIoT 设备规约解析器(spec_parser) - 包含单元测试与使用示例
This commit is contained in:
@@ -0,0 +1,160 @@
|
||||
{
|
||||
"config": {
|
||||
"other": {
|
||||
"devices": "Devices",
|
||||
"found_central_gateway": ", Found Local Central Hub Gateway",
|
||||
"without_room": "No room assigned",
|
||||
"no_display": "Do not display"
|
||||
},
|
||||
"control_mode": {
|
||||
"auto": "Auto",
|
||||
"cloud": "Cloud"
|
||||
},
|
||||
"statistics_logic": {
|
||||
"or": "OR logic",
|
||||
"and": "AND logic"
|
||||
},
|
||||
"filter_mode": {
|
||||
"exclude": "Exclude",
|
||||
"include": "Include"
|
||||
},
|
||||
"connect_type": {
|
||||
"0": "WiFi",
|
||||
"1": "yunyi device",
|
||||
"2": "Cloud device",
|
||||
"3": "ZigBee",
|
||||
"4": "webSocket",
|
||||
"5": "Virtual device",
|
||||
"6": "BLE",
|
||||
"7": "Local AP",
|
||||
"8": "WiFi+BLE",
|
||||
"9": "Other",
|
||||
"10": "Function plug-in",
|
||||
"11": "Cellular network",
|
||||
"12": "Cable",
|
||||
"13": "NB-IoT",
|
||||
"14": "Third-party cloud access",
|
||||
"15": "Infrared remote control device",
|
||||
"16": "BLE-Mesh",
|
||||
"17": "Virtual device group",
|
||||
"18": "Gateway sub-device",
|
||||
"19": "Security level gateway sub-device",
|
||||
"22": "PLC",
|
||||
"23": "Cable only",
|
||||
"24": "Matter",
|
||||
"25": "WiFi+Cellular network"
|
||||
},
|
||||
"room_name_rule": {
|
||||
"none": "Do not synchronize",
|
||||
"home_room": "Home Name and Room Name (Xiaomi Home Bedroom)",
|
||||
"room": "Room Name (Bedroom)",
|
||||
"home": "Home Name (Xiaomi Home)"
|
||||
},
|
||||
"option_status": {
|
||||
"enable": "Enable",
|
||||
"disable": "Disable"
|
||||
},
|
||||
"binary_mode": {
|
||||
"text": "Text Sensor Entity",
|
||||
"bool": "Binary Sensor Entity"
|
||||
},
|
||||
"device_state": {
|
||||
"add": "Add",
|
||||
"del": "Unavailable",
|
||||
"offline": "Offline"
|
||||
},
|
||||
"lan_ctrl_config": {
|
||||
"notice_net_dup": "\r\n**[Notice]** Multiple network cards detected that may be connected to the same network. Please pay attention to the selection.",
|
||||
"net_unavailable": "Interface unavailable"
|
||||
}
|
||||
},
|
||||
"oauth2": {
|
||||
"success": {
|
||||
"title": "Authentication Successful",
|
||||
"content": "Please close this page and return to the account authentication page to click 'Next'.",
|
||||
"button": "Close"
|
||||
},
|
||||
"fail": {
|
||||
"title": "Authentication Failed",
|
||||
"content": "{error_msg}, please close this page and return to the account authentication page to click the authentication link again.",
|
||||
"button": "Close"
|
||||
},
|
||||
"error_msg": {
|
||||
"-10100": "Invalid response parameters ('code' or 'state' field is empty)",
|
||||
"-10101": "Passed-in 'state' field mismatch"
|
||||
}
|
||||
},
|
||||
"miot": {
|
||||
"client": {
|
||||
"invalid_oauth_info": "Authentication information is invalid, cloud link will be unavailable, please enter the Xiaomi Home integration page, click 'Options' to re-authenticate",
|
||||
"invalid_device_cache": "Cache device information is abnormal, please enter the Xiaomi Home integration page, click 'Options->Update device list', update the local cache",
|
||||
"invalid_cert_info": "Invalid user certificate, local central link will be unavailable, please enter the Xiaomi Home integration page, click 'Options' to re-authenticate",
|
||||
"device_cloud_error": "An exception occurred when obtaining device information from the cloud, please check the local network connection",
|
||||
"xiaomi_home_error_title": "Xiaomi Home Integration Error",
|
||||
"xiaomi_home_error": "Detected **{nick_name}({uid}, {cloud_server})** error, please enter the options page to reconfigure.\n\n**Error message**: \n{message}",
|
||||
"device_list_changed_title": "Xiaomi Home device list changes",
|
||||
"device_list_changed": "Detected **{nick_name}({uid}, {cloud_server})** device information has changed, please enter the integration options page, click `Options->Update device list`, update local device information.\n\nCurrent network status: {network_status}\n{message}\n",
|
||||
"device_list_add": "\n**{count} new devices:** \n{message}",
|
||||
"device_list_del": "\n**{count} devices unavailable:** \n{message}",
|
||||
"device_list_offline": "\n**{count} devices offline:** \n{message}",
|
||||
"network_status_online": "Online",
|
||||
"network_status_offline": "Offline",
|
||||
"central_state_changed_title": "Central Hub Gateway Connection Status",
|
||||
"central_state_changed":"**{nick_name}({uid}, {cloud_server})** local connection to Xiaomi central hub gateway: {conn_status}",
|
||||
"central_state_connected": "Connected",
|
||||
"central_state_disconnected": "Disconnected",
|
||||
"device_exec_error": "Execution error"
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"common": {
|
||||
"-10000": "Unknown error",
|
||||
"-10001": "Service unavailable",
|
||||
"-10002": "Invalid parameter",
|
||||
"-10003": "Insufficient resources",
|
||||
"-10004": "Internal error",
|
||||
"-10005": "Insufficient permissions",
|
||||
"-10006": "Execution timeout",
|
||||
"-10007": "Device offline or does not exist",
|
||||
"-10020": "Unauthorized (OAuth2)",
|
||||
"-10030": "Invalid token (HTTP)",
|
||||
"-10040": "Invalid message format",
|
||||
"-10050": "Invalid certificate",
|
||||
"-704000000": "Unknown error",
|
||||
"-704010000": "Unauthorized (device may have been deleted)",
|
||||
"-704014006": "Device description not found",
|
||||
"-704030013": "Property not readable",
|
||||
"-704030023": "Property not writable",
|
||||
"-704030033": "Property not subscribable",
|
||||
"-704040002": "Service does not exist",
|
||||
"-704040003": "Property does not exist",
|
||||
"-704040004": "Event does not exist",
|
||||
"-704040005": "Action does not exist",
|
||||
"-704040999": "Feature not online",
|
||||
"-704042001": "Device does not exist",
|
||||
"-704042011": "Device offline",
|
||||
"-704053036": "Device operation timeout",
|
||||
"-704053100": "Device cannot perform this operation in the current state",
|
||||
"-704083036": "Device operation timeout",
|
||||
"-704090001": "Device does not exist",
|
||||
"-704220008": "Invalid ID",
|
||||
"-704220025": "Action parameter count mismatch",
|
||||
"-704220035": "Action parameter error",
|
||||
"-704220043": "Property value error",
|
||||
"-704222034": "Action return value error",
|
||||
"-705004000": "Unknown error",
|
||||
"-705004501": "Unknown error",
|
||||
"-705201013": "Property not readable",
|
||||
"-705201015": "Action execution error",
|
||||
"-705201023": "Property not writable",
|
||||
"-705201033": "Property not subscribable",
|
||||
"-706012000": "Unknown error",
|
||||
"-706012013": "Property not readable",
|
||||
"-706012015": "Action execution error",
|
||||
"-706012023": "Property not writable",
|
||||
"-706012033": "Property not subscribable",
|
||||
"-706012043": "Property value error",
|
||||
"-706014006": "Device description not found"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user