Small & large fixes to various server bits
This commit is contained in:
parent
a93a6055cf
commit
4efd8c2e09
10 changed files with 43 additions and 46 deletions
|
@ -10,6 +10,6 @@ voice:
|
||||||
input_mixer: 'Mic'
|
input_mixer: 'Mic'
|
||||||
output_mixer: 'PCM'
|
output_mixer: 'PCM'
|
||||||
input_volume: 100
|
input_volume: 100
|
||||||
output_volume: 30
|
output_volume: 60
|
||||||
file_address: "http://hugveycmd.local:8888"
|
file_address: "http://hugveycmd.local:8888"
|
||||||
output_driver: pulseaudio
|
output_driver: pulseaudio
|
||||||
|
|
|
@ -28,7 +28,7 @@ web_dir = os.path.join(os.path.split(__file__)[0], '..', 'www')
|
||||||
|
|
||||||
def getWebSocketHandler(central_command):
|
def getWebSocketHandler(central_command):
|
||||||
class WebSocketHandler(tornado.websocket.WebSocketHandler):
|
class WebSocketHandler(tornado.websocket.WebSocketHandler):
|
||||||
CORS_ORIGINS = ['localhost']
|
CORS_ORIGINS = ['localhost', 'hugveycmd.local']
|
||||||
connections = set()
|
connections = set()
|
||||||
|
|
||||||
def check_origin(self, origin):
|
def check_origin(self, origin):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
apt-get update
|
#apt-get update
|
||||||
|
|
||||||
apt-get install -y munin-node bc supervisor
|
#apt-get install -y munin-node bc supervisor
|
||||||
cp installation/rpi-internal-temp /usr/share/munin/plugins
|
cp installation/rpi-internal-temp /usr/share/munin/plugins
|
||||||
ln -sf /usr/share/munin/plugins/rpi-internal-temp /etc/munin/plugins/rpi-internal-temp
|
ln -sf /usr/share/munin/plugins/rpi-internal-temp /etc/munin/plugins/rpi-internal-temp
|
||||||
rm /etc/munin/plugins/irqstats
|
rm /etc/munin/plugins/irqstats
|
||||||
|
@ -25,6 +25,9 @@ systemctl --system enable pulseaudio.service
|
||||||
systemctl --system start pulseaudio.service
|
systemctl --system start pulseaudio.service
|
||||||
usermod -a -G pulse-access pi
|
usermod -a -G pulse-access pi
|
||||||
|
|
||||||
|
# install wifi networks
|
||||||
|
cp installation/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf
|
||||||
|
|
||||||
# Added chown=pi:pi
|
# Added chown=pi:pi
|
||||||
cp installation/supervisord.conf /etc/supervisor/supervisord.conf
|
cp installation/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
ln -s /home/pi/hugvey/supervisor.conf /etc/supervisor/conf.d/hugvey.conf
|
ln -s /home/pi/hugvey/supervisor.conf /etc/supervisor/conf.d/hugvey.conf
|
||||||
|
|
|
@ -1,28 +1,12 @@
|
||||||
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
||||||
update_config=1
|
update_config=1
|
||||||
country=NL
|
country=BE
|
||||||
|
|
||||||
network={
|
network={
|
||||||
ssid="r3"
|
ssid="Hugvey_5G"
|
||||||
psk="5qoWGZ0z"
|
|
||||||
}
|
|
||||||
|
|
||||||
network={
|
|
||||||
ssid="Digibox-8892"
|
|
||||||
psk="ODMZ7?423V63ODRG"
|
|
||||||
}
|
|
||||||
|
|
||||||
network={
|
|
||||||
ssid="PACT"
|
|
||||||
psk="zollverein"
|
|
||||||
}
|
|
||||||
network={
|
|
||||||
ssid="Hugvey"
|
|
||||||
psk="YouAreNotVeryTalkativeToday"
|
psk="YouAreNotVeryTalkativeToday"
|
||||||
}
|
}
|
||||||
|
|
||||||
network={
|
network={
|
||||||
ssid="Nanterre-Amandiers"
|
ssid="Hugvey2_5G"
|
||||||
key_mgmt=NONE
|
psk="YouAreNotVeryTalkativeToday"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#N canvas 976 211 660 592 10;
|
#N canvas 307 277 660 592 10;
|
||||||
#X obj 131 277 dac~;
|
#X obj 131 277 dac~;
|
||||||
#X obj 131 227 readsf~;
|
#X obj 131 227 readsf~;
|
||||||
#X obj 209 209 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
|
#X obj 209 209 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
|
||||||
|
@ -26,13 +26,13 @@
|
||||||
#X msg 330 117 0;
|
#X msg 330 117 0;
|
||||||
#X obj 208 345 oscformat /loop;
|
#X obj 208 345 oscformat /loop;
|
||||||
#X msg 356 434 connect 192.168.1.174 7400;
|
#X msg 356 434 connect 192.168.1.174 7400;
|
||||||
#X msg 132 170 open /mnt/stash/hugvey/score38_loop_40s_extra.wav \,
|
#X msg 132 170 open /mnt/stash/hugvey/sound/score40_loop_plus40s.wav
|
||||||
1;
|
\, 1;
|
||||||
#X connect 1 0 0 0;
|
#X connect 1 0 0 0;
|
||||||
#X connect 1 0 0 1;
|
#X connect 1 0 0 1;
|
||||||
#X connect 1 1 2 0;
|
#X connect 1 1 2 0;
|
||||||
#X connect 2 0 22 0;
|
|
||||||
#X connect 2 0 12 0;
|
#X connect 2 0 12 0;
|
||||||
|
#X connect 2 0 22 0;
|
||||||
#X connect 4 0 5 0;
|
#X connect 4 0 5 0;
|
||||||
#X connect 6 0 4 0;
|
#X connect 6 0 4 0;
|
||||||
#X connect 7 0 8 0;
|
#X connect 7 0 8 0;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
@click="loadNarrative(lang.code, lang.file)"><span
|
@click="loadNarrative(lang.code, lang.file)"><span
|
||||||
:class="['flag-icon', lang.code]"></span> {{lang.code}}</li>
|
:class="['flag-icon', lang.code]"></span> {{lang.code}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class='hugvey' v-for="hv in hugveys"
|
<div class='hugvey' v-for="hv in hugveys"
|
||||||
:class="[{'hugvey--on': hv.status != 'off'},'hugvey--' + hv.status]"
|
:class="[{'hugvey--on': hv.status != 'off'},'hugvey--' + hv.status]"
|
||||||
|
@ -64,13 +64,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class='btn' v-if="hv.status == 'blocked'" @click.stop="unblock(hv)">Unblock</div>
|
<div class='btn' v-if="hv.status == 'blocked'" @click.stop="unblock(hv)">Unblock</div>
|
||||||
<div class='btn' v-if="hv.status == 'available'" @click.stop="block(hv)">Block</div>
|
<div class='btn' v-if="hv.status == 'available'" @click.stop="block(hv)">Block</div>
|
||||||
<div class='btn' v-if="hv.status == 'available'" @click.stop="restart(hv)">Start</div>
|
<div class='btn' v-if="hv.status == 'available' || hv.status =='blocked'" @click.stop="restart(hv)">Start</div>
|
||||||
<div class='btn' v-if="hv.status == 'running'" @click.stop="finish(hv)">Finish</div> <!-- to available state -->
|
<div class='btn' v-if="hv.status == 'running'" @click.stop="finish(hv)">Finish</div> <!-- to available state -->
|
||||||
<div class='btn' v-if="hv.status == 'running'" @click.stop="pause(hv)">Pause</div>
|
<div class='btn' v-if="hv.status == 'running'" @click.stop="pause(hv)">Pause</div>
|
||||||
<div class='btn' v-if="hv.status == 'paused'" @click.stop="resume(hv)">Resume</div>
|
<div class='btn' v-if="hv.status == 'paused'" @click.stop="resume(hv)">Resume</div>
|
||||||
|
|
||||||
<div class='btn' v-if="(hv.status == 'available' || hv.status == 'blocked') && hv.has_state" @click.stop="resume(hv)">Resume from save</div>
|
<div class='btn' v-if="(hv.status == 'available' || hv.status == 'blocked') && hv.has_state" @click.stop="resume(hv)">Resume from save</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id='story'>
|
<div id='story'>
|
||||||
|
@ -109,4 +109,4 @@
|
||||||
</div>
|
</div>
|
||||||
<script type='application/javascript' src="/js/hugvey_console.js"></script>
|
<script type='application/javascript' src="/js/hugvey_console.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1068,7 +1068,7 @@ class Graph {
|
||||||
}, 'Volume factor' ),
|
}, 'Volume factor' ),
|
||||||
crel( 'input', {
|
crel( 'input', {
|
||||||
'name': msg['@id'] + '-params.vol',
|
'name': msg['@id'] + '-params.vol',
|
||||||
'value': params.hasOwnProperty('vol') ? params['vol'] : 1,
|
'value': params.hasOwnProperty('vol') ? params['vol'] : .8,
|
||||||
'step': "0.1",
|
'step': "0.1",
|
||||||
'type': 'number',
|
'type': 'number',
|
||||||
'on': {
|
'on': {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
var ws = new ReconnectingWebSocket( "ws://localhost:8888/ws", null, { debug: false, reconnectInterval: 3000 } );
|
var ws = new ReconnectingWebSocket( window.location.origin.replace('http', 'ws') +'/ws', null, { debug: false, reconnectInterval: 3000 } );
|
||||||
|
|
||||||
//request close before unloading
|
//request close before unloading
|
||||||
window.addEventListener('beforeunload', function(){
|
window.addEventListener('beforeunload', function(){
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<dt>Uptime</dt>
|
<dt>Uptime</dt>
|
||||||
<dd>{{uptime}}</dd>
|
<dd>{{uptime}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class='hugvey' v-for="hv in hugveys"
|
<div class='hugvey' v-for="hv in hugveys"
|
||||||
:class="[{'hugvey--on': hv.status != 'off'},'hugvey--' + hv.status]"
|
:class="[{'hugvey--on': hv.status != 'off'},'hugvey--' + hv.status]"
|
||||||
|
@ -39,9 +39,9 @@
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
{{ hv.language }}
|
{{ hv.language }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div v-if="hv.awaiting != false"><img class='icon' :src="'/images/icon-finished.svg'" title="Finished"> {{timer(hv,
|
<!-- <div v-if="hv.awaiting != false"><img class='icon' :src="'/images/icon-finished.svg'" title="Finished"> {{timer(hv,
|
||||||
'finished')}}</div> -->
|
'finished')}}</div> -->
|
||||||
<div class='stats'>
|
<div class='stats'>
|
||||||
|
@ -60,17 +60,17 @@
|
||||||
</div>
|
</div>
|
||||||
<div class='btn' v-if="hv.status == 'blocked'" @click.stop="unblock(hv)">Unblock</div>
|
<div class='btn' v-if="hv.status == 'blocked'" @click.stop="unblock(hv)">Unblock</div>
|
||||||
<div class='btn' v-if="hv.status == 'available'" @click.stop="block(hv)">Block</div>
|
<div class='btn' v-if="hv.status == 'available'" @click.stop="block(hv)">Block</div>
|
||||||
<div class='btn' v-if="hv.status == 'available'" @click.stop="restart(hv)">Start</div>
|
<div class='btn' v-if="hv.status == 'available' || hv.status =='blocked'" @click.stop="restart(hv)">Start</div>
|
||||||
<div class='btn' v-if="hv.status == 'running'" @click.stop="finish(hv)">Finish</div> <!-- to available state -->
|
<div class='btn' v-if="hv.status == 'running'" @click.stop="finish(hv)">Finish</div> <!-- to available state -->
|
||||||
<div class='btn' v-if="hv.status == 'running'" @click.stop="pause(hv)">Pause</div>
|
<div class='btn' v-if="hv.status == 'running'" @click.stop="pause(hv)">Pause</div>
|
||||||
<div class='btn' v-if="hv.status == 'paused'" @click.stop="resume(hv)">Resume</div>
|
<div class='btn' v-if="hv.status == 'paused'" @click.stop="resume(hv)">Resume</div>
|
||||||
|
|
||||||
<div class='btn' v-if="(hv.status == 'available' || hv.status == 'blocked') && hv.has_state" @click.stop="resume(hv)">Resume from save</div>
|
<div class='btn' v-if="(hv.status == 'available' || hv.status == 'blocked') && hv.has_state" @click.stop="resume(hv)">Resume from save</div>
|
||||||
<!-- <div class='light'>
|
<!-- <div class='light'>
|
||||||
{{ hv.light }}
|
{{ hv.light }}
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class='light'>Light: <input type="number" step="1" :value="hv.light_id" @change="change_light" :data-hvid="hv.id" v-on:click.stop></div>
|
<div class='light'>Light: <input type="number" step="1" :value="hv.light_id" @change="change_light" :data-hvid="hv.id" v-on:click.stop></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id='logbook'>
|
<div id='logbook'>
|
||||||
|
@ -85,9 +85,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type='application/javascript' src="/js/hugvey_console.js"></script>
|
<script type='application/javascript' src="/js/hugvey_console.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -26,10 +26,12 @@
|
||||||
.vis-item.message.vis-range{
|
.vis-item.message.vis-range{
|
||||||
background-color: darkgray;
|
background-color: darkgray;
|
||||||
border-color: black;
|
border-color: black;
|
||||||
|
border:none 0px;
|
||||||
}
|
}
|
||||||
.vis-item.speech {
|
.vis-item.speech {
|
||||||
background-color: greenyellow;
|
background-color: greenyellow;
|
||||||
border-color: green;
|
border-color: green;
|
||||||
|
border:none 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vis-text,.vis-labelset .vis-label {
|
.vis-text,.vis-labelset .vis-label {
|
||||||
|
@ -67,11 +69,19 @@ font-size: 4.5pt;
|
||||||
border-color:darkred;
|
border-color:darkred;
|
||||||
border-radius:15px;
|
border-radius:15px;
|
||||||
}
|
}
|
||||||
|
#follow_button{
|
||||||
|
background: #669;
|
||||||
|
border-radius: 2px;
|
||||||
|
position: absolute;
|
||||||
|
left:10px;
|
||||||
|
top: 10px;
|
||||||
|
z-index: 99999;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body id='timeline'>
|
<body id='timeline'>
|
||||||
<input id="follow_checkbox" type="checkbox" name="follow" value="follow" checked> Follow timeline<br>
|
<label id='follow_button'><input id="follow_checkbox" type="checkbox" name="follow" value="follow" checked> Follow timeline</label>
|
||||||
<div id='line'></div>
|
<div id='line'></div>
|
||||||
|
|
||||||
<script type='application/javascript' src="/js/hugvey_timeline.js"></script>
|
<script type='application/javascript' src="/js/hugvey_timeline.js"></script>
|
||||||
|
|
Loading…
Reference in a new issue