Add actual ringing
This commit is contained in:
parent
88e42032df
commit
03cb915fa5
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@ Sonnez via le réseau local. C'est cool, hein ?
|
||||||
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from flask import Flask, render_template, request
|
from flask import Flask, render_template, request
|
||||||
|
import subprocess
|
||||||
|
|
||||||
app = Flask('sonnetteweb')
|
app = Flask('sonnetteweb')
|
||||||
|
|
||||||
|
@ -26,7 +27,11 @@ class Ringer:
|
||||||
return False
|
return False
|
||||||
self.last_rung = datetime.now()
|
self.last_rung = datetime.now()
|
||||||
|
|
||||||
print('dring')
|
print('Dring!')
|
||||||
|
|
||||||
|
subprocess.run(['bash',
|
||||||
|
'-c',
|
||||||
|
'mplayer -ao alsa:device=hw=1.0 ringtone.ogg &'])
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue