diff --git a/amcrest_api.py b/amcrest_api.py index cf7cd03..d8d7006 100644 --- a/amcrest_api.py +++ b/amcrest_api.py @@ -140,7 +140,7 @@ class AmcrestAPI(object): try: config = self.devices[device_id]['config'] - self.logger.info(f'Event on {config["host"]} - {code}: {payload}') + self.logger.debug(f'Event on {config["host"]} - {code}: {payload}') if ((code == "ProfileAlarmTransmit" and config["is_ad110"]) or (code == "VideoMotion" and not config["is_ad110"])): diff --git a/app.py b/app.py index 2b93ee3..2db9c8e 100644 --- a/app.py +++ b/app.py @@ -113,6 +113,9 @@ if not 'timezone' in config: else: logger.info(f'TIMEZONE set as {config["timezone"]}') +if config['debug']: + logger.setLevel(logging.DEBUG) + try: with AmcrestMqtt(config) as mqtt: asyncio.run(mqtt.main_loop())