     @client = new ConstructClient(service.address, port)
       .on("connect", @_onConnect)
       .on("sensor_changed", @_onSensorChanged)
+      .on("target_temp_changed", @_onTargetTempChanged)
       .on("job_progress_changed", @_onJobChanged)
       .on("jobs", @_onJobsList)
       .on("job_upload_complete", @_onJobUploadComplete)

      id = job.id.toString()
      prefix = "  #{i}) #{name} "
      suffix = "job ##{job.id.pad(5)}  "
      console.log "#{prefix.padRight(".", @cli.width - suffix.length - prefix.length - 1)} #{suffix}"
    console.log ""
    @cli.rl.prompt()
    @cli.rl.resume()

  _onJobUploadComplete: (statusCode) =>
      @cli.rl.pause()
      if statusCode = 200
        status = "Job added."
      else
        status = "Error adding job."
      process.stdout.write("\r" + status + "\n")
      @cli.rl.prompt()
      @cli.render()
      @cli.rl.resume()

  _lHeader: ->
    fields = []
    for k, v of @_sensors
      fields.push "#{k.capitalize()}: #{v}\u00B0C"
    fields.join("  ")

  _rHeader: ->

class Tegh
  commands: require './help'
  _jobProgress: 0
  _sensorMap: {e: 'extruder', e0: 'extruder', b: 'bed'}

  constructor: ->
    new ServiceSelector().on "select", @_onServiceSelect
    @_sensors = {}
    @_targetTemp = {}

  _onServiceSelect: (service) =>
    clear()
