         @meshbluConnection.unregister device
         @handleDevices gateblu.devices
         callback()
-    callback()
 
   refreshGateblu: =>
     @sendToGateway topic: 'refresh'

        callback e

  emit: (event, data) =>
    console.log 'emitting', event, data
    @rootScope.$broadcast event, data
    @rootScope.$apply()


  subscribeToDevices: (devices) =>
    _.each devices, (device) =>
      console.log 'subscribing to device', device
      @meshbluConnection.subscribe device, (res) ->
        console.log 'subscribe', device.uuid, res

  updateIcons : (devices) =>
