diff --git a/nginx/default b/nginx/default index d32b58a..faa90d7 100644 --- a/nginx/default +++ b/nginx/default @@ -91,12 +91,15 @@ server { location /projektor/ { proxy_pass http://127.0.0.1:6999/; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Scheme $scheme; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + location /projector/ { + proxy_pass http://projektor.kontor.lapikud.ee/cgi-bin/; } } diff --git a/www/index.html b/www/index.html index 5f97e26..e6c5272 100644 --- a/www/index.html +++ b/www/index.html @@ -1,202 +1,205 @@ - - - - - - + } + - - - - -

Viido

- - Mopidy music
- VNC remote desktop
- -

Projektori juhtimine

- -
- - - - - -
-

Sisendi juhtimine

- -
- - - - - - - - - - -
-
-
- - - - - - - - -
-

Linux audio tunnel

- -pacmd load-module module-tunnel-sink-new server=viido -PULSE_SERVER=viido pavucontrol & -pavucontrol & - - -
- + + + +

Viido

+
+ VNC remote desktop +
+ +

Projektori juhtimine

+ +
+ + +
+

+ +

Sisendi juhtimine

+
+ + + + + + +
+ +

+
+ +
+ + pacmd load-module module-tunnel-sink-new server=viido + PULSE_SERVER=viido pavucontrol & + pavucontrol & + + +
+ - + } + }; + xhr.send(); + } + + query_projector('%07%03%96%00%00%02%00%01H', function (data) { + const used = ((data[10] << 24) | (data[9] << 16) | (data[8] << 8) | data[7]) / 3600; + document.getElementById('projector_lamp_hours').innerText = + 'Lambi läbisõit ' + Math.round(used) + 'h. '; + }); + query_projector('%07%03%96%00%00%02%00%04H', function (data) { + document.getElementById('projector_lamp_remaining').innerText = 'Alles jäänud ' + data[7] + '%'; + }); + +