[{"id":"9a4fd8c72ce01f36","type":"tab","label":"【導入レシピ】 図面アプリからの設備ON/OFF操作","disabled":false,"info":"","env":[]},{"id":"13608fda243205a3","type":"group","z":"9a4fd8c72ce01f36","name":"設備制御フロー","style":{"stroke":"none","label":true,"fill":"#ffbfbf","fill-opacity":"0.5"},"nodes":["eea49889d2d82605","51a31338466f3b3b","c0b60aab90964777","accf345135cfb8a1"],"x":74,"y":59,"w":672,"h":142},{"id":"78d34a68b18397fe","type":"group","z":"9a4fd8c72ce01f36","name":"状態取得フロー","style":{"fill":"#ffffbf","fill-opacity":"0.5","label":true,"stroke":"none"},"nodes":["49a3ef7ac43c33ee","0cd897e62d573d3a","bea04555a6e345ce","f38f9fa5312f19f7"],"x":74,"y":259,"w":672,"h":162},{"id":"eea49889d2d82605","type":"flm-core-app-notification","z":"9a4fd8c72ce01f36","g":"13608fda243205a3","name":"1号棟 排気ファン ON","notificationMode":"IMMEDIATE","timeout":"30","x":220,"y":100,"wires":[["c0b60aab90964777"]]},{"id":"51a31338466f3b3b","type":"flm-core-app-notification","z":"9a4fd8c72ce01f36","g":"13608fda243205a3","name":"1号棟 排気ファン OFF","notificationMode":"IMMEDIATE","timeout":"30","x":220,"y":160,"wires":[["accf345135cfb8a1"]]},{"id":"c0b60aab90964777","type":"bbus-r2p2","z":"9a4fd8c72ce01f36","g":"13608fda243205a3","name":"排気ファンをON","machineCode":"","queueWaitTimeoutSecs":"60","retry":"1","priority":"MEDIUM","unitAddress":"1","command":"CONTROL","controlPorts":[{"port":"1","controlKind":"ON","delay":"0","controlTimeMs":"1000"},{"port":"2","controlKind":"NONE","delay":"0","controlTimeMs":"0"}],"x":630,"y":100,"wires":[[],[]]},{"id":"accf345135cfb8a1","type":"bbus-r2p2","z":"9a4fd8c72ce01f36","g":"13608fda243205a3","name":"排気ファンをOFF","machineCode":"","queueWaitTimeoutSecs":"60","retry":"1","priority":"MEDIUM","unitAddress":"1","command":"CONTROL","controlPorts":[{"port":"1","controlKind":"OFF","delay":"0","controlTimeMs":"1000"},{"port":"2","controlKind":"NONE","delay":"0","controlTimeMs":"0"}],"x":630,"y":160,"wires":[[],[]]},{"id":"49a3ef7ac43c33ee","type":"inject","z":"9a4fd8c72ce01f36","g":"78d34a68b18397fe","name":"1分ごと","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":300,"wires":[["0cd897e62d573d3a"]]},{"id":"0cd897e62d573d3a","type":"bbus-r2p2","z":"9a4fd8c72ce01f36","g":"78d34a68b18397fe","name":"運転状態を読む","machineCode":"","queueWaitTimeoutSecs":"60","retry":"1","priority":"MEDIUM","unitAddress":"1","command":"STATUS","controlPorts":[{"port":"1","controlKind":"NONE","delay":"0","controlTimeMs":"0"},{"port":"2","controlKind":"NONE","delay":"0","controlTimeMs":"0"}],"x":380,"y":300,"wires":[["f38f9fa5312f19f7"],[]]},{"id":"bea04555a6e345ce","type":"flm-core-db-create-time-series","z":"9a4fd8c72ce01f36","g":"78d34a68b18397fe","name":"","source":"","x":630,"y":380,"wires":[]},{"id":"f38f9fa5312f19f7","type":"function","z":"9a4fd8c72ce01f36","g":"78d34a68b18397fe","name":"運転状態を取り出す","func":"// このFunctionノードでは、受信したデータを時系列DBに格納するためのフォーマット変換を行う\n\n// msg.source: データソース名\n// ここではNWデバイスの機器コードを指定しているので、必要に応じて変更する\nmsg.source = msg.commandResponseCommunicationLog.sourceMachineCode;\n\n// msg.data: データソースに格納するデータ\n// オブジェクト内に数値・文字列・真偽値型を入れることができる\n// ここではstatusに「ON」「OFF」文字列のいずれかが入るため、input1とinput2に「ON」「OFF」が保存される\nmsg.data = {\n    input1: msg.responseData.controlPorts.find(p => p.port === 1).status,\n    input2: msg.responseData.controlPorts.find(p => p.port === 2).status,\n}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":380,"wires":[["bea04555a6e345ce"]]},{"id":"a03a314ee3e40d31","type":"global-config","env":[],"modules":{"flm-core":"0.0.0","flm-bbus":"0.0.0"}}]