Sound device is now configurable
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1292666b66
commit
9a6852c2c0
@ -20,7 +20,7 @@ class SoundSensor(AbcSensor):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
BirbnetesIoTPlatformRecordDriver.init(config.SAMPLE_LENGTH)
|
||||
BirbnetesIoTPlatformRecordDriver.init(config.SAMPLE_LENGTH, microphone=config.RECORD_DEVICE)
|
||||
|
||||
def getvalue(self) -> Optional[str]:
|
||||
"""
|
||||
|
@ -20,6 +20,7 @@ TICK_INTERVAL = float(os.environ.get("TICK_INTERVAL", 0.4))
|
||||
SAMPLE_LENGTH = float(os.environ.get("SAMPLE_LENGTH", 1))
|
||||
|
||||
ENEMY_SOUNDS = os.environ.get("ENEMY_SOUNDS", '/var/lib/birbnetes/enemy_sounds')
|
||||
RECORD_DEVICE = os.environ.get("RECORD_DEVICE", 'default')
|
||||
|
||||
MQTT_HOSTNAME = os.getenv("GUARD_MQTT_HOSTNAME", "localhost")
|
||||
MQTT_PORT = int(os.getenv("GUARD_MQTT_PORT", 1883))
|
||||
|
Loading…
Reference in New Issue
Block a user