Радио в сарае
(custom)
<h2>Освещение в сарае</h2>
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=GPIO,12,1')">Включить</button>
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=GPIO,12,0')">Выключить</button>
Радио
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=IRSEND,NEC,FFA857,32')">Тише -</button>
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=IRSEND,NEC,FF906F,32')">Громче +</button>
Канал радио
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=IRSEND,NEC,FF30CF,32')">-1-</button>
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=IRSEND,NEC,FF18E7,32')">-2-</button>
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=IRSEND,NEC,FF7A85,32')">-3-</button>
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=IRSEND,NEC,FF10EF,32')">-4-</button>
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=IRSEND,NEC,FF38C7,32')">-5-</button>
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=IRSEND,NEC,FF5AA5,32')">-6-</button>
Выключатель радио
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=IRSEND,NEC,FFA25D')">POWER</button>
<button type="button" onclick="loadDoc('http://192.168.1.95/control?cmd=IRSEND,NEC,FF629D')">Радио ONLINE</button>
<!--
<hr>
Response: <b><p id="output"></p></b>
-->
<script>
function loadDoc(url) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) {
document.getElementById("output").innerHTML = xhttp.responseText;
}
};
xhttp.open("GET", url, true);
xhttp.send();
}
</script>