-
Notifications
You must be signed in to change notification settings - Fork 3
/
nodered.txt
1 lines (1 loc) · 18.8 KB
/
nodered.txt
1
[{"id":"9ae60f26c3bbbae3","type":"tab","label":"寝室电脑","disabled":false,"info":"","env":[]},{"id":"2b24c51789a3a1e2","type":"mqtt in","z":"9ae60f26c3bbbae3","name":"","topic":"dnkz005","qos":"2","datatype":"auto-detect","broker":"8facc376b85fc99b","nl":false,"rap":true,"rh":0,"inputs":0,"x":660,"y":340,"wires":[["b20eba0d749c2935"]]},{"id":"7a031b61984e84ac","type":"api-call-service","z":"9ae60f26c3bbbae3","name":"","server":"e242470a.23fca8","version":5,"debugenabled":false,"domain":"button","service":"press","areaId":[],"deviceId":[],"entityId":["button.pc"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":320,"wires":[[]]},{"id":"268082cd33a5cd34","type":"ping","z":"9ae60f26c3bbbae3","protocol":"IPv4","mode":"timed","name":"","host":"192.168.44.236","timer":"15","inputs":0,"x":80,"y":560,"wires":[["68e68ace5b000520"]]},{"id":"68e68ace5b000520","type":"switch","z":"9ae60f26c3bbbae3","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"neq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":560,"wires":[["e93936a5cfad5608"],["8f21f8b874fc93b8","005594cc6b0e8eae"]]},{"id":"8f21f8b874fc93b8","type":"function","z":"9ae60f26c3bbbae3","name":"转换","func":"var a =msg.payload\nmsg.payload = {\n data: {\n value: Math.ceil(a)\n }\n}\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":650,"y":620,"wires":[["d5e2f7b99e651a90"]]},{"id":"d5e2f7b99e651a90","type":"api-call-service","z":"9ae60f26c3bbbae3","name":"延迟设置","server":"e242470a.23fca8","version":5,"debugenabled":false,"domain":"input_number","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_number.qin_shi_dian_nao_yan_chi"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":800,"y":620,"wires":[[]]},{"id":"e93936a5cfad5608","type":"api-current-state","z":"9ae60f26c3bbbae3","name":"延迟状态","server":"e242470a.23fca8","version":3,"outputs":2,"halt_if":"0","halt_if_type":"num","halt_if_compare":"is_not","entity_id":"input_number.qin_shi_dian_nao_yan_chi","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"off","valueType":"str"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":640,"y":520,"wires":[["ad7aba78a630aadd","a60c0ea426529e08","4cb0b6cee5201b55"],[]]},{"id":"ad7aba78a630aadd","type":"mqtt out","z":"9ae60f26c3bbbae3","name":"off","topic":"qspc","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"640feb3d6d01d2ee","x":830,"y":540,"wires":[]},{"id":"12d3334eba700819","type":"api-call-service","z":"9ae60f26c3bbbae3","name":"延迟设置","server":"e242470a.23fca8","version":5,"debugenabled":false,"domain":"input_number","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_number.qin_shi_dian_nao_yan_chi"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1000,"y":500,"wires":[[]]},{"id":"a60c0ea426529e08","type":"function","z":"9ae60f26c3bbbae3","name":"function 11","func":"\nmsg.payload = {\n data: {\n value: 0\n }\n}\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":500,"wires":[["12d3334eba700819"]]},{"id":"e10ef0b33ff6924f","type":"mqtt out","z":"9ae60f26c3bbbae3","name":"on","topic":"qspc","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"640feb3d6d01d2ee","x":970,"y":680,"wires":[]},{"id":"005594cc6b0e8eae","type":"api-current-state","z":"9ae60f26c3bbbae3","name":"副屏开关","server":"e242470a.23fca8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.fu_ping","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"on","valueType":"str"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":640,"y":680,"wires":[["12425e23860d2d6a"],[]]},{"id":"12425e23860d2d6a","type":"api-current-state","z":"9ae60f26c3bbbae3","name":"是否启动","server":"e242470a.23fca8","version":3,"outputs":2,"halt_if":"false","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.fu_ping_qi_dong","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"on","valueType":"str"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":800,"y":700,"wires":[["e10ef0b33ff6924f","49f947ed3fbfc441"],[]]},{"id":"49f947ed3fbfc441","type":"api-call-service","z":"9ae60f26c3bbbae3","name":"标记启动","server":"e242470a.23fca8","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.fu_ping_qi_dong"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":980,"y":740,"wires":[[]]},{"id":"4cb0b6cee5201b55","type":"api-call-service","z":"9ae60f26c3bbbae3","name":"标记关闭","server":"e242470a.23fca8","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.fu_ping_qi_dong"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":840,"y":440,"wires":[[]]},{"id":"0e4196ecc88aa169","type":"comment","z":"9ae60f26c3bbbae3","name":"开机","info":"","x":650,"y":300,"wires":[]},{"id":"027b0bc708d588fd","type":"comment","z":"9ae60f26c3bbbae3","name":"延迟统计","info":"","x":60,"y":520,"wires":[]},{"id":"ea00a22e172a300f","type":"server-state-changed","z":"9ae60f26c3bbbae3","name":"关机按钮","server":"e242470a.23fca8","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.qin_shi_dian_nao_guan_ji","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":"off","valueType":"str"}],"x":960,"y":960,"wires":[["1d1010534509b829"]]},{"id":"11390bef81e7be9d","type":"comment","z":"9ae60f26c3bbbae3","name":"关机MQTT","info":"","x":960,"y":920,"wires":[]},{"id":"1d1010534509b829","type":"mqtt out","z":"9ae60f26c3bbbae3","name":"","topic":"dnkz005","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"640feb3d6d01d2ee","x":1160,"y":960,"wires":[]},{"id":"228b95c67216e65e","type":"server-state-changed","z":"9ae60f26c3bbbae3","name":"显示器亮度","server":"e242470a.23fca8","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_number.xian_shi_qi_liang_du","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"}],"x":140,"y":860,"wires":[["8b876608bad64b2c"]]},{"id":"5635221e5ff5cb12","type":"mqtt out","z":"9ae60f26c3bbbae3","name":"","topic":"monitor002","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8facc376b85fc99b","x":530,"y":860,"wires":[]},{"id":"8b876608bad64b2c","type":"function","z":"9ae60f26c3bbbae3","name":"function 12","func":"msg.payload = 'on$' + Math.floor(msg.payload)\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":860,"wires":[["5635221e5ff5cb12"]]},{"id":"984f4d7a72321230","type":"server-state-changed","z":"9ae60f26c3bbbae3","name":"快捷方式1","server":"e242470a.23fca8","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.dian_nao_kuai_jie_fang_shi_1","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":"on#1","valueType":"str"}],"x":960,"y":1040,"wires":[["bc2c09f3faa0a1ed"]]},{"id":"bc2c09f3faa0a1ed","type":"mqtt out","z":"9ae60f26c3bbbae3","name":"","topic":"dnkz005","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8facc376b85fc99b","x":1160,"y":1040,"wires":[]},{"id":"b20eba0d749c2935","type":"switch","z":"9ae60f26c3bbbae3","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":790,"y":340,"wires":[["7a031b61984e84ac"]]},{"id":"53df1a57808a0329","type":"server-state-changed","z":"9ae60f26c3bbbae3","name":"自动切换","server":"e242470a.23fca8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"input_number.qin_shi_dian_nao_yan_chi","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"0","ifStateType":"num","ifStateOperator":"gt","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"off","valueType":"str"}],"x":140,"y":1140,"wires":[["42a92d35c84826b2","75cca92f08144836"],[]]},{"id":"efe339d32facffe5","type":"mqtt out","z":"9ae60f26c3bbbae3","name":"on","topic":"panelscreen","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"640feb3d6d01d2ee","x":470,"y":1140,"wires":[]},{"id":"f984677e4b4e5a0c","type":"server-state-changed","z":"9ae60f26c3bbbae3","name":"自动切换","server":"e242470a.23fca8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"input_number.qin_shi_dian_nao_yan_chi","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"0","ifStateType":"num","ifStateOperator":"lte","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"off","valueType":"str"}],"x":140,"y":1200,"wires":[["69bd34d15034fb43"],[]]},{"id":"5285e8aeb588b10a","type":"mqtt out","z":"9ae60f26c3bbbae3","name":"ha","topic":"panelapp","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"640feb3d6d01d2ee","x":470,"y":1100,"wires":[]},{"id":"69bd34d15034fb43","type":"mqtt out","z":"9ae60f26c3bbbae3","name":"off","topic":"panelscreen","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"640feb3d6d01d2ee","x":470,"y":1200,"wires":[]},{"id":"42a92d35c84826b2","type":"function","z":"9ae60f26c3bbbae3","name":"function 13","func":"msg.payload = 'ha' \nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":1100,"wires":[["5285e8aeb588b10a"]]},{"id":"75cca92f08144836","type":"function","z":"9ae60f26c3bbbae3","name":"function 14","func":"msg.payload = 'on' \nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":310,"y":1140,"wires":[["efe339d32facffe5"]]},{"id":"73398042c978a642","type":"comment","z":"9ae60f26c3bbbae3","name":"联动电脑电源","info":"","x":150,"y":1100,"wires":[]},{"id":"adad075e1bf7b858","type":"server-state-changed","z":"9ae60f26c3bbbae3","name":"显示器亮度","server":"e242470a.23fca8","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"sensor.mi_8_lite_light_sensor","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"}],"x":140,"y":1320,"wires":[["65d7dc43e3f2432e"]]},{"id":"853a3bb597a1a57b","type":"function","z":"9ae60f26c3bbbae3","name":"function 15","func":"msg.payload = {\n data: {\n value : msg.payload / 3\n }\n}\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":1320,"wires":[["790f991a2c6bd810"]]},{"id":"790f991a2c6bd810","type":"api-call-service","z":"9ae60f26c3bbbae3","name":"","server":"e242470a.23fca8","version":5,"debugenabled":false,"domain":"input_number","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_number.xian_shi_qi_liang_du"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":710,"y":1320,"wires":[[]]},{"id":"65d7dc43e3f2432e","type":"api-current-state","z":"9ae60f26c3bbbae3","name":"开启自动亮度","server":"e242470a.23fca8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.xian_shi_qi_zi_dong_liang_du","state_type":"habool","blockInputOverrides":false,"outputProperties":[],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":340,"y":1320,"wires":[["853a3bb597a1a57b"],[]]},{"id":"c47f636f48321fc9","type":"comment","z":"9ae60f26c3bbbae3","name":"显示器亮度调节","info":"","x":160,"y":820,"wires":[]},{"id":"f14c243795e90c98","type":"comment","z":"9ae60f26c3bbbae3","name":"自动亮度调节","info":"","x":150,"y":1280,"wires":[]},{"id":"c1a0124d4b56aba6","type":"server-state-changed","z":"9ae60f26c3bbbae3","name":"重启","server":"e242470a.23fca8","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.zhong_qi","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":"on#2","valueType":"str"}],"x":950,"y":1100,"wires":[["0d30bba35a8f98b8"]]},{"id":"0d30bba35a8f98b8","type":"mqtt out","z":"9ae60f26c3bbbae3","name":"","topic":"dnkz005","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8facc376b85fc99b","x":1160,"y":1100,"wires":[]},{"id":"740cd7bb01f85221","type":"server-state-changed","z":"9ae60f26c3bbbae3","name":"数据设置","server":"e242470a.23fca8","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"sensor.pc_master_volume","entityIdType":"exact","outputInitially":false,"stateType":"num","ifState":"","ifStateType":"num","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"}],"x":140,"y":1460,"wires":[["1060095278dca731","5a90c2d4b8eff6df"]]},{"id":"af2e31563af3163d","type":"api-call-service","z":"9ae60f26c3bbbae3","name":"设置占用","server":"e242470a.23fca8","version":5,"debugenabled":false,"domain":"input_number","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_number.dian_nao_yin_liang"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":580,"y":1460,"wires":[[]]},{"id":"1060095278dca731","type":"debug","z":"9ae60f26c3bbbae3","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":280,"y":1420,"wires":[]},{"id":"5a90c2d4b8eff6df","type":"function","z":"9ae60f26c3bbbae3","name":"function 16","func":"msg.payload = {\n data: {\n value : msg.payload \n }\n}\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":1460,"wires":[["af2e31563af3163d"]]},{"id":"8facc376b85fc99b","type":"mqtt-broker","name":"bemfa.com","broker":"bemfa.com","port":"9503","tls":"2cdfac6a874b9fd6","clientid":"","autoConnect":true,"usetls":true,"protocolVersion":"4","keepalive":"55","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"e242470a.23fca8","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"640feb3d6d01d2ee","type":"mqtt-broker","name":"local","broker":"192.168.43.10","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"2cdfac6a874b9fd6","type":"tls-config","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":true,"alpnprotocol":""}]