         @setValid true
       else
         @discoverDevices()
+      @_resetStreamCycle()
     @_api.on 'error', (e) => @log 'warn', "An Insteon error occurred: #{e}"
     @_api.on 'command', (cmd) => @_handleCommandReceived(cmd)
 
   discoverDevices: ->
+    @_api.house().then (houses) => @_house = houses[0]
+    #@_api.scene().then (scenes) =>
+    #  console.log JSON.stringify(scenes)
     @_api.device().then (devices) =>
       @_devices = devices
       for device in devices

    initialStatusCheck:   true # Check status on all devices upon connection?
    statusCheckInterval:  900  # Time between automatic status refreshes
                               # in seconds. Set null to disable.
    batchCommandInterval: 2000 # How long to wait between repeated commands (ms)
    proxyDevices:         {}   # Set "deviceId1": "deviceId2" to redirect all
                               # status messages from the key device to the

    else
      @log 'debug', "Received message for unknown or unidentifiable Insteon " +
        "device ID #{cmd.device_insteon_id}"

  _resetStreamCycle: ->
    streamCycleInterval = @get('streamCycleInterval')
    if streamCycleInterval?
      if @_streamCycle? then clearTimeout(@_streamCycle)
      @_streamCycle = setTimeout((=> @_cycleStream()),
        @get('streamCycleInterval') * 1000)

  _cycleStream: ->
    @_resetStreamCycle()
    @log 'verbose', "Stream has been inactive; cycling it"
    _.values(@_api.monitoring)[0].stream.close()
    @_api.monitor @_house