[ { "id": "1e47859e.5ce81a", "type": "function", "namespace": "function", "z": "764195e8.a6309c", "name": "Onkyo ISCP Command", "func": "$hostname = 'Onkyo';\n$port = 60128;\n\n$header=\"ISCP\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x08\\x01\\x00\\x00\\x00\"; #Header, Version etc. siehe ISCP-Doku\n$iscp_command=$message['payload'];\n\n$fp = pfsockopen($hostname, $port);\n\nif (!$fp)\n {\n print 'Onkyo ISCP Command: Stream zum Senden von ' . $iscp_command . ' kann nicht geoeffnet werden';\n die('Fehler');\n }\n\n$packet=$header . \"!1\" . $iscp_command . \"\\x0D\";\nfwrite($fp, $packet);\n\nfclose($fp);\n\nreturn $message; //weiter im Flow", "inputs": 1, "outputs": 1, "noerr": 0, "x": 765, "y": 50, "wires": [ [ { "id": "164c82fc.9a3eed", "port": 0 } ] ] }, { "id": "2804e313.dbe5fc", "type": "template", "namespace": "template", "z": "764195e8.a6309c", "name": "SLI24", "field": "payload", "format": "text", "syntax": "plain", "template": "SLI24", "output": "str", "x": 600, "y": 50, "wires": [ [ { "id": "1e47859e.5ce81a", "port": 0 } ] ] }, { "id": "231f1bfb.9a1554", "type": "function", "namespace": "function", "z": "764195e8.a6309c", "name": "Onkyo ISCP Command", "func": "$hostname = 'Onkyo';\n$port = 60128;\n\n$header=\"ISCP\\x00\\x00\\x00\\x10\\x00\\x00\\x00\\x08\\x01\\x00\\x00\\x00\"; #Header, Version etc. siehe ISCP-Doku\n$iscp_command=$message['payload'];\n\n$fp = pfsockopen($hostname, $port);\n\nif (!$fp)\n {\n print 'Onkyo ISCP Command: Stream zum Senden von ' . $iscp_command . ' kann nicht geoeffnet werden';\n die('Fehler');\n }\n\n$packet=$header . \"!1\" . $iscp_command . \"\\x0D\";\nfwrite($fp, $packet);\n\nfclose($fp);\n\nreturn $message; //weiter im Flow", "inputs": 1, "outputs": 1, "noerr": 0, "x": 1125, "y": 50, "wires": [ [] ] }, { "id": "164c82fc.9a3eed", "type": "template", "namespace": "template", "z": "764195e8.a6309c", "name": "MVL23", "field": "payload", "format": "text", "syntax": "plain", "template": "MVL23", "output": "str", "x": 960, "y": 50, "wires": [ [ { "id": "231f1bfb.9a1554", "port": 0 } ] ] } ]