[
{
"id": "1c893a2.860cac6",
"type": "tab",
"label": "tts",
"disabled": false,
"info": ""
},
{
"id": "f3e70c14.b85b7",
"type": "http request",
"z": "1c893a2.860cac6",
"name": "Post TTS ",
"method": "POST",
"ret": "obj",
"paytoqs": "query",
"url": "http://192.168.1.2:8123/api/tts_get_url",
"tls": "",
"persist": false,
"proxy": "",
"authType": "bearer",
"senderr": false,
"x": 700,
"y": 380,
"wires": [
[
"2ce1858.4ed177a",
"23f0804377564bc6"
]
]
},
{
"id": "ac8fe3a0.fc39b",
"type": "inject",
"z": "1c893a2.860cac6",
"name": "",
"props": [
{
"p": "payload",
"v": "",
"vt": "date"
},
{
"p": "topic",
"v": "",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 280,
"y": 320,
"wires": [
[
"85e920ac.9be84"
]
]
},
{
"id": "85e920ac.9be84",
"type": "function",
"z": "1c893a2.860cac6",
"name": "google TTS setting",
"func": "msg.headers = {};\nmsg.headers={\n 'Content-Type': 'application/json'\n};\nmsg.payload = {\n "message": '当前光猫温度为: ' + msg.payload + '摄氏度',\n "platform": "google_translate",\n "language": "zh-CN"\n};\n\nreturn msg",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 510,
"y": 380,
"wires": [
[
"f3e70c14.b85b7"
]
]
},
{
"id": "2ce1858.4ed177a",
"type": "function",
"z": "1c893a2.860cac6",
"name": "Get media path",
"func": "\nmsg.headers={\n 'Content-Type': 'application/json'\n};\n\nmsg.payload = msg.payload.url;\n\nreturn msg",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 880,
"y": 380,
"wires": [
[
"f0401e4e4132c326",
"07da12be0285394b"
]
]
},
{
"id": "23f0804377564bc6",
"type": "debug",
"z": "1c893a2.860cac6",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 870,
"y": 440,
"wires": []
},
{
"id": "f0401e4e4132c326",
"type": "debug",
"z": "1c893a2.860cac6",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1130,
"y": 320,
"wires": []
},
{
"id": "07da12be0285394b",
"type": "mqtt out",
"z": "1c893a2.860cac6",
"name": "",
"topic": "mrdiynotifier/play",
"qos": "1",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "8a1c1b60.7c6f78",
"x": 1130,
"y": 380,
"wires": []
},
{
"id": "8724d3986b246ba8",
"type": "server-state-changed",
"z": "1c893a2.860cac6",
"name": "pon temperature",
"server": "e8349c19021c66e6",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "sensor.pon_temp",
"entityidfiltertype": "substring",
"outputinitially": false,
"state_type": "num",
"haltifstate": "",
"halt_if_type": "num",
"halt_if_compare": "gte",
"outputs": 1,
"output_only_on_state_change": true,
"for": "",
"forType": "num",
"forUnits": "seconds",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"x": 280,
"y": 380,
"wires": [
[
"85e920ac.9be84"
]
]
},
{
"id": "8a1c1b60.7c6f78",
"type": "mqtt-broker",
"name": "Mosquitto",
"broker": "192.168.1.2",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
},
{
"id": "e8349c19021c66e6",
"type": "server",
"name": "Home Assistant",
"version": 2,
"addon": false,
"rejectUnauthorizedCerts": false,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": true,
"heartbeatInterval": "30"
}
]