Make proper flirc integration/addon for hass
Bluscream opened this issue · 0 comments
Bluscream commented
Here are some references:
- https://support.flirc.tv/hc/en-us/articles/203688495-Using-Command-Line-with-Flirc
- https://flirc.gitbooks.io/flirc-instructions/content/command-line-interface-guide/commands.html
- https://forum.flirc.tv/index.php?/topic/11540-generic-ir-receiver-ideally-ir-to-mqtt
- https://forum.flirc.tv/index.php?/topic/2731-transmit-ir-signal-over-flirc-in-a-raspberry/
<?php // session_start();
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
function sendir($pattern, $repeat = 3) {
$cmd = "irtools sendir --ik=23000 --repeat=" . $repeat . " --csv=\"" . $pattern . "\"";
echo($cmd."<br>");
exec($cmd);
}
$repeat = $_GET["repeat"] ?? 0;
if (isset($_GET["pattern"])) {
sendir($_GET["pattern"], $repeat);
}
// header("Location: " . "https://localhost/ir.php");
?>