コード例 #1
0
    if os.path.isfile(FileMusicUp):
        print('>Server: Signal Music Up')
        os.remove(FileMusicUp);
        os.system('/www/site/run_vol_up.sh')
    # Volume Down
    if os.path.isfile(FileMusicDown):
        print('>Server: Signal Music Down')
        os.remove(FileMusicDown);
        os.system('/www/site/run_vol_dwn.sh')

    # Testing sound level
    if os.path.isfile(FileTestSound):
        print('>Server: Signal Test Sound')
        os.remove(FileTestSound);
        try:
            alarm.test_sound_level();
        except Exception as e:
            logit('ERROR')
            alarm.reset()
    # Setting alarm
    if os.path.isfile(FileAlarmSet):
        print('>Server: Signal Setting alarm')
        os.remove(FileAlarmSet);
        try:
            alarm.setFromFile()
        except Exception as e:
            logit('ERROR')
            alarm.reset()
    # Launching alarm
    if alarm.isTime():
#         try: