19 lines
454 B
HTML
19 lines
454 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Script example</title>
|
|
</head>
|
|
<body>
|
|
<p></p>
|
|
<img id="img" src="" alt="Trulli" width="500" height="333">
|
|
<p id="eventDetails"></p>
|
|
<script>
|
|
setInterval(() => fetch('http://192.168.11.10:8090/scripting/test/doors')
|
|
.then(response => response.json())
|
|
.then(r => {
|
|
document.getElementById("img").src = r.path;
|
|
document.getElementById("eventDetails").innerText = r.name;
|
|
}), 1000)
|
|
</script>
|
|
</body>
|
|
</html> |