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:
-
Retrieving your technical IDs.
-
The Control and Update scripts.
-
Creating a Virtual Thermostat (using the Virtual Devices app).
-
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.
-
Open Homeyscript, create a new script named
Aldes_Scan. -
Paste the code below, replacing Email/Password.
-
Click “Save & Test”.
JavaScript
// --- 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 likePxxxxxx). -
node_idcorresponding 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
// --- 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
// --- 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:
-
Make sure you have installed the Virtual Devices app from the Homey Store.
-
Go to Devices → + → Virtual Devices.
-
Choose Thermostat.
-
Name it “Living Room Thermostat” (or similar).
-
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:
- The target temperature of “Living Room Thermostat” changed.
-
THEN:
-
Homeyscript: Run
Aldes_Set_Salonwith argumentTag: Target Temperature(from the virtual device). -
Homeyscript: Run
Aldes_Update_Salon.-
Add a Delay to this card: 5 seconds. -
(This allows the Aldes Cloud enough time to process the change).
-
-
Push Notification: Send message “Heating set to [Tag: Aldes_Salon_Setpoint]°C”.
Add a Delay to this card: 6 seconds (Must be after the update script).
-
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:
- Every 15 minutes (or 5, or 30).
-
THEN:
-
Homeyscript: Run
Aldes_Update_Salon. -
Virtual Device: Set measured temperature to
Tag: Aldes_Salon_Temp. -
Virtual Device: Set target temperature to
Tag: Aldes_Salon_Setpoint.
-
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 :
-
La récupération de vos identifiants techniques.
-
Les scripts de commande et de lecture.
-
La création d’un Thermostat Virtuel.
-
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.
-
Allez dans Homeyscript, créez un nouveau script :
Aldes_Scan. -
Collez le code ci-dessous en modifiant Email/Mot de passe.
-
Cliquez sur “Enregistrer et Tester”.
JavaScript
// --- 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 formePxxxxxx). -
node_idcorrespondant à 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
// --- 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
// --- 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)
-
Appareils → + → Virtual Devices.
-
Choisissez Thermostat.
-
Nommez-le “Thermostat Salon”.
-
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 :
- La température de consigne de “Thermostat Salon” a changé.
-
ALORS :
-
Homeyscript : Exécuter
Aldes_Set_Salonavec l’argumentTag: Température de consigne(du thermostat virtuel). -
Homeyscript : Exécuter
Aldes_Update_Salon.-
Ajouter un Délai sur cette carte : 5 secondes. -
(Cela laisse le temps au Cloud Aldes de prendre en compte le changement).
-
-
Notification : Envoyer une notification Push : “Chauffage réglé sur [Tag: Aldes_Salon_Consigne]°C”.
Ajouter un Délai sur cette carte : 6 secondes (ou plus si nécessaire).
-
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 :
- Toutes les 15 minutes (ou 5, ou 30 selon votre besoin).
-
ALORS :
-
Homeyscript : Exécuter
Aldes_Update_Salon. -
Thermostat Virtuel : Définir la température mesurée sur
Tag: Aldes_Salon_Temp. -
Thermostat Virtuel : Définir la température de consigne sur
Tag: Aldes_Salon_Consigne.
-
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 !