[{"id":"01890003a0ea5367","type":"tab","label":"流程 1","disabled":true,"info":"","env":[]},{"id":"94f64b498c3a9b49","type":"tab","label":"流程 2","disabled":false,"info":"","env":[]},{"id":"fb55e3ab9abe5c40","type":"ezviz-configurator","name":"","client_id":"0230e5c716a04e76befccefd45edb510","client_secret":"8feef1fbd349533a6e35e1b70aeaa002"},{"id":"b7a5e998.62a508","type":"baidu-tts-server","name":"百度TTS配置样例","appID":"24649978","apiKey":"OfMHW2bm6f8nCYGpkrBWyQkU","secretKey":"3fpTusnh9ML37AEs1cmiIHKM7qfXX31U"},{"id":"e4e6e227eeb15f55","type":"server","name":"Home Assistant","version":2,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"},{"id":"e295bd00.6875f","type":"function","z":"01890003a0ea5367","name":"萤石appkey&appsecret","func":"msg.headers={\n 'Content-Type':'application/x-www-form-urlencoded',\n}\nmsg.payload={\n "appKey":"0230e5c716a04e76befccefd45edb510",\n "appSecret":"8feef1fbd349533a6e35e1b70aeaa002"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":540,"wires":[["b6de2172.7894"]]},{"id":"b6de2172.7894","type":"http request","z":"01890003a0ea5367","name":"","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://open.ys7.com/api/lapp/token/get","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":540,"y":540,"wires":[["ada5c087.d9e7d"]]},{"id":"58b8501a.8f147","type":"inject","z":"01890003a0ea5367","name":"获取萤石云token","props":[{"p":"payload"}],"repeat":"","crontab":"00 02 * * 1","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":130,"y":540,"wires":[["e295bd00.6875f"]]},{"id":"ada5c087.d9e7d","type":"change","z":"01890003a0ea5367","name":"","rules":[{"t":"set","p":"萤石token","pt":"global","to":"payload.data.accessToken","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":540,"wires":[[]]},{"id":"e5c3f635.5e07b8","type":"comment","z":"01890003a0ea5367","name":"获取萤石云token","info":"","x":120,"y":580,"wires":[]},{"id":"1204021c.a16b5e","type":"comment","z":"01890003a0ea5367","name":"百度云tts萤石摄像头播放","info":"","x":1490,"y":760,"wires":[]},{"id":"ba216c06e6f5e7c7","type":"ezviz-capture","z":"01890003a0ea5367","name":"","ezviz":"fb55e3ab9abe5c40","deviceSerial":"C50709265","channelNo":1,"x":440,"y":640,"wires":[["210ad51568645b27"],["84639f09e417e8bc"]]},{"id":"5186dcaa74171c68","type":"inject","z":"01890003a0ea5367","name":"萤石云摄像头配合离线人脸识别系统","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":190,"y":620,"wires":[["ba216c06e6f5e7c7"]]},{"id":"8d5aa812adad9bcf","type":"image","z":"01890003a0ea5367","name":"图片显示","width":160,"data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":1060,"y":640,"wires":[]},{"id":"a32c25c127325385","type":"http request","z":"01890003a0ea5367","name":"图片获取","method":"GET","ret":"bin","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":760,"y":640,"wires":[["323a098398ac755c"]]},{"id":"210ad51568645b27","type":"change","z":"01890003a0ea5367","name":"提取url","rules":[{"t":"move","p":"payload.picUrl","pt":"msg","to":"url","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":640,"wires":[["a32c25c127325385"]]},{"id":"323a098398ac755c","type":"base64","z":"01890003a0ea5367","name":"","action":"","property":"payload","x":900,"y":640,"wires":[["8d5aa812adad9bcf","d006760cd2ae7e98"]]},{"id":"6ccf0dfcf461cad4","type":"http request","z":"01890003a0ea5367","name":"人脸识别","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://192.168.3.6:8080/faceSearch","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":1180,"y":680,"wires":[["311763f1aeba241e"]]},{"id":"d006760cd2ae7e98","type":"function","z":"01890003a0ea5367","name":"","func":"msg.headers = {\n "Content-Type" : "application/json"\n}\nconst a = msg.payload\nmsg.payload = a\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":680,"wires":[["6ccf0dfcf461cad4"]]},{"id":"311763f1aeba241e","type":"json","z":"01890003a0ea5367","name":"","property":"payload","action":"","pretty":true,"x":350,"y":800,"wires":[["335e630d88d45338"]]},{"id":"4ff056fdb9a364f1","type":"function","z":"01890003a0ea5367","name":"整理数据","func":"msg.token=global.get('萤石token')\nmsg.payload = {\n file: {\n field: 'voiceFile',\n data: msg.data,\n type: 'binary',\n name: 'tts'\n },\n formOptions: {\n accessToken: `${msg.token}`,\n deviceSerial:'C50709265',\n }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1260,"y":800,"wires":[["5f6b3dd7e1982835"]]},{"id":"6adc44456084b3e6","type":"baidu-tts","z":"01890003a0ea5367","server":"b7a5e998.62a508","data":"","spd":"5","pit":"7","vol":"0","per":"0","path":"","x":1120,"y":800,"wires":[["4ff056fdb9a364f1"]]},{"id":"0375af5e0ad59a8a","type":"api-current-state","z":"01890003a0ea5367","name":"天气信息推送","server":"e4e6e227eeb15f55","version":2,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"weather.wo_de_jia","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":680,"y":820,"wires":[["89bd0970aee267fd"]]},{"id":"e79cc52163033de9","type":"template","z":"01890003a0ea5367","name":"","field":"data","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload.data.name}}","output":"str","x":830,"y":780,"wires":[["62f3ddfa57916f1f"]]},{"id":"335e630d88d45338","type":"switch","z":"01890003a0ea5367","name":"","property":"payload.data","propertyType":"msg","rules":[{"t":"nnull"},{"t":"null"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":800,"wires":[["e79cc52163033de9","0375af5e0ad59a8a"],["84639f09e417e8bc"]]},{"id":"89bd0970aee267fd","type":"template","z":"01890003a0ea5367","name":"","field":"data","fieldType":"msg","format":"handlebars","syntax":"mustache","template":" 你好,今 天 天 气{{payload.attributes.forecast_hourly}},进出门不要忘记东西!","output":"str","x":830,"y":820,"wires":[["62f3ddfa57916f1f"]]},{"id":"62f3ddfa57916f1f","type":"join","z":"01890003a0ea5367","name":"","mode":"custom","build":"string","property":"data","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"0.1","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":990,"y":800,"wires":[["6adc44456084b3e6"]]},{"id":"b4245247241923b7","type":"server-state-changed","z":"01890003a0ea5367","name":"","server":"e4e6e227eeb15f55","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.ren_ti_tan_ce","entityidfiltertype":"substring","outputinitially":false,"state_type":"str","haltifstate":"1","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":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":180,"y":660,"wires":[["ba216c06e6f5e7c7"],[]]},{"id":"84639f09e417e8bc","type":"api-current-state","z":"01890003a0ea5367","name":"天气信息推送","server":"e4e6e227eeb15f55","version":2,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"weather.wo_de_jia","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":140,"y":880,"wires":[["8dce136f0e93ec22"]]},{"id":"8dce136f0e93ec22","type":"template","z":"01890003a0ea5367","name":"","field":"data","fieldType":"msg","format":"handlebars","syntax":"mustache","template":" 你好,今天天气{{payload.attributes.forecast_hourly}},进出门不要忘记东西!","output":"str","x":290,"y":880,"wires":[["abcbb11316705276"]]},{"id":"abcbb11316705276","type":"join","z":"01890003a0ea5367","name":"","mode":"custom","build":"string","property":"data","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"0.1","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":410,"y":880,"wires":[["a731f7c247b490e3","0e58d42f20f21db0","e23b96f019428762"]]},{"id":"a731f7c247b490e3","type":"baidu-tts","z":"01890003a0ea5367","server":"b7a5e998.62a508","data":"","spd":"5","pit":"7","vol":"0","per":"0","path":"","x":540,"y":880,"wires":[["9214298eab0615bd"]]},{"id":"9214298eab0615bd","type":"function","z":"01890003a0ea5367","name":"整理数据","func":"msg.token=global.get('萤石token')\nmsg.payload = {\n file: {\n field: 'voiceFile',\n data: msg.data,\n type: 'binary',\n name: 'tts'\n },\n formOptions: {\n accessToken: `${msg.token}`,\n deviceSerial:'C50709265',\n }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":680,"y":880,"wires":[["62b9e2fa4c213772"]]},{"id":"5f6b3dd7e1982835","type":"http-send-multipart-form-v3","z":"01890003a0ea5367","name":"摄像头播放","filetype":"binary","formparts":"","ret":"txt","url":"https://open.ys7.com/api/lapp/voice/sendonce","tls":"","sendrequest":false,"x":1410,"y":800,"wires":[[]]},{"id":"62b9e2fa4c213772","type":"http-send-multipart-form-v3","z":"01890003a0ea5367","name":"摄像头播放","filetype":"binary","formparts":"","ret":"txt","url":"https://open.ys7.com/api/lapp/voice/sendonce","tls":"","sendrequest":false,"x":830,"y":880,"wires":[[]]},{"id":"0e58d42f20f21db0","type":"api-call-service","z":"01890003a0ea5367","name":"edge浏览器_tts播放","server":"e4e6e227eeb15f55","version":3,"debugenabled":false,"service_domain":"tts","service":"edge_tts_say","entityId":"media_player.f1390804_c9b99f05","data":"{"message": msg.data &",天气情况播报:"& $entities("weather.wo_de_jia").attributes.forecast_hourly,"language":"zh-CN-XiaoxiaoNeural"}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","x":720,"y":1100,"wires":[[]]},{"id":"e23b96f019428762","type":"debug","z":"01890003a0ea5367","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"data","targetType":"msg","statusVal":"","statusType":"auto","x":920,"y":1100,"wires":[]},{"id":"8a619cf8d90e2d24","type":"function","z":"94f64b498c3a9b49","name":"萤石appkey&appsecret","func":"msg.headers={\n 'Content-Type':'application/x-www-form-urlencoded',\n}\nmsg.payload={\n "appKey":"0230e5c716a04e76befccefd45edb510",\n "appSecret":"8feef1fbd349533a6e35e1b70aeaa002"\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":580,"wires":[["0c54377f68e3f6af"]]},{"id":"0c54377f68e3f6af","type":"http request","z":"94f64b498c3a9b49","name":"","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://open.ys7.com/api/lapp/token/get","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":540,"y":580,"wires":[["9989c0d295033385"]]},{"id":"952f025ff4565d19","type":"inject","z":"94f64b498c3a9b49","name":"获取萤石云token","props":[{"p":"payload"}],"repeat":"","crontab":"00 02 * * 1","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":130,"y":580,"wires":[["8a619cf8d90e2d24"]]},{"id":"9989c0d295033385","type":"change","z":"94f64b498c3a9b49","name":"","rules":[{"t":"set","p":"萤石token","pt":"global","to":"payload.data.accessToken","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":580,"wires":[[]]},{"id":"372cb63b40ff4bb1","type":"comment","z":"94f64b498c3a9b49","name":"获取萤石云token","info":"","x":120,"y":620,"wires":[]},{"id":"9f07abb6e1df1f01","type":"ezviz-capture","z":"94f64b498c3a9b49","name":"","ezviz":"fb55e3ab9abe5c40","deviceSerial":"C50709265","channelNo":1,"x":440,"y":680,"wires":[["ea1d576a1c2b0440"],["0546c8e10d953394"]]},{"id":"09499f973e34d0b1","type":"inject","z":"94f64b498c3a9b49","name":"萤石云摄像头配合离线人脸识别系统","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":190,"y":660,"wires":[["9f07abb6e1df1f01","615ee4a0b0f5dffd"]]},{"id":"f76dfb0cdebdbcc5","type":"image","z":"94f64b498c3a9b49","name":"图片显示","width":160,"data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":1080,"y":580,"wires":[]},{"id":"186c1ed7c768f7cc","type":"http request","z":"94f64b498c3a9b49","name":"图片获取","method":"GET","ret":"bin","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":760,"y":680,"wires":[["63dda3bb5c5444c8"]]},{"id":"ea1d576a1c2b0440","type":"change","z":"94f64b498c3a9b49","name":"提取url","rules":[{"t":"move","p":"payload.picUrl","pt":"msg","to":"url","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":680,"wires":[["186c1ed7c768f7cc"]]},{"id":"63dda3bb5c5444c8","type":"base64","z":"94f64b498c3a9b49","name":"","action":"","property":"payload","x":900,"y":680,"wires":[["f76dfb0cdebdbcc5","fe146552c5532d3a"]]},{"id":"f55119ea9b0644fd","type":"http request","z":"94f64b498c3a9b49","name":"人脸识别","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://192.168.3.6:8080/faceSearch","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":1200,"y":740,"wires":[["328d020bbe206687"]]},{"id":"fe146552c5532d3a","type":"function","z":"94f64b498c3a9b49","name":"","func":"msg.headers = {\n "Content-Type" : "application/json"\n}\nconst a = msg.payload\nmsg.payload = a\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":740,"wires":[["f55119ea9b0644fd"]]},{"id":"328d020bbe206687","type":"json","z":"94f64b498c3a9b49","name":"","property":"payload","action":"","pretty":true,"x":350,"y":840,"wires":[["ddc95c3706ea30c3"]]},{"id":"b1d2e80265b72e10","type":"api-current-state","z":"94f64b498c3a9b49","name":"天气信息推送","server":"e4e6e227eeb15f55","version":2,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"weather.wo_de_jia","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":680,"y":860,"wires":[["3f213ec068de96c2"]]},{"id":"bb388e64dd6a31b0","type":"template","z":"94f64b498c3a9b49","name":"","field":"data","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload.data.name}}","output":"str","x":830,"y":820,"wires":[["83388be6b0057e5d"]]},{"id":"ddc95c3706ea30c3","type":"switch","z":"94f64b498c3a9b49","name":"","property":"payload.data","propertyType":"msg","rules":[{"t":"nnull"},{"t":"null"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":840,"wires":[["bb388e64dd6a31b0","b1d2e80265b72e10"],["0546c8e10d953394"]]},{"id":"3f213ec068de96c2","type":"template","z":"94f64b498c3a9b49","name":"","field":"data","fieldType":"msg","format":"handlebars","syntax":"mustache","template":" 你好,今天天气{{payload.attributes.forecast_hourly}},进出门不要忘记东西!","output":"str","x":830,"y":860,"wires":[["83388be6b0057e5d"]]},{"id":"0bd583fc6ac2103d","type":"server-state-changed","z":"94f64b498c3a9b49","name":"","server":"e4e6e227eeb15f55","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.ren_ti_tan_ce","entityidfiltertype":"substring","outputinitially":false,"state_type":"str","haltifstate":"1","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":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":180,"y":700,"wires":[["9f07abb6e1df1f01"],[]]},{"id":"0546c8e10d953394","type":"api-current-state","z":"94f64b498c3a9b49","name":"天气信息推送","server":"e4e6e227eeb15f55","version":2,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"weather.wo_de_jia","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":180,"y":900,"wires":[["666ad5dfb1a58bc3"]]},{"id":"666ad5dfb1a58bc3","type":"template","z":"94f64b498c3a9b49","name":"","field":"data","fieldType":"msg","format":"handlebars","syntax":"mustache","template":" 你好,今天天气{{payload.attributes.forecast_hourly}},进出门不要忘记东西!","output":"str","x":330,"y":900,"wires":[["09ec890d70fa38c7"]]},{"id":"09ec890d70fa38c7","type":"join","z":"94f64b498c3a9b49","name":"","mode":"custom","build":"string","property":"data","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"0.1","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":450,"y":900,"wires":[["fc5f19a627460952"]]},{"id":"fc5f19a627460952","type":"api-call-service","z":"94f64b498c3a9b49","name":"edge浏览器_tts播放","server":"e4e6e227eeb15f55","version":3,"debugenabled":false,"service_domain":"tts","service":"edge_tts_say","entityId":"media_player.f1390804_c9b99f05","data":"{"message": msg.data,"language":"zh-CN-XiaoxiaoNeural"}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","x":1120,"y":900,"wires":[["53f6a695a218e072"]]},{"id":"53f6a695a218e072","type":"debug","z":"94f64b498c3a9b49","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"data","targetType":"msg","statusVal":"","statusType":"auto","x":1300,"y":900,"wires":[]},{"id":"83388be6b0057e5d","type":"join","z":"94f64b498c3a9b49","name":"","mode":"custom","build":"string","property":"data","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"0.1","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":950,"y":840,"wires":[["fc5f19a627460952"]]},{"id":"490a31ad89490eed","type":"api-call-service","z":"94f64b498c3a9b49","name":"edge浏览器_tts播放_模板","server":"e4e6e227eeb15f55","version":3,"debugenabled":false,"service_domain":"tts","service":"edge_tts_say","entityId":"media_player.f1390804_c9b99f05","data":"{"message": msg.data &",天气情况播报:"& $entities("weather.wo_de_jia").attributes.forecast_hourly,"language":"zh-CN-XiaoxiaoNeural"}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","x":1170,"y":1020,"wires":[[]]},{"id":"615ee4a0b0f5dffd","type":"debug","z":"94f64b498c3a9b49","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"data","targetType":"msg","statusVal":"","statusType":"auto","x":420,"y":640,"wires":[]}]