diff --git a/person_detection/mqtt.py b/person_detection/mqtt.py
new file mode 100644
index 0000000..89bed3f
--- /dev/null
+++ b/person_detection/mqtt.py
@@ -0,0 +1,53 @@
+import paho.mqtt.client as mqtt
+import time
+import os
+import sys
+import threading
+import logging as log
+
+mqttBroker ="localhost"
+
+resolution = {}
+timer = {}
+timestamp = {}
+
+def init(device):
+    set_resolution(device, "low")
+
+
+def person_detected(device, num):
+    timestamp[device] = time.time()
+    if device in resolution and resolution[device] == "high":
+        return
+    set_resolution(device, "high")
+
+
+def start_timer(device):
+    # log.info("Start timer for device {}".format(device))
+    timer[device] = threading.Timer(10.0, timer_expiry, device)
+    timer[device].start()
+
+
+def remove_timer(device):
+    del timer[device]
+
+
+def set_resolution(device, level):
+    log.info("Setting camera {} resolution to {}".format(device, level))
+    resolution[device] = level
+    if level == "high" and device not in timer:
+        start_timer(device)
+    client = mqtt.Client()
+    client.connect(mqttBroker)
+    client.publish("camera/" + str(5000 + int(device)), level)
+
+
+def timer_expiry(device):
+    now = time.time()
+    diff = now - timestamp[device]
+    # log.info("timer_expiry() - now:{}, timestamp:{}".format(now, timestamp[device]))
+    if diff > 5.0:
+        set_resolution(device, "low")
+        remove_timer(device)
+    else:
+        start_timer(device)
diff --git a/person_detection/person_detection.py b/person_detection/person_detection.py
index aa54601..15c4e82 100644
--- a/person_detection/person_detection.py
+++ b/person_detection/person_detection.py
@@ -17,6 +17,8 @@
 
 from base_camera import BaseCamera
 
+import mqtt
+
 Shape = namedtuple('Shape', ['n','c','h','w'])
 
 class Camera(BaseCamera):
@@ -36,6 +38,8 @@
 
         self.device = device
 
+        mqtt.init(device)
+
         super(Camera, self).__init__(device, args.idle)
 
     def __del__(self):
@@ -145,6 +149,9 @@
                 cv2.putText(frame, "camera: {}".format(self.device), (10, int(initial_h - 20)),
                         cv2.FONT_HERSHEY_COMPLEX, 0.6, black, 1)
 
+                if obj_count > 0:
+                    mqtt.person_detected(self.device, obj_count)
+
             yield cv2.imencode('.jpg', frame)[1].tobytes()
 
             if self.is_async_mode:
