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

        @meshbluConnection.unregister device
        @handleDevices gateblu.devices
        callback()
    callback()

  refreshGateblu: =>
    @sendToGateway topic: 'refresh'

        callback e

  emit: (event, data) =>
    @rootScope.$broadcast event, data
    @rootScope.$apply()

