Patient description: The patient is a 24-year-old man who has had type 1 diabetes for 11 years. He presents to the emergency room with hyperglycemia and concern for possible diabetic ketoacidosis after not taking his insulin for 3 days. The patient reports that he is currently homeless and has lost his supply of insulin, syringes, glucometer, and glucose testing supplies. The patient states that at the time of his initial diagnosis with type 1 diabetes he was hospitalized with a glucose value >1000 mg/dL. At the time, he was experiencing polyuria, polydipsia, and polyphagia. He reports that he has been on insulin since the time of his diagnosis, and he has never been prescribed oral agents for diabetes management. Most recently, he has been using insulin glargine 55 units once daily, and insulin aspart sliding scale 3 times daily. The patient has had previous episodes of diabetic ketoacidosis, for which he was hospitalized. With this episode of hyperglycemia, he is not experiencing any nausea, vomiting, or abdominal discomfort, and he appears well. His lab studies showed: A1c: 11.3% Creatinine: 0.9 mg/dL with eGFR >60 mL/min Aspartate aminotransferase (AST): 17 U/L Alanine aminotransferase (ALT): 14 U/L Beta-hydroxybutyrate: 0.1 mmol/L Bicarbonate: 25 mEq/L Anion

Clinical trial eligibility criteria: eligible ages (years): 18.0-999.0,  Type 1 Diabetes The subject has type 1 diabetes as defined by WHO 2. The subject is 18 years of age or older 3. The subject will have been on an insulin pump for at least 6 months with good knowledge of insulin self-adjustment including carbohydrate counting 4. The subject is treated with one of the rapid acting or ultra-rapid acting insulin analogues (Insulin Aspart, faster acting insulin Aspart, Insulin Lispro or Insulin Glulisine) 5. HbA1c <10% (86mmol/mol) for phase 3, based on analysis from central laboratory or equivalent 6. The subject is willing to perform regular finger-prick blood glucose monitoring, with at least 2 measurements per day 7. The subject is willing to wear closed-loop system at home and at work place 8. The subject is willing to follow study specific instructions including the use of bolus calculator for all meals / snacks 9. The subject is willing to upload pump and CGM data at regular intervals 10. Female subjects of child bearing age should be on effective contraception and must have a negative urine-HCG pregnancy test at screening  Non-type 1 diabetes mellitus 2. Subjects who are living alone 3. Any other physical or psychological disease or condition likely to interfere with the normal conduct of the study and interpretation of the study results 4. Current treatment with drugs known to have significant interference with glucose metabolism, such as systemic corticosteroids, as judged by the investigator 5. Known or suspected allergy against insulin or previous reaction to FiAsp 6. Subjects with clinically significant nephropathy (eGFR < 45ml/min), neuropathy or active retinopathy (defined as presence of maculopathy or more than background diabetic retinopathy changes) as judged by the investigator 7. More than one episode of severe hypoglycaemia as defined by American Diabetes Association (42) in preceding 12 months (Severe hypoglycaemia is defined as an event requiring assistance of another person to actively administer carbohydrates, glucagon, or take other corrective actions including episodes of hypoglycaemia severe enough to cause unconsciousness, seizures or attendance at hospital.) 8. Total daily insulin dose > 2 IU/kg/day 9. Subject is pregnant or breast feeding or planning pregnancy within next 10 months 10. Severe visual impairment 11. Severe hearing impairment 12. Lack of reliable telephone facility for contact 13. Subject not proficient in English (UK), French (Switzerland) or German (Germany, Switzerland and Austria) Additional specific for Austria 1. Positive results on urine drug screen (amphetamines/metamphetamines, barbiturates, benzodiazepines, cannabinoids, cocaine, opiates). 2. Positive alcohol breath test. 3. Positive reaction to any of the following tests: hepatitis B surface (HBs) antigen, anti-hepatitis C virus (anti-HCV) antibodies, anti-human immunodeficiency virus (HIV) 1 antibodies, anti-HIV2 antibodies