# Aldes T.one Air Air

**URL:** <https://community.homey.app/t/aldes-t-one-air-air/146615>\
**Category:** Tutorials\
**Tags:** homeyscript\
**Created:** [December 9, 2025, 1:56pm UTC](https://community.homey.app/t/aldes-t-one-air-air/146615 "2025-12-09T13:56:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blutch32](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/blutch32/32/50358_2.png) [@blutch32](https://community.homey.app/u/blutch32)\
**Post date:** [December 9, 2025, 1:56pm UTC](https://community.homey.app/t/aldes-t-one-air-air/146615/1 "2025-12-09T13:56:10Z")

</div>

French version below english one :

Hi everyone,

For those who own an **Aldes T.One** heat pump (Air/Air or Aqua) and a **Homey Pro** , the native integration is often unavailable or limited depending on the specific model.

I’m sharing a robust method using **Homeyscript** to control your heating/cooling and, most importantly, to get **reliable status feedback**. A common issue with Aldes is the “Race Condition”: when you change the temperature, the notification often triggers too fast and displays the _old_ value because the Aldes Cloud hasn’t updated yet.

This tutorial covers:

1. Retrieving your technical IDs.

2. The Control and Update scripts.

3. Creating a Virtual Thermostat (using the Virtual Devices app).

4. The two necessary Flows (Control & Sync) with the specific delay logic.

### Prerequisites

- A Homey Pro.

- The **Homeyscript** app installed.

- The **Virtual Devices** app (by Arjan, and continued by Arie J. Godskalk since 2022) installed from the Homey Store.

- Your **AldesConnect** credentials (email and password).

* * *

### Step 1: Retrieve your Technical IDs (Scan Script)

You need to find the internal IDs of your machine. Create a temporary script to find them.

1. Open Homeyscript, create a new script named `Aldes_Scan`.

2. Paste the code below, replacing Email/Password.

3. Click “Save & Test”.

JavaScript

```auto
// --- YOUR CREDENTIALS ---
const email = 'YOUR_ALDES_EMAIL';
const password = 'YOUR_PASSWORD';

async function run() {
  try {
    // 1. Authenticate
    const loginRes = await fetch('https://cocoon.aldes.com/api/v1/auth/login', {
      method: 'POST',
      headers: {'Content-Type': 'application/json'},
      body: JSON.stringify({username: email, password: password})
    });
    if (!loginRes.ok) throw new Error('Login Error');
    const token = (await loginRes.json()).access_token;
    
    // 2. Get Products
    const prodRes = await fetch('https://cocoon.aldes.com/api/v1/user/products', {
      method: 'GET',
      headers: {'Authorization': `Bearer ${token}`}
    });
    
    const products = await prodRes.json();
    console.log("--- SCAN RESULT ---");
    console.log(JSON.stringify(products, null, 2));
    return "Check the logs below to find 'product_id' and 'node_id'";
  } catch (error) {
    console.error(error);
    return false;
  }
}
await run();

```

👉 **In the console (log) at the bottom:** Look for and write down:

- `product_id` (usually looks like `Pxxxxxx`).

- `node_id` corresponding to the room you want to control (Living room, Bedroom, etc.).

* * *

### Step 2: The Operational Scripts

We need two scripts: one to **Send** the command, and one to **Read** the status.

#### A. Script `Aldes_Set_Salon` (To change the temperature)

This script receives the desired temperature from the Flow via the `args[0]` argument.

JavaScript

```auto
// --- CONFIGURATION ---
const email = 'YOUR_ALDES_EMAIL';
const password = 'YOUR_PASSWORD';
const productId = 'YOUR_PRODUCT_ID_FROM_STEP_1'; 
const nodeId = 'YOUR_NODE_ID_FOR_THE_ROOM'; 
// --------------------

const targetTemp = args[0]; // The temperature comes from the Flow

if(!targetTemp) {
    console.log("No temperature provided");
    return false;
}

async function setTemp() {
  try {
    // 1. Login
    const loginRes = await fetch('https://cocoon.aldes.com/api/v1/auth/login', {
      method: 'POST',
      headers: {'Content-Type': 'application/json'},
      body: JSON.stringify({username: email, password: password})
    });
    const token = (await loginRes.json()).access_token;

    // 2. Send Command
    // NOTE: Check if your API endpoint requires 'set_consigne' or similar
    const url = `https://cocoon.aldes.com/api/v1/products/${productId}/nodes/${nodeId}/set_consigne`;
    
    await fetch(url, {
      method: 'POST', 
      headers: {
        'Authorization': `Bearer ${token}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ value: parseFloat(targetTemp) })
    });
    
    return true;
  } catch (e) {
    console.error(e);
    return false;
  }
}
await setTemp();

```

#### B. Script `Aldes_Update_Salon` (To read the status)

This script queries Aldes and updates **Homeyscript Tags** , which we will use in notifications and the virtual thermostat.

JavaScript

```auto
// --- CONFIGURATION ---
const email = 'YOUR_ALDES_EMAIL';
const password = 'YOUR_PASSWORD';
const productId = 'YOUR_PRODUCT_ID';
const nodeId = 'YOUR_NODE_ID_FOR_THE_ROOM';
// ---------------------

async function update() {
  try {
    // 1. Login
    const loginRes = await fetch('https://cocoon.aldes.com/api/v1/auth/login', {
      method: 'POST',
      headers: {'Content-Type': 'application/json'},
      body: JSON.stringify({username: email, password: password})
    });
    const token = (await loginRes.json()).access_token;

    // 2. Get Data
    const response = await fetch(`https://cocoon.aldes.com/api/v1/products/${productId}/data`, {
        headers: {'Authorization': `Bearer ${token}`}
    });
    const data = await response.json();
    
    // 3. Find the specific room thermostat
    // You might need to adapt the search logic depending on your JSON structure
    const thermostat = data.find(d => d.node_id == nodeId); 

    if(thermostat) {
        // Create/Update Homeyscript Tags
        await tag('Aldes_Salon_Temp', thermostat.temperature); // Ambient Temp
        await tag('Aldes_Salon_Setpoint', thermostat.consig_th); // Current Setpoint
        return true;
    }
    return false;
  } catch (e) {
    console.error(e);
    return false;
  }
}
await update();

```

* * *

### Step 3: Create the Virtual Thermostat

To control this cleanly from the Homey UI:

1. Make sure you have installed the **Virtual Devices** app from the Homey Store.

2. Go to Devices → **+** → **Virtual Devices**.

3. Choose **Thermostat**.

4. Name it “Living Room Thermostat” (or similar).

5. Check the boxes for **Target Temperature** and **Measured Temperature**.

* * *

### Step 4: The Flows (The Core Logic)

We need 2 distinct flows to handle the lifecycle correctly.

#### Flow 1: Control (Manual Change)

This is where the **Delay** trick is crucial. If we notify too fast, we display the old value.

- **WHEN:**

- **THEN:**

#### Flow 2: Measurement / Sync (Automatic)

This flow updates the virtual thermostat if someone changes the temp via the official Aldes app or the physical wall unit.

- **WHEN:**

- **THEN:**

* * *

**Summary of the logic:** The `Set` script sends the order. The `Update` script reads the reality. The delays in the Control Flow ensure that the `Update` script reads the _new_ value just before the notification is sent.

Hope this helps!

* * *

Bonjour à tous,

Pour ceux qui possèdent une PAC **Aldes T.One (Air/Air ou Aqua)** et une **Homey Pro** , l’intégration native n’est pas toujours disponible ou complète. Je vous propose ici une méthode robuste utilisant **Homeyscript** pour piloter votre chauffage et surtout **avoir un retour d’état fiable** , en contournant les problèmes de latence du Cloud Aldes.

Ce tuto couvre :

1. La récupération de vos identifiants techniques.

2. Les scripts de commande et de lecture.

3. La création d’un Thermostat Virtuel.

4. Les deux Flows nécessaires (Pilotage & Mise à jour).

### Prérequis

- Une Homey Pro.

- L’app **Homeyscript** installée.

- L’app **Virtual Devices** (pour créer un joli thermostat).

- Vos identifiants AldesConnect (email et mot de passe).

* * *

### Étape 1 : Récupérer vos IDs techniques (Script de Scan)

On ne peut pas deviner les identifiants internes de votre machine. Créez ce script temporaire pour les trouver.

1. Allez dans Homeyscript, créez un nouveau script : `Aldes_Scan`.

2. Collez le code ci-dessous en modifiant Email/Mot de passe.

3. Cliquez sur “Enregistrer et Tester”.

JavaScript

```auto
// --- VOS IDENTIFIANTS ---
const email = 'VOTRE_EMAIL_ALDES';
const password = 'VOTRE_MOT_DE_PASSE';

async function run() {
  try {
    // Connexion
    const loginRes = await fetch('https://cocoon.aldes.com/api/v1/auth/login', {
      method: 'POST',
      headers: {'Content-Type': 'application/json'},
      body: JSON.stringify({username: email, password: password})
    });
    if (!loginRes.ok) throw new Error('Erreur Login');
    const token = (await loginRes.json()).access_token;
    
    // Récupération produits
    const prodRes = await fetch('https://cocoon.aldes.com/api/v1/user/products', {
      method: 'GET',
      headers: {'Authorization': `Bearer ${token}`}
    });
    
    const products = await prodRes.json();
    console.log("--- RÉSULTAT DU SCAN ---");
    console.log(JSON.stringify(products, null, 2));
    return "Regardez les logs ci-dessous pour trouver 'product_id' et 'node_id'";
  } catch (error) {
    console.error(error);
    return false;
  }
}
await run();

```

👉 **Dans la console (log) en bas :** Cherchez et notez :

- `product_id` (souvent sous la forme `Pxxxxxx`).

- `node_id` correspondant à la pièce (Salon, Chambre…) que vous voulez piloter (souvent un chiffre ou un ID long).

* * *

### Étape 2 : Les Scripts de fonctionnement

Nous allons créer deux scripts. Un pour **Envoyer** l’ordre, un pour **Lire** l’état.

#### A. Script `Aldes_Set_Salon` (Pour changer la température)

Ce script récupère la température demandée par le Flow via l’argument `args[0]`.

JavaScript

```auto
// --- CONFIGURATION À REMPLIR ---
const email = 'VOTRE_EMAIL_ALDES';
const password = 'VOTRE_MOT_DE_PASSE';
const productId = 'VOTRE_PRODUCT_ID_TROUVÉ_ÉTAPE_1'; 
const nodeId = 'VOTRE_NODE_ID_DU_SALON'; 
// -------------------------------

const targetTemp = args[0]; // La température vient du Flow

if(!targetTemp) {
    console.log("Aucune température fournie");
    return false;
}

async function setTemp() {
  try {
    // 1. Login
    const loginRes = await fetch('https://cocoon.aldes.com/api/v1/auth/login', {
      method: 'POST',
      headers: {'Content-Type': 'application/json'},
      body: JSON.stringify({username: email, password: password})
    });
    const token = (await loginRes.json()).access_token;

    // 2. Envoi consigne
    // NOTE : Vérifiez si votre API demande 'set_consigne' ou autre selon le modèle
    const url = `https://cocoon.aldes.com/api/v1/products/${productId}/nodes/${nodeId}/set_consigne`;
    
    await fetch(url, {
      method: 'POST', 
      headers: {
        'Authorization': `Bearer ${token}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ value: parseFloat(targetTemp) })
    });
    
    return true;
  } catch (e) {
    console.error(e);
    return false;
  }
}
await setTemp();

```

#### B. Script `Aldes_Update_Salon` (Pour lire l’état)

Ce script interroge Aldes et met à jour des **Tags** Homeyscript que nous utiliserons dans les notifications et le thermostat virtuel.

JavaScript

```auto
// --- CONFIGURATION ---
const email = 'VOTRE_EMAIL_ALDES';
const password = 'VOTRE_MOT_DE_PASSE';
const productId = 'VOTRE_PRODUCT_ID';
const nodeId = 'VOTRE_NODE_ID_DU_SALON';
// ---------------------

async function update() {
  try {
    // 1. Login
    const loginRes = await fetch('https://cocoon.aldes.com/api/v1/auth/login', {
      method: 'POST',
      headers: {'Content-Type': 'application/json'},
      body: JSON.stringify({username: email, password: password})
    });
    const token = (await loginRes.json()).access_token;

    // 2. Récupération Data
    const response = await fetch(`https://cocoon.aldes.com/api/v1/products/${productId}/data`, {
        headers: {'Authorization': `Bearer ${token}`}
    });
    const data = await response.json();
    
    // 3. Trouver le thermostat du salon dans la liste
    // Adaptez la logique de recherche si votre JSON est différent
    const thermostat = data.find(d => d.node_id == nodeId); 

    if(thermostat) {
        // Crée/Met à jour les Tags Homey
        await tag('Aldes_Salon_Temp', thermostat.temperature); // Température ambiante
        await tag('Aldes_Salon_Consigne', thermostat.consig_th); // Consigne actuelle
        return true;
    }
    return false;
  } catch (e) {
    console.error(e);
    return false;
  }
}
await update();

```

* * *

### Étape 3 : Création du Thermostat Virtuel

Pour piloter cela proprement depuis l’app Homey : (téléchargez en amout l’app Virtual devices sur le store)

1. Appareils → **+** → **Virtual Devices**.

2. Choisissez **Thermostat**.

3. Nommez-le “Thermostat Salon”.

4. Cochez “Température cible” et “Température mesurée”.

* * *

### Étape 4 : Les Flows (Le cœur du système)

Il nous faut 2 flows distincts pour gérer le cycle de vie correctement.

#### Flow 1 : Le Pilotage (Quand je change la température manuellement)

C’est ici que l’astuce du délai est cruciale. Si on notifie trop vite, on affiche l’ancienne valeur.

- **QUAND :**

- **ALORS :**

#### Flow 2 : La Mesure / Synchronisation (Automatique)

Ce flow sert à mettre à jour le thermostat virtuel si quelqu’un change la température via l’application officielle Aldes ou le boîtier mural physique.

- **QUAND :**

- **ALORS :**

* * *

**Résumé de la logique :** Le script `Set` envoie l’ordre. Le script `Update` lit la réalité du terrain. Les délais dans le flow de pilotage permettent de s’assurer que le script `Update` lit bien la _nouvelle_ valeur avant que la notification ne parte.

Bonne installation à tous !

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [December 9, 2025, 4:06pm UTC](https://community.homey.app/t/aldes-t-one-air-air/146615/2 "2025-12-09T16:06:42Z")

</div>

> [@blutch32](#):
>
> **Virtual Devices** app (by Arjan)

And to nitpick (sorry 😅 ):  
and continued by Arie J. Godskalk as of 2022 😉
