summaryrefslogtreecommitdiff
path: root/src/sound_sensor_server.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound_sensor_server.py')
-rwxr-xr-xsrc/sound_sensor_server.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sound_sensor_server.py b/src/sound_sensor_server.py
index aa62608..b660210 100755
--- a/src/sound_sensor_server.py
+++ b/src/sound_sensor_server.py
@@ -6,7 +6,7 @@ from time import sleep
from typing import Optional, List, Dict, Tuple
from functools import partial
from home.config import config
-from home.util import parse_addr
+from home.util import Addr
from home.api import WebAPIClient, RequestParams
from home.api.types import SoundSensorLocation
from home.soundsensor import SoundSensorServer, SoundSensorHitHandler
@@ -159,7 +159,7 @@ def api_error_handler(exc, name, req: RequestParams):
if __name__ == '__main__':
- config.load('sound_sensor_server')
+ config.load_app('sound_sensor_server')
hc = HitCounter()
api = WebAPIClient(timeout=(10, 60))
@@ -172,12 +172,12 @@ if __name__ == '__main__':
sound_nodes = {}
if 'sound_nodes' in config:
for nodename, nodecfg in config['sound_nodes'].items():
- sound_nodes[nodename] = parse_addr(nodecfg['addr'])
+ sound_nodes[nodename] = Addr.fromstring(nodecfg['addr'])
camera_nodes = {}
if 'camera_nodes' in config:
for nodename, nodecfg in config['camera_nodes'].items():
- camera_nodes[nodename] = parse_addr(nodecfg['addr'])
+ camera_nodes[nodename] = Addr.fromstring(nodecfg['addr'])
if sound_nodes:
record_clients[MediaNodeType.SOUND] = SoundRecordClient(sound_nodes,