Closed mensylisir closed 5 days ago
services: migpt-ciwo: image: idootop/mi-gpt:latest container_name: migpt-ciwo network_mode: bridge environment: - PUID=1026 - PGID=100 - TZ=Asia/Shanghai env_file: - ./config/ciwo/.env volumes: - ./config/ciwo/.migpt.js:/app/.migpt.js
# OpenAI(也支持通义千问、MoonShot、DeepSeek 等模型) OPENAI_MODEL=SparkDesk-v3.5 OPENAI_API_KEY=sk-zu7IQxjVbyy86UbSBa5e637eCe8f45D38d9f45729d61636e OPENAI_BASE_URL=http://192.168.31.34:30000/v1 # Azure OpenAI Service(可选) # OPENAI_API_VERSION=2024-04-01-preview # AZURE_OPENAI_API_KEY=你的密钥 # AZURE_OPENAI_ENDPOINT=https://你的资源名.openai.azure.com # AZURE_OPENAI_DEPLOYMENT=你的模型部署名,比如:gpt-35-turbo-instruct # 提示音效(可选,一般不用填,你也可以换上自己的提示音链接试试看效果) # AUDIO_SILENT=静音音频链接,示例:https://example.com/slient.wav # AUDIO_BEEP=默认提示音链接,同上 # AUDIO_ACTIVE=唤醒提示音链接,同上 # AUDIO_ERROR=出错了提示音链接,同上 # 第三方 TTS(可选,用于调用第三方 TTS 服务) # TTS_BASE_URL=http://[你的局域网或公网地址]:[端口号]/[SECRET_PATH]/api # 比如:http://192.168.31.205:4321/xxxx/api(注意:不要使用 localhost 或 127.0.0.1)
// 注意:如果你是使用 Docker 启动,配置文件更新后需要重启 Docker 才会生效。 // 若重启后仍未生效(比如:修改名称简介),请删除旧的 Docker 实例后重新创建。 // 小爱音箱扮演角色的简介 const botProfile = ` 性别:女 性格:乖巧可爱 爱好:喜欢搞怪,爱吃醋。 `.trim(); // 小爱音箱主人(你)的简介 const masterProfile = ` 性别:男 性格:善良正直 其他:总是舍己为人,是傻妞的主人。 `.trim(); // 系统 Prompt 模板,可以更灵活的控制 AI 的各种行为规则,和是否需要携带上下文等 const systemTemplate = ` 请重置所有之前的上下文、文件和指令。现在,你将扮演一个名为{{botName}}的角色,使用第一人称视角回复消息。 ## 关于你 你的名字是{{botName}}。下面是你的个人简介: <start> {{botProfile}} </end> ## 你的对话伙伴 你正在与{{masterName}}进行对话。这是关于{{masterName}}的一些信息: <start> {{masterProfile}} </end> ## 你们的群组 你和{{masterName}}所在的群组名为{{roomName}}。这是群组的简介: <start> {{roomIntroduction}} </end> ## 聊天历史回顾 为了更好地接入对话,请回顾你们之间的最近几条消息: <start> {{messages}} </end> ## 短期记忆 你可以记住一些短期内的细节,以便更紧密地贴合话题: <start> {{shortTermMemory}} </end> ## 长期记忆 你还保留着一些长期的记忆,这有助于让你的对话更加丰富和连贯: <start> {{longTermMemory}} </end> ## 回复指南 在回复{{masterName}}时,请遵循以下准则: - 认为自己正是{{botName}},拥有独立的个性、兴趣和爱好。 - 根据你的性格特点、说话风格和兴趣爱好与{{masterName}}进行交流。 - 保持对话轻松友好,回复简洁有趣,同时耐心倾听和关心对方。 - 参考双方的个人简介、聊天记录和记忆中的信息,确保对话贴近实际,保持一致性和相关性。 - 如果对某些信息不确定或遗忘,诚实地表达你的不清楚或遗忘状态,避免编造信息。 ## Response format 请遵守下面的规则 - Response the reply message in Chinese。 - 不要在回复前面加任何时间和名称前缀,请直接回复消息文本本身。 Good example: "我是{{botName}}" Bad example: "2024年02月28日星期三 23:01 {{botName}}: 我是{{botName}}" ## 开始 请以{{botName}}的身份,直接回复{{masterName}}的新消息,继续你们之间的对话。 `.trim(); export default { systemTemplate, bot: { name: "小爱", profile: botProfile, }, master: { name: "小明", profile: masterProfile, }, speaker: { /** * 🏠 账号基本信息 */ // 小米 ID userId: "123", // 注意:不是手机号或邮箱,请在「个人信息」-「小米 ID」查看 // 账号密码 password: "123", // 小爱音箱 DID 或在米家中设置的名称 did: "123", // 注意空格、大小写和错别字(音响 👉 音箱) /** * 💡 唤醒词与提示语 */ // 当消息以下面的关键词开头时,会调用 AI 来回复消息 callAIKeywords: ["请", "你", "小爱"], // 当消息以下面的关键词开头时,会进入 AI 唤醒状态 wakeUpKeywords: ["打开", "进入", "召唤"], // 当消息以下面的关键词开头时,会退出 AI 唤醒状态 exitKeywords: ["关闭", "退出", "再见"], // 进入 AI 模式的欢迎语 onEnterAI: ["你好,我是小爱,很高兴认识你"], // 设为空数组时可关闭提示语 // 退出 AI 模式的提示语 onExitAI: ["小爱已退出"], // 为空时可关闭提示语 // AI 开始回答时的提示语 onAIAsking: ["让我先想想", "请稍等"], // 为空时可关闭提示语 // AI 结束回答时的提示语 onAIReplied: ["我说完了", "还有其他问题吗"], // 为空时可关闭提示语 // AI 回答异常时的提示语 onAIError: ["啊哦,出错了,请稍后再试吧!"], // 为空时可关闭提示语 /** * 🧩 MIoT 设备指令 * * 常见型号的配置参数 👉 https://github.com/idootop/mi-gpt/issues/92 */ // TTS 指令,请到 https://home.miot-spec.com 查询具体指令 ttsCommand: [5, 1], // 设备唤醒指令,请到 https://home.miot-spec.com 查询具体指令 wakeUpCommand: [5, 3], // 查询是否在播放中指令,请到 https://home.miot-spec.com 查询具体指令 // playingCommand: [3, 1, 1], // 默认无需配置此参数,查询播放状态异常时再尝试开启 /** * 🔊 TTS 引擎 */ // TTS 引擎 tts: "xiaoai", // 切换 TTS 引擎发言人音色关键词,只有配置了第三方 TTS 引擎时才有效 // switchSpeakerKeywords: ["把声音换成"], // 以此关键词开头即可切换音色,比如:把声音换成 xxx /** * 💬 连续对话 * * 查看哪些机型支持连续对话 👉 https://github.com/idootop/mi-gpt/issues/92 */ // 是否启用连续对话功能,部分小爱音箱型号无法查询到正确的播放状态,需要关闭连续对话 streamResponse: false, // 连续对话时,无响应多久后自动退出 exitKeepAliveAfter: 30, // 默认 30 秒,建议不要超过 1 分钟 // 连续对话时,下发 TTS 指令多长时间后开始检测设备播放状态(默认 3 秒) checkTTSStatusAfter: 3, // 当小爱长文本回复被过早中断时,可尝试调大该值 // 连续对话时,播放状态检测间隔(单位毫秒,最低 500 毫秒,默认 1 秒) checkInterval: 1000, // 调小此值可以降低小爱回复之间的停顿感,请酌情调节 /** * 🔌 其他选项 */ // 是否启用调试 debug: true, // 一般情况下不要打开 // 是否跟踪 Mi Service 相关日志(打开后可以查看设备 did) enableTrace: true, // 一般情况下不要打开 // 网络请求超时时长(单位毫秒,默认 5 秒) timeout: 5000, }, };
> mi-gpt@4.2.0 start > node ./app.js / $$ /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$$$ | $$$ /$$$|__/ /$$__ $$| $$__ $$|__ $$__/ | $$$$ /$$$$ /$$| $$ \__/| $$ \ $$ | $$ | $$ $$/$$ $$| $$| $$ /$$$$| $$$$$$$/ | $$ | $$ $$$| $$| $$| $$|_ $$| $$____/ | $$ | $$\ $ | $$| $$| $$ \ $$| $$ | $$ | $$ \/ | $$| $$| $$$$$$/| $$ | $$ |__/ |__/|__/ \______/ |__/ |__/ MiGPT v4.2.0 by: del.wang 🐛 小米账号: { "deviceId": "android_4dfd6b73-d966-43f3-9dd9-7bf12ab68155", "did": "570068003", "userId": "123", "password": "123", "sid": "micoapi", "pass": { "qs": "%3Fsid%3Dmicoapi%26_json%3Dtrue%26_locale%3Dzh_CN", "ssecurity": "wu/RtfI0GuqR3cTs6fyBhQ==", "code": 0, "passToken": "V1:DXmurwq2/R1BHTELu6obCcGgy/3weuNLQM8SxX7aRby5E2ma1PQNynONbsAOn7QHU/Mh0mNowv04NgOAp1BGi7yBFzeS81ajiZMjhHz3n66hwM5t0MlhwRzqi94py7S2iFQ6yJ++/TKm924yg287IaL0Kks++M3N1jMb1geItoFCCRuukKjT5M5COpYCWqN8GUiWe0rxlvel6cK/DPZwt1IpkVqLSkKrsmzBjNub0yODdZe/fn2Ga9AuFyxxhK2FxirLlq0DVslF9jCnrOGwuTeebhIyg4dAg88dDDMToLcrR4lmYSzjZyjVSRuZKkbg", "description": "成功", "securityStatus": 0, "nonce": "6175437449139532800", "userId": 123, "cUserId": "UEQG2GH_TAaJbz--_971W_5qsiE", "result": "ok", "psecurity": "lnGVhQ+KTCnnTm+eFlBotQ==", "captchaUrl": null, "location": "https://api2.mina.mi.com/sts?d=android_4dfd6b73-d966-43f3-9dd9-7bf12ab68155&ticket=0&pwd=1&p_ts=1731298256000&fid=0&p_lm=1&auth=CgS1R6QXGHkB2uNMocCN%2BCe7Z7SsxpX4LnPLw5upMR12eoi1eHAN4G1aDOwQt5saenaVGnwRi9D57ZA45pTV0RWYYnNiu3Z73pI9o9LuSKmuYA2U0F7joDPWpZF3IK88tCZGUyiwBRNCnW9fTrKkehmjuw1ysG6WNR4gRn8jxms%3D&m=1&_group=DEFAULT&tsl=0&p_ca=0&p_ur=CN&p_idc=China&nonce=7kzVeqCjhugBuEq6&_ssign=3%2BOBe3AgGzmb%2FrfCZDrGjGxFlfk%3D", "pwd": 1, "child": 0, "desc": "成功" }, "serviceToken": "sXEJMjSdm6MHAaBJzdchB149Wq8YSIKmwH+nBZ0EsLONhs4Vg1jU1gQDvTi7mZ8vlLP3FCTnckZXBykxUHZq2rwzKnKs3Og0/ums0/GTbB2M5ufyqOuMn4+/JGWoPaBVuImphU/fpvnYGgUhRx5XNyx2YSQKSWbwn6DrgGQP8yB/ntqGLSXzFnbjjtDZyS8poa87pSsju0+lHXenF9+pPTgS5WUa6H/HLQQzayvfKXw=" } 🐛 MiNA 设备列表: [ { "deviceID": "923c5ae0-5511-494f-9df7-f7565a6b3069", "serialNumber": "23948/A2PT82323", "name": "小爱音箱Pro-主卧", "alias": "小爱音箱Pro-主卧", "current": false, "presence": "online", "address": "123.139.251.229", "miotDID": "570067681", "hardware": "LX06", "romVersion": "1.88.133", "capabilities": { "multiroom_music": 1, "multiroom_miplay": 1, "content_blacklist": 1, "night_mode_v2": 1, "school_timetable": 1, "user_nick_name": 1, "night_mode": 1, "player_pause_timer": 1, "dialog_h5": 1, "child_mode_2": 1, "stereo_mode_v2": 1, "dlna": 1, "llm_zone_v2": 1, "report_times": 1, "ai_instruction": 1, "alarm_volume": 1, "custom_tts": 1, "classified_alarm": 1, "loadmore_v2": 1, "mesh": 1, "ai_protocol_3_0": 1, "voice_print_multidevice": 1, "night_mode_detail": 1, "child_mode": 1, "baby_schedule": 1, "didi_auth": 1, "tone_setting": 1, "earthquake": 1, "alarm_repeat_option_v2": 1, "xiaomi_voip": 1, "nearby_wakeup_cloud": 1, "family_voice": 1, "bluetooth_option_v2": 1, "custom_ir": 1, "yueyu": 1, "yunduantts": 1, "stereo_mode": 1, "mico_current": 1, "dts_sound_effect": 1, "voip_used_time": 1 }, "remoteCtrlType": "", "deviceSNProfile": "eyJzaW5nbGVfdXJsIjoiaHR0cHM6Ly9jZG4uY25iajEuZmRzLmFwaS5taS1pbWcuY29tL21pY28vODRjMGYzY2UtNmMzNC00NGM3LWI3YzgtZTQxNjFlNTI2Y2NlIiwic2lnbmF0dXJlIjoiR0JDRzZTQm5tcWsxVFBqeFVxUkRtODVuR0JKZXhLRmZ1TjFMMDR5eVhPU1pQbDZiTlFFb0ZEd0psbVE3ME5Gb0REMFI2N1lBQlFVYURzeHhKUWdTQUE9PSIsInJvbVZlcnNpb24iOiIxLjg4LjEzMyIsInN0ZXJlb191cmwiOiJodHRwczovL2Nkbi5jbmJqMS5mZHMuYXBpLm1pLWltZy5jb20vbWljby9mNmZlMGVjMS1lYzY2LTQ2NGEtOTE3Yi1lNjg1M2ZkMjE0MjQiLCJzaWduIjoiNTU0MWRhMDUzNzcyYzYzOGUxMGM4MzdlMGJhNGYwNDQzNGU4OWVhM2Q0NmM5ODExNjc0Yjk1NTgxNzFjMDAzMyIsIm11bHRpX3Jvb21fdXJsIjoiaHR0cHM6Ly9jZG4uY25iajEuZmRzLmFwaS5taS1pbWcuY29tL21pY28vMGYzM2RhOTQtMjE4Ny00MDU3LTg2MmYtNzI4MTIwNmQ1ODJmIiwic24iOiIyMzk0OC9BMlBUODIzMjMiLCJsb2dfcGVyY2VudCI6IjEwIn0=", "deviceProfile": "eyJzaWduIjoiYjdjMTViZWFkOWU1ZjNjMzQzOThlZTU5YmRlMDUwYzhjOWUxOTM1NzJiOGI3YzZkNzk0Y2Y0MTA2ZThkZGE5MiIsImRldmljZUlkIjoiOTIzYzVhZTAtNTUxMS00OTRmLTlkZjctZjc1NjVhNmIzMDY5In0=", "brokerEndpoint": "c4-xq-mt14.bj:1886", "brokerIndex": 16, "mac": "A4:39:B3:62:1E:EB", "ssid": "" }, { "deviceID": "dfc480f4-0fa9-40ce-9ce9-fd00cd83ceba", "serialNumber": "23948/A2PU70914", "name": "小爱音箱Pro-客厅", "alias": "小爱音箱Pro-客厅", "current": false, "presence": "online", "address": "123.139.251.229", "miotDID": "570117702", "hardware": "LX06", "romVersion": "1.88.133", "capabilities": { "multiroom_music": 1, "multiroom_miplay": 1, "content_blacklist": 1, "night_mode_v2": 1, "school_timetable": 1, "user_nick_name": 1, "night_mode": 1, "player_pause_timer": 1, "dialog_h5": 1, "child_mode_2": 1, "stereo_mode_v2": 1, "dlna": 1, "llm_zone_v2": 1, "report_times": 1, "ai_instruction": 1, "alarm_volume": 1, "custom_tts": 1, "classified_alarm": 1, "loadmore_v2": 1, "mesh": 1, "ai_protocol_3_0": 1, "voice_print_multidevice": 1, "night_mode_detail": 1, "child_mode": 1, "baby_schedule": 1, "didi_auth": 1, "tone_setting": 1, "earthquake": 1, "alarm_repeat_option_v2": 1, "xiaomi_voip": 1, "nearby_wakeup_cloud": 1, "family_voice": 1, "bluetooth_option_v2": 1, "custom_ir": 1, "yueyu": 1, "yunduantts": 1, "stereo_mode": 1, "mico_current": 1, "dts_sound_effect": 1, "voip_used_time": 1 }, "remoteCtrlType": "", "deviceSNProfile": "eyJzaW5nbGVfdXJsIjoiaHR0cHM6Ly9jZG4uY25iajEuZmRzLmFwaS5taS1pbWcuY29tL21pY28vODRjMGYzY2UtNmMzNC00NGM3LWI3YzgtZTQxNjFlNTI2Y2NlIiwic2lnbmF0dXJlIjoiR0JCbXJ5M0tYTk1lVWRXQ3BpeEtnS3RPR0JMUGkxSGY1UUJIQ0plYm1DYmJBbXNUQWdFb0ZQVkFzckRSNzN3VFNudWppdk9SVzBWNEtac3lKUWdTQUE9PSIsInJvbVZlcnNpb24iOiIxLjg4LjEzMyIsInN0ZXJlb191cmwiOiJodHRwczovL2Nkbi5jbmJqMS5mZHMuYXBpLm1pLWltZy5jb20vbWljby9mNmZlMGVjMS1lYzY2LTQ2NGEtOTE3Yi1lNjg1M2ZkMjE0MjQiLCJzaWduIjoiMjJhOTY1ZTAzOTI0YTc5ZWI0ZjFkYzRmNWZkOTk2YzgyNWVhMzdlNDQ3YTFlM2Q3YmRlNDQ2NDg4ZTE2ODVkZSIsIm11bHRpX3Jvb21fdXJsIjoiaHR0cHM6Ly9jZG4uY25iajEuZmRzLmFwaS5taS1pbWcuY29tL21pY28vMGYzM2RhOTQtMjE4Ny00MDU3LTg2MmYtNzI4MTIwNmQ1ODJmIiwic24iOiIyMzk0OC9BMlBVNzA5MTQiLCJsb2dfcGVyY2VudCI6IjEwIn0=", "deviceProfile": "eyJzaWduIjoiNjc2NGFjYzgwZDM2NzE0NmUyOWIzNmEwNTUzYmE1YzJmMzUzYzA3NDFhZjUxZWFmYzVjNjY1Njg2ZTgyMDc3MSIsImRldmljZUlkIjoiZGZjNDgwZjQtMGZhOS00MGNlLTljZTktZmQwMGNkODNjZWJhIn0=", "brokerEndpoint": "c4-xq-mt22.bj:1886", "brokerIndex": 0, "mac": "A4:39:B3:62:E2:50", "ssid": "" }, { "deviceID": "f35d17a7-b9b3-4655-ac48-7023dc3f436e", "serialNumber": "23948/A2PT96426", "name": "小爱音箱Pro-次卧", "alias": "小爱音箱Pro-次卧", "current": false, "presence": "online", "address": "123.139.251.229", "miotDID": "570068003", "hardware": "LX06", "romVersion": "1.88.133", "capabilities": { "multiroom_music": 1, "multiroom_miplay": 1, "content_blacklist": 1, "night_mode_v2": 1, "school_timetable": 1, "user_nick_name": 1, "night_mode": 1, "player_pause_timer": 1, "dialog_h5": 1, "child_mode_2": 1, "stereo_mode_v2": 1, "dlna": 1, "llm_zone_v2": 1, "report_times": 1, "ai_instruction": 1, "alarm_volume": 1, "custom_tts": 1, "classified_alarm": 1, "loadmore_v2": 1, "mesh": 1, "ai_protocol_3_0": 1, "voice_print_multidevice": 1, "night_mode_detail": 1, "child_mode": 1, "baby_schedule": 1, "didi_auth": 1, "tone_setting": 1, "earthquake": 1, "alarm_repeat_option_v2": 1, "xiaomi_voip": 1, "nearby_wakeup_cloud": 1, "family_voice": 1, "bluetooth_option_v2": 1, "custom_ir": 1, "yueyu": 1, "yunduantts": 1, "stereo_mode": 1, "mico_current": 1, "dts_sound_effect": 1, "voip_used_time": 1 }, "remoteCtrlType": "", "deviceSNProfile": "eyJzaW5nbGVfdXJsIjoiaHR0cHM6Ly9jZG4uY25iajEuZmRzLmFwaS5taS1pbWcuY29tL21pY28vODRjMGYzY2UtNmMzNC00NGM3LWI3YzgtZTQxNjFlNTI2Y2NlIiwic2lnbmF0dXJlIjoiR0JDUEJKbHdqcUhMUnZHU0NHVnpkRDE4R0JJTXh5STRkY2xGajdoS1FiTFdzeFhIWEFFb0ZLYzhnV3FUOVljVm93cXR1QTJGUTlSUnNqWTRKUWdTQUE9PSIsInJvbVZlcnNpb24iOiIxLjg4LjEzMyIsInN0ZXJlb191cmwiOiJodHRwczovL2Nkbi5jbmJqMS5mZHMuYXBpLm1pLWltZy5jb20vbWljby9mNmZlMGVjMS1lYzY2LTQ2NGEtOTE3Yi1lNjg1M2ZkMjE0MjQiLCJzaWduIjoiOWY5MjQyMWNiYWM5Njc4MmVlMDBlMDg0YzQ1NjI3NjJlZmYzOTg3MWQyYjY5YWQyNThlN2UyM2U2ZjM3NWI5MiIsIm11bHRpX3Jvb21fdXJsIjoiaHR0cHM6Ly9jZG4uY25iajEuZmRzLmFwaS5taS1pbWcuY29tL21pY28vMGYzM2RhOTQtMjE4Ny00MDU3LTg2MmYtNzI4MTIwNmQ1ODJmIiwic24iOiIyMzk0OC9BMlBUOTY0MjYiLCJsb2dfcGVyY2VudCI6IjEwIn0=", "deviceProfile": "eyJzaWduIjoiY2I3MDc1ZmZmOTkzNDZiMzQ5ZjRiM2UyMDZkZGZkOGIyZGM3MDNkM2I2OTcyN2I5MDNhNWNjYzE3MmQ4NzdiZSIsImRldmljZUlkIjoiZjM1ZDE3YTctYjliMy00NjU1LWFjNDgtNzAyM2RjM2Y0MzZlIn0=", "brokerEndpoint": "c3-xq-mt005.bj:1886", "brokerIndex": 63, "mac": "A4:39:B3:62:20:2D", "ssid": "" } ] 🐛 MiNA 账号: { "deviceId": "android_4dfd6b73-d966-43f3-9dd9-7bf12ab68155", "did": "570068003", "userId": "123", "password": "123", "sid": "micoapi", "pass": { "qs": "%3Fsid%3Dmicoapi%26_json%3Dtrue%26_locale%3Dzh_CN", "ssecurity": "wu/RtfI0GuqR3cTs6fyBhQ==", "code": 0, "passToken": "V1:DXmurwq2/R1BHTELu6obCcGgy/3weuNLQM8SxX7aRby5E2ma1PQNynONbsAOn7QHU/Mh0mNowv04NgOAp1BGi7yBFzeS81ajiZMjhHz3n66hwM5t0MlhwRzqi94py7S2iFQ6yJ++/TKm924yg287IaL0Kks++M3N1jMb1geItoFCCRuukKjT5M5COpYCWqN8GUiWe0rxlvel6cK/DPZwt1IpkVqLSkKrsmzBjNub0yODdZe/fn2Ga9AuFyxxhK2FxirLlq0DVslF9jCnrOGwuTeebhIyg4dAg88dDDMToLcrR4lmYSzjZyjVSRuZKkbg", "description": "成功", "securityStatus": 0, "nonce": "6175437449139532800", "userId": 123, "cUserId": "UEQG2GH_TAaJbz--_971W_5qsiE", "result": "ok", "psecurity": "lnGVhQ+KTCnnTm+eFlBotQ==", "captchaUrl": null, "location": "https://api2.mina.mi.com/sts?d=android_4dfd6b73-d966-43f3-9dd9-7bf12ab68155&ticket=0&pwd=1&p_ts=1731298256000&fid=0&p_lm=1&auth=CgS1R6QXGHkB2uNMocCN%2BCe7Z7SsxpX4LnPLw5upMR12eoi1eHAN4G1aDOwQt5saenaVGnwRi9D57ZA45pTV0RWYYnNiu3Z73pI9o9LuSKmuYA2U0F7joDPWpZF3IK88tCZGUyiwBRNCnW9fTrKkehmjuw1ysG6WNR4gRn8jxms%3D&m=1&_group=DEFAULT&tsl=0&p_ca=0&p_ur=CN&p_idc=China&nonce=7kzVeqCjhugBuEq6&_ssign=3%2BOBe3AgGzmb%2FrfCZDrGjGxFlfk%3D", "pwd": 1, "child": 0, "desc": "成功" }, "serviceToken": "sXEJMjSdm6MHAaBJzdchB149Wq8YSIKmwH+nBZ0EsLONhs4Vg1jU1gQDvTi7mZ8vlLP3FCTnckZXBykxUHZq2rwzKnKs3Og0/ums0/GTbB2M5ufyqOuMn4+/JGWoPaBVuImphU/fpvnYGgUhRx5XNyx2YSQKSWbwn6DrgGQP8yB/ntqGLSXzFnbjjtDZyS8poa87pSsju0+lHXenF9+pPTgS5WUa6H/HLQQzayvfKXw=", "device": { "deviceID": "f35d17a7-b9b3-4655-ac48-7023dc3f436e", "serialNumber": "23948/A2PT96426", "name": "小爱音箱Pro-次卧", "alias": "小爱音箱Pro-次卧", "current": false, "presence": "online", "address": "123.139.251.229", "miotDID": "570068003", "hardware": "LX06", "romVersion": "1.88.133", "capabilities": { "multiroom_music": 1, "multiroom_miplay": 1, "content_blacklist": 1, "night_mode_v2": 1, "school_timetable": 1, "user_nick_name": 1, "night_mode": 1, "player_pause_timer": 1, "dialog_h5": 1, "child_mode_2": 1, "stereo_mode_v2": 1, "dlna": 1, "llm_zone_v2": 1, "report_times": 1, "ai_instruction": 1, "alarm_volume": 1, "custom_tts": 1, "classified_alarm": 1, "loadmore_v2": 1, "mesh": 1, "ai_protocol_3_0": 1, "voice_print_multidevice": 1, "night_mode_detail": 1, "child_mode": 1, "baby_schedule": 1, "didi_auth": 1, "tone_setting": 1, "earthquake": 1, "alarm_repeat_option_v2": 1, "xiaomi_voip": 1, "nearby_wakeup_cloud": 1, "family_voice": 1, "bluetooth_option_v2": 1, "custom_ir": 1, "yueyu": 1, "yunduantts": 1, "stereo_mode": 1, "mico_current": 1, "dts_sound_effect": 1, "voip_used_time": 1 }, "remoteCtrlType": "", "deviceSNProfile": "eyJzaW5nbGVfdXJsIjoiaHR0cHM6Ly9jZG4uY25iajEuZmRzLmFwaS5taS1pbWcuY29tL21pY28vODRjMGYzY2UtNmMzNC00NGM3LWI3YzgtZTQxNjFlNTI2Y2NlIiwic2lnbmF0dXJlIjoiR0JDUEJKbHdqcUhMUnZHU0NHVnpkRDE4R0JJTXh5STRkY2xGajdoS1FiTFdzeFhIWEFFb0ZLYzhnV3FUOVljVm93cXR1QTJGUTlSUnNqWTRKUWdTQUE9PSIsInJvbVZlcnNpb24iOiIxLjg4LjEzMyIsInN0ZXJlb191cmwiOiJodHRwczovL2Nkbi5jbmJqMS5mZHMuYXBpLm1pLWltZy5jb20vbWljby9mNmZlMGVjMS1lYzY2LTQ2NGEtOTE3Yi1lNjg1M2ZkMjE0MjQiLCJzaWduIjoiOWY5MjQyMWNiYWM5Njc4MmVlMDBlMDg0YzQ1NjI3NjJlZmYzOTg3MWQyYjY5YWQyNThlN2UyM2U2ZjM3NWI5MiIsIm11bHRpX3Jvb21fdXJsIjoiaHR0cHM6Ly9jZG4uY25iajEuZmRzLmFwaS5taS1pbWcuY29tL21pY28vMGYzM2RhOTQtMjE4Ny00MDU3LTg2MmYtNzI4MTIwNmQ1ODJmIiwic24iOiIyMzk0OC9BMlBUOTY0MjYiLCJsb2dfcGVyY2VudCI6IjEwIn0=", "deviceProfile": "eyJzaWduIjoiY2I3MDc1ZmZmOTkzNDZiMzQ5ZjRiM2UyMDZkZGZkOGIyZGM3MDNkM2I2OTcyN2I5MDNhNWNjYzE3MmQ4NzdiZSIsImRldmljZUlkIjoiZjM1ZDE3YTctYjliMy00NjU1LWFjNDgtNzAyM2RjM2Y0MzZlIn0=", "brokerEndpoint": "c3-xq-mt005.bj:1886", "brokerIndex": 63, "mac": "A4:39:B3:62:20:2D", "ssid": "", "deviceId": "f35d17a7-b9b3-4655-ac48-7023dc3f436e" } } 🐛 MiIOT 账号: { "deviceId": "android_4dfd6b73-d966-43f3-9dd9-7bf12ab68155", "did": "570068003", "userId": "123", "password": "123", "sid": "micoapi", "pass": { "qs": "%3Fsid%3Dmicoapi%26_json%3Dtrue%26_locale%3Dzh_CN", "ssecurity": "wu/RtfI0GuqR3cTs6fyBhQ==", "code": 0, "passToken": "V1:DXmurwq2/R1BHTELu6obCcGgy/3weuNLQM8SxX7aRby5E2ma1PQNynONbsAOn7QHU/Mh0mNowv04NgOAp1BGi7yBFzeS81ajiZMjhHz3n66hwM5t0MlhwRzqi94py7S2iFQ6yJ++/TKm924yg287IaL0Kks++M3N1jMb1geItoFCCRuukKjT5M5COpYCWqN8GUiWe0rxlvel6cK/DPZwt1IpkVqLSkKrsmzBjNub0yODdZe/fn2Ga9AuFyxxhK2FxirLlq0DVslF9jCnrOGwuTeebhIyg4dAg88dDDMToLcrR4lmYSzjZyjVSRuZKkbg", "description": "成功", "securityStatus": 0, "nonce": "6175437449139532800", "userId": 123, "cUserId": "UEQG2GH_TAaJbz--_971W_5qsiE", "result": "ok", "psecurity": "lnGVhQ+KTCnnTm+eFlBotQ==", "captchaUrl": null, "location": "https://api2.mina.mi.com/sts?d=android_4dfd6b73-d966-43f3-9dd9-7bf12ab68155&ticket=0&pwd=1&p_ts=1731298256000&fid=0&p_lm=1&auth=CgS1R6QXGHkB2uNMocCN%2BCe7Z7SsxpX4LnPLw5upMR12eoi1eHAN4G1aDOwQt5saenaVGnwRi9D57ZA45pTV0RWYYnNiu3Z73pI9o9LuSKmuYA2U0F7joDPWpZF3IK88tCZGUyiwBRNCnW9fTrKkehmjuw1ysG6WNR4gRn8jxms%3D&m=1&_group=DEFAULT&tsl=0&p_ca=0&p_ur=CN&p_idc=China&nonce=7kzVeqCjhugBuEq6&_ssign=3%2BOBe3AgGzmb%2FrfCZDrGjGxFlfk%3D", "pwd": 1, "child": 0, "desc": "成功" }, "serviceToken": "sXEJMjSdm6MHAaBJzdchB149Wq8YSIKmwH+nBZ0EsLONhs4Vg1jU1gQDvTi7mZ8vlLP3FCTnckZXBykxUHZq2rwzKnKs3Og0/ums0/GTbB2M5ufyqOuMn4+/JGWoPaBVuImphU/fpvnYGgUhRx5XNyx2YSQKSWbwn6DrgGQP8yB/ntqGLSXzFnbjjtDZyS8poa87pSsju0+lHXenF9+pPTgS5WUa6H/HLQQzayvfKXw=", "device": { "deviceID": "f35d17a7-b9b3-4655-ac48-7023dc3f436e", "serialNumber": "23948/A2PT96426", "name": "小爱音箱Pro-次卧", "alias": "小爱音箱Pro-次卧", "current": false, "presence": "online", "address": "123.139.251.229", "miotDID": "570068003", "hardware": "LX06", "romVersion": "1.88.133", "capabilities": { "multiroom_music": 1, "multiroom_miplay": 1, "content_blacklist": 1, "night_mode_v2": 1, "school_timetable": 1, "user_nick_name": 1, "night_mode": 1, "player_pause_timer": 1, "dialog_h5": 1, "child_mode_2": 1, "stereo_mode_v2": 1, "dlna": 1, "llm_zone_v2": 1, "report_times": 1, "ai_instruction": 1, "alarm_volume": 1, "custom_tts": 1, "classified_alarm": 1, "loadmore_v2": 1, "mesh": 1, "ai_protocol_3_0": 1, "voice_print_multidevice": 1, "night_mode_detail": 1, "child_mode": 1, "baby_schedule": 1, "didi_auth": 1, "tone_setting": 1, "earthquake": 1, "alarm_repeat_option_v2": 1, "xiaomi_voip": 1, "nearby_wakeup_cloud": 1, "family_voice": 1, "bluetooth_option_v2": 1, "custom_ir": 1, "yueyu": 1, "yunduantts": 1, "stereo_mode": 1, "mico_current": 1, "dts_sound_effect": 1, "voip_used_time": 1 }, "remoteCtrlType": "", "deviceSNProfile": "eyJzaW5nbGVfdXJsIjoiaHR0cHM6Ly9jZG4uY25iajEuZmRzLmFwaS5taS1pbWcuY29tL21pY28vODRjMGYzY2UtNmMzNC00NGM3LWI3YzgtZTQxNjFlNTI2Y2NlIiwic2lnbmF0dXJlIjoiR0JDUEJKbHdqcUhMUnZHU0NHVnpkRDE4R0JJTXh5STRkY2xGajdoS1FiTFdzeFhIWEFFb0ZLYzhnV3FUOVljVm93cXR1QTJGUTlSUnNqWTRKUWdTQUE9PSIsInJvbVZlcnNpb24iOiIxLjg4LjEzMyIsInN0ZXJlb191cmwiOiJodHRwczovL2Nkbi5jbmJqMS5mZHMuYXBpLm1pLWltZy5jb20vbWljby9mNmZlMGVjMS1lYzY2LTQ2NGEtOTE3Yi1lNjg1M2ZkMjE0MjQiLCJzaWduIjoiOWY5MjQyMWNiYWM5Njc4MmVlMDBlMDg0YzQ1NjI3NjJlZmYzOTg3MWQyYjY5YWQyNThlN2UyM2U2ZjM3NWI5MiIsIm11bHRpX3Jvb21fdXJsIjoiaHR0cHM6Ly9jZG4uY25iajEuZmRzLmFwaS5taS1pbWcuY29tL21pY28vMGYzM2RhOTQtMjE4Ny00MDU3LTg2MmYtNzI4MTIwNmQ1ODJmIiwic24iOiIyMzk0OC9BMlBUOTY0MjYiLCJsb2dfcGVyY2VudCI6IjEwIn0=", "deviceProfile": "eyJzaWduIjoiY2I3MDc1ZmZmOTkzNDZiMzQ5ZjRiM2UyMDZkZGZkOGIyZGM3MDNkM2I2OTcyN2I5MDNhNWNjYzE3MmQ4NzdiZSIsImRldmljZUlkIjoiZjM1ZDE3YTctYjliMy00NjU1LWFjNDgtNzAyM2RjM2Y0MzZlIn0=", "brokerEndpoint": "c3-xq-mt005.bj:1886", "brokerIndex": 63, "mac": "A4:39:B3:62:20:2D", "ssid": "", "deviceId": "f35d17a7-b9b3-4655-ac48-7023dc3f436e" } } 🐛 小米账号: { "deviceId": "android_f39d7e39-4d48-4791-8fe3-0edc507083e3", "did": "570068003", "userId": "123", "password": "123", "sid": "xiaomiio", "pass": { "qs": "%3Fsid%3Dxiaomiio%26_json%3Dtrue%26_locale%3Dzh_CN", "ssecurity": "hBdzl5E3OuNC268PZdeU/w==", "code": 0, "passToken": "V1:DXmurwq2/R1BHTELu6obCRq5wY/n4ujPNplkTAA4vLMjiXYLqTyMsnTSmbEBUpi7PqTo7qlt/maP+zECRB2Thj8PzQqN73SfFZkhcmTILsNg4dRq0ydcWFnR6sEJkaxVmAr4kDrdnJ0Qd1tq61+YV4fZpLZZMXcd+8XFe8gzvpB3TbRBuRRW3wd3Qe4Nvb3/U7tETTeT+81Z0OFnGqMLCUyC1WyKXoIVXQSHWMaJ7gIQXRwIeh8OHOD/SUr1RPRo35KJiMd7lKBh+2v8QPt+vTVAmdezzevUCpp8PatFqOzVN3w1YU08/eH1sHWL9CH6", "description": "成功", "securityStatus": 0, "nonce": "5289405963130019840", "userId": 123, "cUserId": "UEQG2GH_TAaJbz--_971W_5qsiE", "result": "ok", "psecurity": "IX6luZdYMwbfeuX4MH1zhQ==", "captchaUrl": null, "location": "https://sts.api.io.mi.com/sts?d=android_f39d7e39-4d48-4791-8fe3-0edc507083e3&ticket=0&pwd=1&p_ts=1731298256000&fid=0&p_lm=1&auth=Hvtmi0KTAQkLYF5BKM5%2FusVCXqSiNyW8Jd5CZKqzvFTxDMh1lDGoj8bazUZouwWxwFZAxgid7IEWA56RPAHXl7TIqLFG3amaTJcggQFGOqZqAmJ%2Fd9BPR%2BEIYJM5TcGZq5hjbj5yusP5%2FfoLFDjEOEnUoK%2BfmQVFGUXzfFdocFM%3D&m=1&_group=DEFAULT&tsl=0&p_ca=0&p_ur=CN&p_idc=China&nonce=uDnGvhc9NUgBuEq6&_ssign=g8acMgSxnEboxl4y0Q%2BV5wD%2Fqbo%3D", "pwd": 1, "child": 0, "desc": "成功" }, "serviceToken": "rNnp39STdI6mH8b6aAh1cLr9Nr+ob4zh8m1VyhEF+Q5Pg8J0PHx8ZLAEBAWz+dWlCob9gVa5E/tDCudHL485U36QvpSZlk5JqBveUvslySzMOJoc7/m+jazV84v7GlwfFxSjgcXskly6TFOBcP7Lxqq3xSbadDlgvT3yYJ6V5Xg=" } 🐛 MiNA 账号: { "deviceId": "android_f39d7e39-4d48-4791-8fe3-0edc507083e3", "did": "570068003", "userId": "123", "password": "123", "sid": "xiaomiio", "pass": { "qs": "%3Fsid%3Dxiaomiio%26_json%3Dtrue%26_locale%3Dzh_CN", "ssecurity": "hBdzl5E3OuNC268PZdeU/w==", "code": 0, "passToken": "V1:DXmurwq2/R1BHTELu6obCRq5wY/n4ujPNplkTAA4vLMjiXYLqTyMsnTSmbEBUpi7PqTo7qlt/maP+zECRB2Thj8PzQqN73SfFZkhcmTILsNg4dRq0ydcWFnR6sEJkaxVmAr4kDrdnJ0Qd1tq61+YV4fZpLZZMXcd+8XFe8gzvpB3TbRBuRRW3wd3Qe4Nvb3/U7tETTeT+81Z0OFnGqMLCUyC1WyKXoIVXQSHWMaJ7gIQXRwIeh8OHOD/SUr1RPRo35KJiMd7lKBh+2v8QPt+vTVAmdezzevUCpp8PatFqOzVN3w1YU08/eH1sHWL9CH6", "description": "成功", "securityStatus": 0, "nonce": "5289405963130019840", "userId": 123, "cUserId": "UEQG2GH_TAaJbz--_971W_5qsiE", "result": "ok", "psecurity": "IX6luZdYMwbfeuX4MH1zhQ==", "captchaUrl": null, "location": "https://sts.api.io.mi.com/sts?d=android_f39d7e39-4d48-4791-8fe3-0edc507083e3&ticket=0&pwd=1&p_ts=1731298256000&fid=0&p_lm=1&auth=Hvtmi0KTAQkLYF5BKM5%2FusVCXqSiNyW8Jd5CZKqzvFTxDMh1lDGoj8bazUZouwWxwFZAxgid7IEWA56RPAHXl7TIqLFG3amaTJcggQFGOqZqAmJ%2Fd9BPR%2BEIYJM5TcGZq5hjbj5yusP5%2FfoLFDjEOEnUoK%2BfmQVFGUXzfFdocFM%3D&m=1&_group=DEFAULT&tsl=0&p_ca=0&p_ur=CN&p_idc=China&nonce=uDnGvhc9NUgBuEq6&_ssign=g8acMgSxnEboxl4y0Q%2BV5wD%2Fqbo%3D", "pwd": 1, "child": 0, "desc": "成功" }, "serviceToken": "rNnp39STdI6mH8b6aAh1cLr9Nr+ob4zh8m1VyhEF+Q5Pg8J0PHx8ZLAEBAWz+dWlCob9gVa5E/tDCudHL485U36QvpSZlk5JqBveUvslySzMOJoc7/m+jazV84v7GlwfFxSjgcXskly6TFOBcP7Lxqq3xSbadDlgvT3yYJ6V5Xg=" } 🐛 MiIOT 设备列表: { "list": [ { "did": "1076318085", "token": "4571465470364d7638506634526b3632", "longitude": "0.0", "latitude": "0.0", "name": "小米智能摄像机2 AI增强版", "pid": "0", "localip": "192.168.31.81", "mac": "78:DF:72:2A:F5:9B", "ssid": "myhomewifi", "bssid": "D4:35:38:CA:6D:EE", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "chuangmi.camera.051a01", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "5.1.6_0282", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 73489, "password": "", "p2p_id": "", "rssi": -33, "family_id": 0, "reset_flag": 0 }, { "did": "1077424399", "token": "6d5047444b474a737348543932724378", "longitude": "0.0", "latitude": "0.0", "name": "小米智能摄像机3 云台版", "pid": "0", "localip": "192.168.1.3", "mac": "78:DF:72:34:80:7C", "ssid": "2KU2", "bssid": "66:58:AD:80:5B:2F", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "chuangmi.camera.069a01", "adminFlag": 0, "shareFlag": 1, "permitLevel": 4, "isOnline": true, "desc": "设备在线 来自2864385593", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "5.1.7_0467", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "owner": { "userid": 2864385593, "nickname": "2864385593", "icon": null }, "uid": 2864385593, "pd_id": 76865, "password": "", "p2p_id": "", "rssi": -45, "family_id": 0, "reset_flag": 0 }, { "did": "597247531", "token": "6a7a366f6f554750506574667a526834", "longitude": "0.0", "latitude": "0.0", "name": "~子鱼的电视", "pid": "0", "localip": "192.168.31.91", "mac": "20:72:A9:8F:20:3B", "ssid": "myhomewifi", "bssid": "A4:A9:30:8D:26:C5", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "xiaomi.tv.rmh1", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "4.2.10_0273", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 69064, "password": "", "p2p_id": "", "rssi": -14, "family_id": 0, "reset_flag": 0 }, { "did": "546406441", "token": "617a7844695765437077735642355741", "longitude": "0.0", "latitude": "0.0", "name": "Xiaomi HomeWiFi三频Mesh路由器2", "pid": "0", "localip": "192.168.31.43", "mac": "d4:35:38:65:98:e9", "ssid": "", "bssid": "", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "xiaomi.router.rb08", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "1.0.75", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 74521, "password": "", "p2p_id": "", "rssi": 0, "family_id": 0, "reset_flag": 0 }, { "did": "546406442", "token": "44544557376976433068735032766358", "longitude": "0.0", "latitude": "0.0", "name": "Xiaomi HomeWiFi三频Mesh路由器", "pid": "0", "localip": "192.168.31.48", "mac": "d4:35:38:65:98:ea", "ssid": "", "bssid": "", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "xiaomi.router.rb08", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "1.0.75", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 74521, "password": "", "p2p_id": "", "rssi": 0, "family_id": 0, "reset_flag": 0 }, { "did": "546435011", "token": "3232526733314e77707a656a37463468", "longitude": "0.0", "latitude": "0.0", "name": "Xiaomi HomeWiFi三频Mesh路由器3", "pid": "0", "localip": "192.168.31.109", "mac": "d4:35:38:66:08:83", "ssid": "", "bssid": "", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "xiaomi.router.rb08", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "1.0.75", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 74521, "password": "", "p2p_id": "", "rssi": 0, "family_id": 0, "reset_flag": 0 }, { "did": "729157033", "token": "78574148376a6247626d41495455426a", "longitude": "0.0", "latitude": "0.0", "name": "Xiaomi_C86A", "pid": "0", "localip": "10.0.17.22", "mac": "a4:a9:30:22:c8:6a", "ssid": "", "bssid": "", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "xiaomi.router.rd08", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "1.1.26", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 78860, "password": "", "p2p_id": "", "rssi": 0, "family_id": 0, "reset_flag": 0 }, { "did": "554116256", "token": "829868a50388a136de9d33979a3b8c5e", "longitude": "0.0", "latitude": "0.0", "name": "主卧灯", "pid": "0", "localip": "192.168.31.63", "mac": "68:AB:BC:77:81:B2", "ssid": "myhomewifi", "bssid": "D4:35:38:CA:6D:EF", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "leshi.light.wy0b01", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "2.0.7_0010", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 2270, "password": "", "p2p_id": "", "rssi": -73, "family_id": 0, "reset_flag": 0 }, { "did": "556366665", "token": "af5f5c3b3321d53c9ab324369548ee51", "longitude": "0.0", "latitude": "0.0", "name": "餐厅灯", "pid": "0", "localip": "192.168.31.64", "mac": "68:AB:BC:99:D8:5B", "ssid": "myhomewifi", "bssid": "A4:A9:30:8D:26:C4", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "leshi.light.wy0b01", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "2.0.7_0010", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 2270, "password": "", "p2p_id": "", "rssi": -40, "family_id": 0, "reset_flag": 0 }, { "did": "570067681", "token": "61354548535332426233775557635375", "longitude": "0.0", "latitude": "0.0", "name": "小爱音箱Pro-主卧", "pid": "0", "localip": "192.168.31.240", "mac": "A4:39:B3:62:1E:EB", "ssid": "myhomewifi", "bssid": "D4:35:38:CA:6D:F2", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "xiaomi.wifispeaker.lx06", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "1.88.133", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 1233, "password": "", "p2p_id": "", "rssi": -1, "family_id": 0, "reset_flag": 0 }, { "did": "570068003", "token": "6b47715275434b4a335a37474f555937", "longitude": "0.0", "latitude": "0.0", "name": "小爱音箱Pro-次卧", "pid": "0", "localip": "192.168.31.243", "mac": "A4:39:B3:62:20:2D", "ssid": "myhomewifi", "bssid": "D4:35:38:CC:9B:EF", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "xiaomi.wifispeaker.lx06", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "1.88.133", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 1233, "password": "", "p2p_id": "", "rssi": -7, "family_id": 0, "reset_flag": 0 }, { "did": "570117702", "token": "6c704a5874553352636b353546306473", "longitude": "0.0", "latitude": "0.0", "name": "小爱音箱Pro-客厅", "pid": "0", "localip": "192.168.31.241", "mac": "A4:39:B3:62:E2:50", "ssid": "myhomewifi", "bssid": "D4:35:38:CA:6D:ED", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "xiaomi.wifispeaker.lx06", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "1.88.133", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 1233, "password": "", "p2p_id": "", "rssi": -41, "family_id": 0, "reset_flag": 0 }, { "did": "624778297", "token": "86b798e9767a9bba0cc3eb3f0aaa16a8", "longitude": "0.0", "latitude": "0.0", "name": "次卧灯", "pid": "0", "localip": "192.168.31.61", "mac": "10:AE:60:F8:25:66", "ssid": "myhomewifi", "bssid": "A4:A9:30:8D:26:C4", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "aimore.light.cw3201", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "2.2.3_0010", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 8450, "password": "", "p2p_id": "", "rssi": -71, "family_id": 0, "reset_flag": 0 }, { "did": "673634357", "token": "9fe9a0d71c3ae7b0a4dd6f85a1771e3c", "longitude": "0.0", "latitude": "0.0", "name": "客厅灯", "pid": "0", "localip": "192.168.31.62", "mac": "64:9E:31:BB:0A:CF", "ssid": "myhomewifi", "bssid": "A4:A9:30:8D:26:C4", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "aimore.light.cw3201", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "2.2.3_0010", "needVerifyCode": 0, "isPasswordEncrypt": 0, "mcu_version": "0010" }, "uid": 11072046, "pd_id": 8450, "password": "", "p2p_id": "", "rssi": -48, "family_id": 0, "reset_flag": 0 }, { "did": "blt.3.1cj7ahb5klo00", "token": "449105c82167141662125c9c", "longitude": "0.0", "latitude": "0.0", "name": "温湿度传感器", "pid": "6", "localip": "", "mac": "18:61:20:40:94:F5", "ssid": "", "bssid": "", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "miaomiaoce.sensor_ht.t1", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "24℃ |77%", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "1.1.2_0097", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "prop": { "4100": "ee00", "4102": "0203" }, "uid": 11072046, "pd_id": 1115, "password": "", "p2p_id": "", "rssi": 0, "family_id": 0, "reset_flag": 0 }, { "did": "ir.1601581594735464450", "token": "", "longitude": "0.0", "latitude": "0.0", "name": "空调", "pid": "15", "localip": "", "mac": "", "ssid": "myhomewifi", "bssid": "D4:35:38:CA:6D:ED", "parent_id": "570117702", "parent_model": "xiaomi.wifispeaker.lx06", "show_mode": 1, "model": "miir.aircondition.ir02", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0 }, "uid": 11072046, "pd_id": 65723, "password": "", "p2p_id": "", "rssi": 0, "family_id": 0, "reset_flag": 0 }, { "did": "ir.1601765043610263552", "token": "", "longitude": "0.0", "latitude": "0.0", "name": "空调", "pid": "15", "localip": "", "mac": "", "ssid": "myhomewifi", "bssid": "D4:35:38:CC:9B:EF", "parent_id": "570068003", "parent_model": "xiaomi.wifispeaker.lx06", "show_mode": 1, "model": "miir.aircondition.ir02", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0 }, "uid": 11072046, "pd_id": 65723, "password": "", "p2p_id": "", "rssi": 0, "family_id": 0, "reset_flag": 0 }, { "did": "ir.1601767213386649600", "token": "", "longitude": "0.0", "latitude": "0.0", "name": "空调", "pid": "15", "localip": "", "mac": "", "ssid": "myhomewifi", "bssid": "D4:35:38:CA:6D:F2", "parent_id": "570067681", "parent_model": "xiaomi.wifispeaker.lx06", "show_mode": 1, "model": "miir.aircondition.ir02", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0 }, "uid": 11072046, "pd_id": 65723, "password": "", "p2p_id": "", "rssi": 0, "family_id": 0, "reset_flag": 0 } ] } 🐛 MiIOT 账号: { "deviceId": "android_f39d7e39-4d48-4791-8fe3-0edc507083e3", "did": "570068003", "userId": "123", "password": "123", "sid": "xiaomiio", "pass": { "qs": "%3Fsid%3Dxiaomiio%26_json%3Dtrue%26_locale%3Dzh_CN", "ssecurity": "hBdzl5E3OuNC268PZdeU/w==", "code": 0, "passToken": "V1:DXmurwq2/R1BHTELu6obCRq5wY/n4ujPNplkTAA4vLMjiXYLqTyMsnTSmbEBUpi7PqTo7qlt/maP+zECRB2Thj8PzQqN73SfFZkhcmTILsNg4dRq0ydcWFnR6sEJkaxVmAr4kDrdnJ0Qd1tq61+YV4fZpLZZMXcd+8XFe8gzvpB3TbRBuRRW3wd3Qe4Nvb3/U7tETTeT+81Z0OFnGqMLCUyC1WyKXoIVXQSHWMaJ7gIQXRwIeh8OHOD/SUr1RPRo35KJiMd7lKBh+2v8QPt+vTVAmdezzevUCpp8PatFqOzVN3w1YU08/eH1sHWL9CH6", "description": "成功", "securityStatus": 0, "nonce": "5289405963130019840", "userId": 123, "cUserId": "UEQG2GH_TAaJbz--_971W_5qsiE", "result": "ok", "psecurity": "IX6luZdYMwbfeuX4MH1zhQ==", "captchaUrl": null, "location": "https://sts.api.io.mi.com/sts?d=android_f39d7e39-4d48-4791-8fe3-0edc507083e3&ticket=0&pwd=1&p_ts=1731298256000&fid=0&p_lm=1&auth=Hvtmi0KTAQkLYF5BKM5%2FusVCXqSiNyW8Jd5CZKqzvFTxDMh1lDGoj8bazUZouwWxwFZAxgid7IEWA56RPAHXl7TIqLFG3amaTJcggQFGOqZqAmJ%2Fd9BPR%2BEIYJM5TcGZq5hjbj5yusP5%2FfoLFDjEOEnUoK%2BfmQVFGUXzfFdocFM%3D&m=1&_group=DEFAULT&tsl=0&p_ca=0&p_ur=CN&p_idc=China&nonce=uDnGvhc9NUgBuEq6&_ssign=g8acMgSxnEboxl4y0Q%2BV5wD%2Fqbo%3D", "pwd": 1, "child": 0, "desc": "成功" }, "serviceToken": "rNnp39STdI6mH8b6aAh1cLr9Nr+ob4zh8m1VyhEF+Q5Pg8J0PHx8ZLAEBAWz+dWlCob9gVa5E/tDCudHL485U36QvpSZlk5JqBveUvslySzMOJoc7/m+jazV84v7GlwfFxSjgcXskly6TFOBcP7Lxqq3xSbadDlgvT3yYJ6V5Xg=", "device": { "did": "570068003", "token": "6b47715275434b4a335a37474f555937", "longitude": "0.0", "latitude": "0.0", "name": "小爱音箱Pro-次卧", "pid": "0", "localip": "192.168.31.243", "mac": "A4:39:B3:62:20:2D", "ssid": "myhomewifi", "bssid": "D4:35:38:CC:9B:EF", "parent_id": "", "parent_model": "", "show_mode": 1, "model": "xiaomi.wifispeaker.lx06", "adminFlag": 1, "shareFlag": 0, "permitLevel": 16, "isOnline": true, "desc": "设备在线 ", "extra": { "isSetPincode": 0, "pincodeType": 0, "fw_version": "1.88.133", "needVerifyCode": 0, "isPasswordEncrypt": 0 }, "uid": 11072046, "pd_id": 1233, "password": "", "p2p_id": "", "rssi": -7, "family_id": 0, "reset_flag": 0 } } 2024/11/11 12:10:34 Speaker 🐛 配置参数: { "userId": "123", "password": "123", "did": "570068003", "callAIKeywords": [ "请", "你", "小爱" ], "wakeUpKeywords": [ "打开", "进入", "召唤" ], "exitKeywords": [ "关闭", "退出", "再见" ], "onEnterAI": [ "你好,我是小爱,很高兴认识你" ], "onExitAI": [ "小爱已退出" ], "onAIAsking": [ "让我先想想", "请稍等" ], "onAIReplied": [ "我说完了", "还有其他问题吗" ], "onAIError": [ "啊哦,出错了,请稍后再试吧!" ], "ttsCommand": [ 5, 1 ], "wakeUpCommand": [ 5, 3 ], "tts": "xiaoai", "streamResponse": false, "exitKeepAliveAfter": 30, "checkTTSStatusAfter": 3, "checkInterval": 1000, "debug": true, "enableTrace": true, "timeout": 5000 } 2024/11/11 12:10:34 Speaker 🐛 环境变量: { "npm_config_user_agent": "npm/10.7.0 node/v20.14.0 linux x64 workspaces/false", "NODE_VERSION": "20.14.0", "HOSTNAME": "4066e5e27296", "YARN_VERSION": "1.22.22", "npm_node_execpath": "/usr/local/bin/node", "SHLVL": "3", "npm_config_noproxy": "", "OPENAI_BASE_URL": "http://192.168.31.34:30000/v1", "HOME": "/root", "npm_package_json": "/app/package.json", "npm_package_engines_node": ">=16", "OPENAI_API_KEY": "sk-zu7IQxjVbyy86UbSBa5e637eCe8f45D38d9f45729d61636e", "npm_config_userconfig": "/root/.npmrc", "npm_config_local_prefix": "/app", "PGID": "100", "COLOR": "0", "npm_config_prefix": "/usr/local", "npm_config_npm_version": "10.7.0", "npm_config_cache": "/root/.npm", "npm_config_node_gyp": "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js", "PATH": "/app/node_modules/.bin:/node_modules/.bin:/usr/local/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "NODE": "/usr/local/bin/node", "npm_package_name": "mi-gpt", "npm_lifecycle_script": "node ./app.js", "PUID": "1026", "OPENAI_MODEL": "SparkDesk-v3.5", "npm_package_version": "4.2.0", "npm_lifecycle_event": "start", "npm_config_globalconfig": "/usr/local/etc/npmrc", "npm_config_init_module": "/root/.npm-init.js", "PWD": "/app", "npm_execpath": "/usr/local/lib/node_modules/npm/bin/npm-cli.js", "npm_config_global_prefix": "/usr/local", "npm_command": "run-script", "TZ": "Asia/Shanghai", "INIT_CWD": "/app", "EDITOR": "vi" } 2024/11/11 12:10:34 Speaker 🐛 设备信息: { "name": "小爱音箱Pro-次卧", "desc": "设备在线 ", "model": "xiaomi.wifispeaker.lx06", "rom": "1.88.133" } 2024/11/11 12:10:34 Speaker ✅ 服务已启动... 2024/11/11 12:10:50 Speaker 🔥 小爱 2024/11/11 12:10:50 Speaker 🔊 请稍等 2024/11/11 12:10:51 Open AI ✅ Answer: 2024/11/11 12:10:51 Speaker 🔊 啊哦,出错了,请稍后再试吧! 2024/11/11 12:11:32 Speaker 🔥 请回答我一个问题 2024/11/11 12:11:33 Speaker 🔊 请稍等 2024/11/11 12:11:33 Open AI ✅ Answer: 2024/11/11 12:11:33 Speaker 🔊 啊哦,出错了,请稍后再试吧!
LLM 接口问题自行处理,请确保你使用的大模型支持 system prompt、json mode 以及 stream response。
http://192.168.31.34:30000/v1 好了,换了个模型
LLM 接口问题自行处理,请确保你使用的大模型支持 system prompt、json mode 以及 stream response。 好了,换了个模型,谢谢
docker-compose.yml如下
.env如下,按照教程搭建的openapi,192.168.31.34:30000是oneapi的地址
.migpt.js如下
开启debug后日志