diff --git a/app/app.xml b/app/app.xml
index ec55db7..5d912fa 100644
--- a/app/app.xml
+++ b/app/app.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright 2016-present Open Networking Foundation
+  ~ Copyright 2018-present Open Networking Foundation
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -21,4 +21,6 @@
     <description>${project.description}</description>
     <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
     <artifact>mvn:${project.groupId}/olt-api/${project.version}</artifact>
+    <artifact>mvn:${project.groupId}/olt-kafka/${project.version}</artifact>
+    <artifact>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.kafka-clients/1.1.0_1</artifact>
 </app>
diff --git a/app/features.xml b/app/features.xml
index a19b531..4c1b5f9 100644
--- a/app/features.xml
+++ b/app/features.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <!--
-  ~ Copyright 2016-present Open Networking Foundation
+  ~ Copyright 2018-present Open Networking Foundation
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -20,5 +20,7 @@
         <feature>onos-api</feature>
         <bundle>mvn:${project.groupId}/olt-api/${project.version}</bundle>
         <bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>
+        <bundle>mvn:${project.groupId}/olt-kafka/${project.version}</bundle>
+        <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.kafka-clients/1.1.0_1</bundle>
     </feature>
 </features>
diff --git a/app/pom.xml b/app/pom.xml
index 7c99f45..62ee855 100644
--- a/app/pom.xml
+++ b/app/pom.xml
@@ -37,8 +37,14 @@
         <api.description>
             APIs for interacting with the CORD OLT application.
         </api.description>
+        <onos.app.name>org.opencord.olt</onos.app.name>
+        <onos.app.title>OLT Access Management</onos.app.title>
+        <onos.app.origin>OpenCord</onos.app.origin>
+        <onos.app.category>default</onos.app.category>
+        <onos.app.url>http://opencord.org</onos.app.url>
+        <onos.app.readme>CORD OLT Access management application</onos.app.readme>
 	<api.package>org.onosproject.olt.rest</api.package>
-	<olt.api.version>1.4.0-SNAPSHOT</olt.api.version>
+	<olt.api.version>${project.version}</olt.api.version>
     </properties>
 
     <dependencies>
@@ -49,6 +55,12 @@
         </dependency>
 
         <dependency>
+            <groupId>org.opencord</groupId>
+            <artifactId>olt-kafka</artifactId>
+            <version>${olt.api.version}</version>
+        </dependency>
+
+        <dependency>
             <groupId>org.onosproject</groupId>
             <artifactId>onos-cli</artifactId>
             <version>${onos.version}</version>
diff --git a/app/src/main/java/org/opencord/olt/impl/Olt.java b/app/src/main/java/org/opencord/olt/impl/Olt.java
index 8b71a0a..29f070f 100644
--- a/app/src/main/java/org/opencord/olt/impl/Olt.java
+++ b/app/src/main/java/org/opencord/olt/impl/Olt.java
@@ -182,10 +182,8 @@
 
         oltData.keySet().stream()
                 .flatMap(did -> deviceService.getPorts(did).stream())
-                .filter(p -> !oltData.get(p.element().id()).uplink().equals(p.number()))
-                .filter(p -> p.isEnabled())
-                .forEach(p -> processFilteringObjectives((DeviceId) p.element().id(),
-                                                         p.number(), true));
+                .filter(this::isUni)
+                .forEach(this::initializeUni);
 
         subscribers = storageService.<ConnectPoint, VlanId>consistentMapBuilder()
                 .withName(SUBSCRIBERS)
@@ -285,6 +283,16 @@
         return Maps.newHashMap(oltData);
     }
 
+    private void initializeUni(Port port) {
+        DeviceId deviceId = (DeviceId) port.element().id();
+
+        post(new AccessDeviceEvent(AccessDeviceEvent.Type.UNI_ADDED, deviceId, port));
+
+        if (port.isEnabled()) {
+            processFilteringObjectives(deviceId, port.number(), true);
+        }
+    }
+
     private void unprovisionSubscriber(DeviceId deviceId, PortNumber uplink,
                                        PortNumber subscriberPort, VlanId subscriberVlan,
                                        VlanId deviceVlan, Optional<VlanId> defaultVlan) {
@@ -559,6 +567,10 @@
         flowObjectiveService.filter(devId, igmp);
     }
 
+    private boolean isUni(Port port) {
+        return !oltData.get(port.element().id()).uplink().equals(port.number());
+    }
+
     private class InternalDeviceListener implements DeviceListener {
         @Override
         public void event(DeviceEvent event) {
@@ -570,9 +582,12 @@
                 //TODO: Port handling and bookkeeping should be improved once
                 // olt firmware handles correct behaviour.
                 case PORT_ADDED:
-                    if (!oltData.get(devId).uplink().equals(event.port().number()) &&
-                            event.port().isEnabled()) {
-                        processFilteringObjectives(devId, event.port().number(), true);
+                    if (!oltData.get(devId).uplink().equals(event.port().number())) {
+                        post(new AccessDeviceEvent(AccessDeviceEvent.Type.UNI_ADDED, devId, event.port()));
+
+                        if (event.port().isEnabled()) {
+                            processFilteringObjectives(devId, event.port().number(), true);
+                        }
                     }
                     break;
                 case PORT_REMOVED:
@@ -584,10 +599,14 @@
                                 event.port().number(),
                                 vlan, olt.vlan(), olt.defaultVlan());
                     }
-                    if (!oltData.get(devId).uplink().equals(event.port().number()) &&
-                            event.port().isEnabled()) {
-                        processFilteringObjectives(devId, event.port().number(), false);
+                    if (!oltData.get(devId).uplink().equals(event.port().number())) {
+                        if (event.port().isEnabled()) {
+                            processFilteringObjectives(devId, event.port().number(), false);
+                        }
+
+                        post(new AccessDeviceEvent(AccessDeviceEvent.Type.UNI_REMOVED, devId, event.port()));
                     }
+
                     break;
                 case PORT_UPDATED:
                     if (oltData.get(devId).uplink().equals(event.port().number())) {
@@ -603,9 +622,21 @@
                     post(new AccessDeviceEvent(
                             AccessDeviceEvent.Type.DEVICE_CONNECTED, devId,
                             null, null));
+
+                    // Send UNI_ADDED events for all existing ports
+                    deviceService.getPorts(devId).stream()
+                            .filter(Olt.this::isUni)
+                            .forEach(p -> post(new AccessDeviceEvent(
+                                    AccessDeviceEvent.Type.UNI_ADDED, devId, p)));
+
                     provisionDefaultFlows(devId);
                     break;
                 case DEVICE_REMOVED:
+                    deviceService.getPorts(devId).stream()
+                            .filter(Olt.this::isUni)
+                            .forEach(p -> post(new AccessDeviceEvent(
+                                    AccessDeviceEvent.Type.UNI_REMOVED, devId, p)));
+
                     post(new AccessDeviceEvent(
                             AccessDeviceEvent.Type.DEVICE_DISCONNECTED, devId,
                             null, null));
