diff --git a/EagleEyev3/__init__.py b/EagleEyev3/__init__.py index c411700..6bb1012 100644 --- a/EagleEyev3/__init__.py +++ b/EagleEyev3/__init__.py @@ -476,7 +476,7 @@ class EagleEyev3(): if found_camera == None: camera = Camera() - logging.info(f"returning camera {camera} for search query {esn}") + logging.debug(f"returning camera {camera} for search query {esn}") return camera @@ -541,6 +541,7 @@ class Camera(Device): """ if start_timestamp == None or end_timestamp == None: + logging.debug(f"get_list_of_events called without timestamp") return { "success": False, "response_http_status": None, @@ -578,6 +579,7 @@ class Camera(Device): else: success = False + return { "success": success, "response_http_status": response.status_code, diff --git a/app.py b/app.py index c6ef7c4..e53a96f 100644 --- a/app.py +++ b/app.py @@ -114,11 +114,13 @@ def camera_detail(esn=None): een = EagleEyev3() camera = een.get_camera_by_id(esn) + camera.get_list_of_events(end_timestamp=een.time_before(ts=een.time_now(), hours=0), \ + start_timestamp=een.time_before(ts=een.time_now(), hours=6) ) values = { "current_user": een.current_user, "camera": camera, - "events": camera.get_list_of_events() + "events": camera.events['status'] } return render_template('camera_detail_partial.html', template_values=values) diff --git a/static/placeholder1.png b/static/placeholder1.png new file mode 100644 index 0000000..0edbd27 Binary files /dev/null and b/static/placeholder1.png differ diff --git a/templates/camera_detail_partial.html b/templates/camera_detail_partial.html index 00f0d6d..0839a2b 100644 --- a/templates/camera_detail_partial.html +++ b/templates/camera_detail_partial.html @@ -3,10 +3,22 @@