diff --git a/hugvey/central_command.py b/hugvey/central_command.py index 80a6e70..a03a7d0 100644 --- a/hugvey/central_command.py +++ b/hugvey/central_command.py @@ -191,6 +191,7 @@ class CentralCommand(object): status['time_since_visitor_spoke_state'] = "" hugveyCriticalDiff = self.config['story']['hugvey_critical_silence'] if 'hugvey_critical_silence' in self.config['story'] else 90 + audienceCriticalDiff = self.config['story']['audience_critical_silence'] if 'audience_critical_silence' in self.config['story'] else 15*60 if not hv.story: status['time_since_hugvey_spoke'] = '-' @@ -215,10 +216,10 @@ class CentralCommand(object): diff = datetime.timedelta(seconds=int(hv.story.timer.getElapsed('last_speech'))) status['time_since_visitor_spoke'] = str(diff) diffs = diff.total_seconds() - if diffs > 1700: + if diffs > audienceCriticalDiff: # evLogger.warning("Very long time since audience spoke") status['time_since_visitor_spoke_state'] = 'critical' - elif diffs > 900: + elif diffs > audienceCriticalDiff/2: status['time_since_visitor_spoke_state'] = 'warning' # else: # #clear warning diff --git a/hugvey/panopticon.py b/hugvey/panopticon.py index f2a3ed4..5e504e9 100644 --- a/hugvey/panopticon.py +++ b/hugvey/panopticon.py @@ -28,7 +28,7 @@ web_dir = os.path.join(os.path.split(__file__)[0], '..', 'www') def getWebSocketHandler(central_command): class WebSocketHandler(tornado.websocket.WebSocketHandler): - CORS_ORIGINS = ['localhost', 'hugveycmd.local', 'r3.local'] + CORS_ORIGINS = ['localhost', 'hugveycmd.local', 'r3.local','192.168.1.155'] connections = set() selections = {} diff --git a/server_config.yml b/server_config.yml index 6dcf3e0..6a2f2a5 100644 --- a/server_config.yml +++ b/server_config.yml @@ -56,7 +56,7 @@ light: fade_duration_id: 37 story: loop: true - hugvey_critical_silence: 90 + hugvey_critical_silence: 210 telegram: token: null chat_ids: [] \ No newline at end of file