diff --git a/objects/sensor_host_status_obj.c b/objects/sensor_host_status_obj.c
index 57357d9..05e02b2 100644
--- a/objects/sensor_host_status_obj.c
+++ b/objects/sensor_host_status_obj.c
@@ -11,30 +11,6 @@
 static GDBusObjectManagerServer *manager = NULL;
 
 static gboolean
-on_set_value    (SensorValue  *sen,
-                GDBusMethodInvocation  *invocation,
-		GVariant*    value,
-                gpointer                user_data)
-{
-	SensorMatch *match = object_get_sensor_match((Object*)user_data);
-	Control* control = object_get_control((Object*)user_data);
-
-	sensor_value_set_value(sen,value);
-	sensor_value_emit_changed(sen,value,"");
-	// Important host status values
-	guchar host_status = g_variant_get_byte(g_variant_get_variant(value));
-
-	if (host_status == BOOTED)
-	{
-		sensor_match_set_state(match,host_status);
-		sensor_match_emit_sensor_match(match,host_status);
-		control_emit_goto_system_state(control,"BOOTED");
-	}
-	sensor_value_complete_set_value(sen,invocation);
-	return TRUE;
-}
-
-static gboolean
 on_init         (SensorValue  *sen,
                 GDBusMethodInvocation  *invocation,
                 gpointer                user_data)
@@ -44,7 +20,7 @@
 }
 
 static gboolean
-on_init_control         (Control  *control,
+on_init_control         (Control *control,
                 GDBusMethodInvocation  *invocation,
                 gpointer                user_data)
 {
@@ -52,6 +28,42 @@
 	return TRUE;
 }
 
+static void
+on_set_ipmi (GDBusConnection* connection,
+               const gchar* sender_name,
+               const gchar* object_path,
+               const gchar* interface_name,
+               const gchar* signal_name,
+               GVariant* parameters,
+               gpointer user_data) 
+{
+	SensorMatch *match = object_get_sensor_match((Object*)user_data);
+	SensorValue *sen = object_get_sensor_value((Object*)user_data);
+	SensorIpmi *ipmi = object_get_sensor_ipmi((Object*)user_data);
+	Control* control = object_get_control((Object*)user_data);
+	
+	guchar sensor_id;
+	guchar host_status;
+	g_variant_get (parameters, "(yy)", &sensor_id,&host_status);
+	guchar my_sensor_id = sensor_ipmi_get_sensor_id(ipmi);
+	if (my_sensor_id == sensor_id)
+	{
+		GVariant *old_value = sensor_value_get_value(sen);
+		GVariant *value = NEW_VARIANT_B(host_status);
+		if (VARIANT_COMPARE(old_value,value) != 0)
+		{
+			sensor_value_set_value(sen, value);
+			sensor_value_emit_changed(sen, value, "");
+			if (host_status == BOOTED)
+			{
+				sensor_match_set_state(match,host_status);
+				sensor_match_emit_sensor_match(match,host_status);
+				control_emit_goto_system_state(control,"BOOTED");
+			}
+		}
+	}
+}
+
 static void 
 on_bus_acquired (GDBusConnection *connection,
                  const gchar     *name,
@@ -82,10 +94,14 @@
   		object_skeleton_set_sensor_match (object, match);
   		g_object_unref (match);
 
-		Control* control = control_skeleton_new ();
-		object_skeleton_set_control (object, control);
-		g_object_unref (control);
-	
+		SensorIpmi *ipmi = sensor_ipmi_skeleton_new ();
+  		object_skeleton_set_sensor_ipmi (object, ipmi);
+  		g_object_unref (ipmi);
+
+		Control *control = control_skeleton_new ();
+  		object_skeleton_set_control (object, control);
+  		g_object_unref (control);
+
 		//must init variant
 		GVariant* v = NEW_VARIANT_B(0);
 		sensor_value_set_value(sensor,v);
@@ -96,6 +112,17 @@
 		//must emit change so sensor manager sees initial value
 		sensor_value_emit_changed(sensor,v,"");
 
+		//signal handlers
+		g_dbus_connection_signal_subscribe(connection,
+                                   "org.openbmc.sensors.IpmiBt",
+                                   "org.openbmc.sensors.IpmiBt",
+                                   "SetSensor",
+                                   "/org/openbmc/sensors/IpmiBt",
+                                   NULL,
+                                   G_DBUS_SIGNAL_FLAGS_NONE,
+                                   (GDBusSignalCallback) on_set_ipmi,
+                                   object,
+                                   NULL );
   		//define method callbacks here
   		g_signal_connect (sensor,
                     "handle-init",
@@ -107,10 +134,11 @@
                     G_CALLBACK (on_init_control),
                     NULL); /* user_data */
 
-		g_signal_connect (sensor,
-                    "handle-set-value",
-                    G_CALLBACK (on_set_value),
-                    object); /* user_data */
+		//g_signal_connect (sensor,
+                  //  "handle-set-value",
+                  //  G_CALLBACK (on_set_value),
+                  //  object); /* user_data */
+
 
   		/* Export the object (@manager takes its own reference to @object) */
   		g_dbus_object_manager_server_export (manager, G_DBUS_OBJECT_SKELETON (object));
