『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 3079|回复: 6

[进阶教程] 小爱音箱播放NAS本地音乐-无python版

[复制链接]

1

主题

12

帖子

92

积分

注册会员

Rank: 2

积分
92
金钱
80
HASS币
0
发表于 2023-10-27 23:37:54 | 显示全部楼层 |阅读模式
本帖最后由 tojoin97 于 2023-10-28 19:36 编辑

受到这位大佬帖子的提点[进阶教程] 小爱音箱播放会员音乐-NAS本地音乐篇,在次基础上进行了些许优化1、没用Python脚本,全node-red。 我的环境是docker,还得装pip,requests等,就把脚本改了。
2、使用alist的搜索功能,而不是本地建立文件记录,之前的只能检索根目录的文件,现在可以检索文件夹里的歌曲。


坑:
1、播放歌曲有时候识别中文出错导致播放出错找不到歌曲。如:播放 张震岳的小宇 ,传入的就成了 小雨。
2、本地播放歌手文件夹,小爱状态一直是 pause,不是idle和play切换,导致无法识别一首歌啥时候播放完了播放下一首。
3、播放歌手,在推的歌曲播放完后,会自动播放在线歌手的歌曲,尝试在推本地前给个停止播放的指令,但是会导致推的本地歌曲不播放,需要加3s延迟,觉的不太行,取消了该方案。

注:
我的是NAS歌曲用WebDav共享出来,再用的alist管理
alist管理里面需要建立数据库(非全文搜索的)的索引


需要安装的节点

node-red-contrib-home-assistant-websocket

node-red-contrib-xiaoai-tts


总结:
很多功能实现比较麻烦,使用体验感很差,只适合爱折腾的弄,或者播放一些在线没有的歌曲。有钱还是开个会员吧,体验感好很多。




[
    {
        "id": "021363853122b3fd",
        "type": "tab",
        "label": "小爱播放本地Webdav歌曲",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "cca1137c2f77a5b2",
        "type": "function",
        "z": "021363853122b3fd",
        "name": "POST数据整理",
        "func": "msg.payload = {\n    "parent": "",\n    "keywords": msg.keyword,\n    "scope": 1,\n    "page": 1,\n    "per_page": 20\n}\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1280,
        "y": 780,
        "wires": [
            [
                "974c7e37c951d79c"
            ]
        ]
    },
    {
        "id": "f51c3e053a4293a9",
        "type": "inject",
        "z": "021363853122b3fd",
        "name": "歌曲名称",
        "props": [
            {
                "p": "keyword",
                "v": "小宇",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 580,
        "y": 780,
        "wires": [
            [
                "cca1137c2f77a5b2"
            ]
        ]
    },
    {
        "id": "974c7e37c951d79c",
        "type": "http request",
        "z": "021363853122b3fd",
        "name": "查找要播放的内容",
        "method": "POST",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "http://192.168.0.115:5244/api/fs/search",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 1470,
        "y": 780,
        "wires": [
            [
                "8c0a374ecdc22e93"
            ]
        ]
    },
    {
        "id": "8c0a374ecdc22e93",
        "type": "function",
        "z": "021363853122b3fd",
        "name": "POST数据整理",
        "func": "\nif (msg.payload.data.total >0 ){\n    //有歌手文件夹\n    // msg.url = "http://192.168.0.115:5244/api/fs/list"\n    // msg.payload = {\n    //     "path": msg.payload.data.content[0].parent + "/" + msg.payload.data.content[0].name,\n    //     "password": "",\n    //     "page": 1,\n    //     "per_page": 0,\n    //     "refresh": false\n\n//改成到文件夹里搜.,后续调用方式可以一致\n    msg.url = "http://192.168.0.115:5244/api/fs/search"\n    msg.payload = {\n        "parent": msg.payload.data.content[0].parent + "/" + msg.payload.data.content[0].name,\n        "keywords": ".",\n        "scope": 2,\n        "page": 1,\n        "per_page": 20\n    }\n}\nelse{\n    //无歌手文件夹,认为是传入的是歌曲\n    msg.url = "http://192.168.0.115:5244/api/fs/search"\n    msg.payload = {\n        "parent": "",\n        "keywords": msg.keyword,\n        "scope": 2,\n        "page": 1,\n        "per_page": 20\n    }\n}\n\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1660,
        "y": 780,
        "wires": [
            [
                "cd7619d0b428860b"
            ]
        ]
    },
    {
        "id": "cd7619d0b428860b",
        "type": "http request",
        "z": "021363853122b3fd",
        "name": "查找要播放的内容",
        "method": "POST",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 1870,
        "y": 780,
        "wires": [
            [
                "8d3972ded92c571b"
            ]
        ]
    },
    {
        "id": "5c41ebe526e08fa4",
        "type": "function",
        "z": "021363853122b3fd",
        "name": "整理url",
        "func": "var playMusiccommand = global.get("playMusiccommand")\nvar playMusicIndex = global.get("playMusicIndex")\n\nif (playMusiccommand == "play"){\n    if (playMusicIndex >= msg.payload.data.total){\n        //播放完了复位Index\n        global.set("playMusicIndex", 0)\n        playMusicIndex = 0\n    }\n    if (msg.payload.data.content[playMusicIndex].parent.split("WebDav/").length >= 2) {\n        msg.parentpath = msg.payload.data.content[playMusicIndex].parent.split("WebDav/")[1] + "/"\n    }\n    else {\n        msg.parentpath = ""\n    }\n    msg.payload = "http://192.168.0.115:5007/Music/" + msg.parentpath + msg.payload.data.content[playMusicIndex].name\n}\n\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2920,
        "y": 780,
        "wires": [
            [
                "c29fcc59c251a44e",
                "e41c82303c5a303f"
            ]
        ]
    },
    {
        "id": "012d3bd954d0d22a",
        "type": "api-call-service",
        "z": "021363853122b3fd",
        "name": "小爱播放url歌曲",
        "server": "466483fcf144a9ea",
        "version": 5,
        "debugenabled": false,
        "domain": "media_player",
        "service": "play_media",
        "areaId": [
            "chu_zu_wu"
        ],
        "deviceId": [
            "0499e2257416be9071ada18d53d0a3df"
        ],
        "entityId": [
            "media_player.xiaomi_lx06_0f65_play_control"
        ],
        "data": "{\t   "media_content_id":msg.payload,\t   "media_content_type":"music"\t}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 3300,
        "y": 780,
        "wires": [
            []
        ]
    },
    {
        "id": "ff8a8a5fe9659635",
        "type": "switch",
        "z": "021363853122b3fd",
        "name": "判断是否为绿钻歌曲",
        "property": "data.new_state.attributes.answers[0].tts.text",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "试听版",
                "vt": "str"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 520,
        "y": 640,
        "wires": [
            [
                "183b8cf750e1bb12"
            ],
            []
        ]
    },
    {
        "id": "183b8cf750e1bb12",
        "type": "split",
        "z": "021363853122b3fd",
        "name": "",
        "splt": "播放",
        "spltType": "str",
        "arraySplt": "1",
        "arraySpltType": "len",
        "stream": false,
        "addname": "",
        "x": 710,
        "y": 640,
        "wires": [
            [
                "61386bc310c047be"
            ]
        ]
    },
    {
        "id": "61386bc310c047be",
        "type": "join",
        "z": "021363853122b3fd",
        "name": "",
        "mode": "custom",
        "build": "array",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 830,
        "y": 640,
        "wires": [
            [
                "ea256afd87a09164"
            ]
        ]
    },
    {
        "id": "ea256afd87a09164",
        "type": "function",
        "z": "021363853122b3fd",
        "name": "",
        "func": "msg.payload = msg.payload[1]\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 950,
        "y": 640,
        "wires": [
            [
                "5de7e22b30a5b296"
            ]
        ]
    },
    {
        "id": "0c2838967b10ea06",
        "type": "server-state-changed",
        "z": "021363853122b3fd",
        "name": "小爱对话",
        "server": "466483fcf144a9ea",
        "version": 5,
        "outputs": 1,
        "exposeAsEntityConfig": "",
        "entityId": "sensor.xiaomi_lx06_0f65_conversation",
        "entityIdType": "exact",
        "outputInitially": false,
        "stateType": "str",
        "ifState": "",
        "ifStateType": "str",
        "ifStateOperator": "is",
        "outputOnlyOnStateChange": true,
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "data",
                "propertyType": "msg",
                "value": "",
                "valueType": "eventData"
            },
            {
                "property": "topic",
                "propertyType": "msg",
                "value": "",
                "valueType": "triggerId"
            }
        ],
        "x": 80,
        "y": 420,
        "wires": [
            [
                "c4d745d3481ec44e"
            ]
        ]
    },
    {
        "id": "5de7e22b30a5b296",
        "type": "change",
        "z": "021363853122b3fd",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "keyword",
                "pt": "msg",
                "to": "payload",
                "tot": "msg",
                "dc": true
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1030,
        "y": 740,
        "wires": [
            [
                "cca1137c2f77a5b2"
            ]
        ]
    },
    {
        "id": "3da9cf1da9eca9cf",
        "type": "comment",
        "z": "021363853122b3fd",
        "name": "小爱播放本地音乐",
        "info": "",
        "x": 250,
        "y": 100,
        "wires": []
    },
    {
        "id": "14d73a336525acbe",
        "type": "comment",
        "z": "021363853122b3fd",
        "name": "先查询文件夹,如果是的话认为是歌手,播放整个文件夹下所有歌曲文件",
        "info": "",
        "x": 1510,
        "y": 680,
        "wires": []
    },
    {
        "id": "9839a184e7f8048d",
        "type": "comment",
        "z": "021363853122b3fd",
        "name": "绿钻歌曲自动放本地的",
        "info": "",
        "x": 800,
        "y": 580,
        "wires": []
    },
    {
        "id": "b2384213013da667",
        "type": "xiaoai-tts",
        "z": "021363853122b3fd",
        "name": "",
        "xiaoai": "f36c15f97a0bea15",
        "tts": "",
        "device": "",
        "x": 2530,
        "y": 860,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "8d3972ded92c571b",
        "type": "switch",
        "z": "021363853122b3fd",
        "name": "判断最后是否找到",
        "property": "payload.data.total",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "0",
                "vt": "str"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 2090,
        "y": 780,
        "wires": [
            [
                "21db4fbe060fa13d"
            ],
            [
                "c966ddc1c36aa24f"
            ]
        ]
    },
    {
        "id": "c966ddc1c36aa24f",
        "type": "change",
        "z": "021363853122b3fd",
        "name": "播放本地未找到歌曲",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "本地没有找到你想要播放的歌曲",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 2340,
        "y": 860,
        "wires": [
            [
                "b2384213013da667"
            ]
        ]
    },
    {
        "id": "c4d745d3481ec44e",
        "type": "switch",
        "z": "021363853122b3fd",
        "name": "判断是否含本地播放",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "本地播放",
                "vt": "str"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 300,
        "y": 420,
        "wires": [
            [
                "44c272c5b0302e50"
            ],
            [
                "ff8a8a5fe9659635"
            ]
        ]
    },
    {
        "id": "44c272c5b0302e50",
        "type": "split",
        "z": "021363853122b3fd",
        "name": "",
        "splt": "本地播放",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "",
        "x": 510,
        "y": 400,
        "wires": [
            [
                "57bdc1fbc0e32799"
            ]
        ]
    },
    {
        "id": "63a3bb8c415dd4d4",
        "type": "inject",
        "z": "021363853122b3fd",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "本地播放赵雷",
        "payloadType": "str",
        "x": 290,
        "y": 340,
        "wires": [
            [
                "44c272c5b0302e50"
            ]
        ]
    },
    {
        "id": "cfd9892bf243c73e",
        "type": "change",
        "z": "021363853122b3fd",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "keyword",
                "pt": "msg",
                "to": "payload",
                "tot": "msg",
                "dc": true
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 950,
        "y": 400,
        "wires": [
            [
                "cca1137c2f77a5b2",
                "34d52cfd2323e888"
            ]
        ]
    },
    {
        "id": "9a8317d64d45a148",
        "type": "debug",
        "z": "021363853122b3fd",
        "name": "play status",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 2470,
        "y": 660,
        "wires": []
    },
    {
        "id": "a6cdab81aa9b2323",
        "type": "switch",
        "z": "021363853122b3fd",
        "name": "判断是否变为空闲",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "idle",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 2490,
        "y": 720,
        "wires": [
            [
                "91d2fda4f9157393"
            ]
        ]
    },
    {
        "id": "645d85504ac5e9b3",
        "type": "comment",
        "z": "021363853122b3fd",
        "name": "空闲认为播放完毕,播放下一曲",
        "info": "",
        "x": 2530,
        "y": 460,
        "wires": []
    },
    {
        "id": "78ac9bbb442ae8af",
        "type": "server-state-changed",
        "z": "021363853122b3fd",
        "name": "小爱对话",
        "server": "466483fcf144a9ea",
        "version": 5,
        "outputs": 1,
        "exposeAsEntityConfig": "",
        "entityId": "sensor.xiaomi_lx06_0f65_conversation",
        "entityIdType": "exact",
        "outputInitially": false,
        "stateType": "str",
        "ifState": "",
        "ifStateType": "str",
        "ifStateOperator": "is",
        "outputOnlyOnStateChange": false,
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": true,
        "ignoreCurrentStateUnavailable": true,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "data",
                "propertyType": "msg",
                "value": "",
                "valueType": "eventData"
            },
            {
                "property": "topic",
                "propertyType": "msg",
                "value": "",
                "valueType": "triggerId"
            }
        ],
        "x": 2280,
        "y": 600,
        "wires": [
            [
                "532cdc2b77c65a99"
            ]
        ]
    },
    {
        "id": "532cdc2b77c65a99",
        "type": "switch",
        "z": "021363853122b3fd",
        "name": "判断是否含退出停止",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "cont",
                "v": "退出本地播放",
                "vt": "str"
            },
            {
                "t": "cont",
                "v": "停止本地播放",
                "vt": "str"
            },
            {
                "t": "cont",
                "v": "取消本地播放",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "上一首",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "上一曲",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "下一曲",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "下一首",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 7,
        "x": 2480,
        "y": 560,
        "wires": [
            [
                "2f241251fa501c4f"
            ],
            [
                "2f241251fa501c4f"
            ],
            [
                "2f241251fa501c4f"
            ],
            [
                "7c956359a5f2fb1d"
            ],
            [
                "7c956359a5f2fb1d"
            ],
            [
                "91d2fda4f9157393"
            ],
            [
                "91d2fda4f9157393"
            ]
        ]
    },
    {
        "id": "2f241251fa501c4f",
        "type": "function",
        "z": "021363853122b3fd",
        "name": "循环参数break",
        "func": "global.set("playMusiccommand", "break")\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2720,
        "y": 520,
        "wires": [
            []
        ]
    },
    {
        "id": "21db4fbe060fa13d",
        "type": "change",
        "z": "021363853122b3fd",
        "name": "设定播放序列",
        "rules": [
            {
                "t": "set",
                "p": "playMusicIndex",
                "pt": "global",
                "to": "0",
                "tot": "num"
            },
            {
                "t": "set",
                "p": "playMusiccommand",
                "pt": "global",
                "to": "play",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "PlayMusicpayload",
                "pt": "global",
                "to": "payload",
                "tot": "msg",
                "dc": true
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 2380,
        "y": 780,
        "wires": [
            [
                "5c41ebe526e08fa4"
            ]
        ]
    },
    {
        "id": "91d2fda4f9157393",
        "type": "function",
        "z": "021363853122b3fd",
        "name": "播放序列+1",
        "func": "var playMusicIndex = global.get("playMusicIndex")\nglobal.set("playMusicIndex", playMusicIndex+1)\nmsg.payload = global.get("PlayMusicpayload")\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2710,
        "y": 720,
        "wires": [
            [
                "5c41ebe526e08fa4"
            ]
        ]
    },
    {
        "id": "57bdc1fbc0e32799",
        "type": "join",
        "z": "021363853122b3fd",
        "name": "",
        "mode": "custom",
        "build": "array",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 670,
        "y": 400,
        "wires": [
            [
                "6aa4da5dba8a97ba"
            ]
        ]
    },
    {
        "id": "6aa4da5dba8a97ba",
        "type": "function",
        "z": "021363853122b3fd",
        "name": "",
        "func": "msg.payload = msg.payload[1]\nreturn msg;",
        "outputs": 1,
        "timeout": "",
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 790,
        "y": 400,
        "wires": [
            [
                "cfd9892bf243c73e"
            ]
        ]
    },
    {
        "id": "7c956359a5f2fb1d",
        "type": "function",
        "z": "021363853122b3fd",
        "name": "播放序列-1",
        "func": "var playMusicIndex = global.get("playMusicIndex")\nglobal.set("playMusicIndex", playMusicIndex-1)\nmsg.payload = global.get("PlayMusicpayload")\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2710,
        "y": 680,
        "wires": [
            [
                "5c41ebe526e08fa4"
            ]
        ]
    },
    {
        "id": "ba8b79e5d9da1a41",
        "type": "server-state-changed",
        "z": "021363853122b3fd",
        "name": "小爱状态",
        "server": "466483fcf144a9ea",
        "version": 5,
        "outputs": 1,
        "exposeAsEntityConfig": "",
        "entityId": "media_player.xiaomi_lx06_0f65_play_control",
        "entityIdType": "exact",
        "outputInitially": false,
        "stateType": "str",
        "ifState": "",
        "ifStateType": "str",
        "ifStateOperator": "is",
        "outputOnlyOnStateChange": true,
        "for": "5",
        "forType": "num",
        "forUnits": "seconds",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "data",
                "propertyType": "msg",
                "value": "",
                "valueType": "eventData"
            },
            {
                "property": "topic",
                "propertyType": "msg",
                "value": "",
                "valueType": "triggerId"
            }
        ],
        "x": 2280,
        "y": 720,
        "wires": [
            [
                "9a8317d64d45a148",
                "a6cdab81aa9b2323"
            ]
        ]
    },
    {
        "id": "34d52cfd2323e888",
        "type": "debug",
        "z": "021363853122b3fd",
        "name": "debug 13",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1190,
        "y": 380,
        "wires": []
    },
    {
        "id": "c29fcc59c251a44e",
        "type": "delay",
        "z": "021363853122b3fd",
        "name": "",
        "pauseType": "delay",
        "timeout": "4",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 3120,
        "y": 780,
        "wires": [
            [
                "012d3bd954d0d22a"
            ]
        ]
    },
    {
        "id": "e41c82303c5a303f",
        "type": "debug",
        "z": "021363853122b3fd",
        "name": "debug 14",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 3100,
        "y": 700,
        "wires": []
    },
    {
        "id": "466483fcf144a9ea",
        "type": "server",
        "name": "Home Assistant",
        "version": 5,
        "addon": false,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true,
        "cacheJson": true,
        "heartbeat": true,
        "heartbeatInterval": "30",
        "areaSelector": "friendlyName",
        "deviceSelector": "friendlyName",
        "entitySelector": "friendlyName",
        "statusSeparator": ": ",
        "statusYear": "hidden",
        "statusMonth": "short",
        "statusDay": "numeric",
        "statusHourCycle": "default",
        "statusTimeFormat": "h:m",
        "enableGlobalContextStore": false
    },
    {
        "id": "f36c15f97a0bea15",
        "type": "xiaoai-tts-configurator",
        "name": ""
    }
]



流程图

流程图

alist

alist
屏幕截图 2023-10-27 233237.png

flows.zip

4.29 KB, 下载次数: 36

flows.json

评分

参与人数 1金钱 +10 收起 理由
隔壁的王叔叔 + 10 感谢楼主分享!

查看全部评分

回复

使用道具 举报

3

主题

154

帖子

1764

积分

金牌会员

Rank: 6Rank: 6

积分
1764
金钱
1610
HASS币
10
发表于 2023-10-28 00:56:53 | 显示全部楼层
这个可以有
回复

使用道具 举报

10

主题

1332

帖子

4254

积分

论坛元老

Rank: 8Rank: 8

积分
4254
金钱
2922
HASS币
0
发表于 2023-10-28 14:10:17 | 显示全部楼层
很棒,我是跟大佬一起,现在都可以投送小雅的电影了,思路也是通过查找功能。你这个没有用Python,很不错,我抄抄作业。
回复

使用道具 举报

10

主题

1332

帖子

4254

积分

论坛元老

Rank: 8Rank: 8

积分
4254
金钱
2922
HASS币
0
发表于 2023-10-28 14:12:13 | 显示全部楼层
大佬,把流导出来吧,贴进去的代码有些被转义了。
回复

使用道具 举报

1

主题

26

帖子

150

积分

注册会员

Rank: 2

积分
150
金钱
124
HASS币
0
发表于 2023-10-28 15:39:47 | 显示全部楼层
看着代码,望而却步
回复

使用道具 举报

8

主题

870

帖子

5218

积分

论坛元老

Rank: 8Rank: 8

积分
5218
金钱
4348
HASS币
0
发表于 2023-11-5 10:20:10 | 显示全部楼层
mark 留着学习,谢谢分享
回复

使用道具 举报

0

主题

8

帖子

82

积分

注册会员

Rank: 2

积分
82
金钱
74
HASS币
0
发表于 2024-3-11 09:55:52 | 显示全部楼层
大佬带屏的小爱怎么搞啊,试了小爱art可以,但是小爱触屏版和小爱智能家庭屏没反应呢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-25 16:54 , Processed in 0.537479 second(s), 33 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表